diff --git a/.clang-format b/.clang-format index 1d113c6b71..7ae1c235fa 100644 --- a/.clang-format +++ b/.clang-format @@ -1,44 +1,44 @@ --- -Language: Cpp +Language: Cpp BasedOnStyle: Microsoft -AlignArrayOfStructures: Left +AlignArrayOfStructures: Right AlwaysBreakTemplateDeclarations: Yes -AllowAllArgumentsOnNextLine: 'false' -AllowAllParametersOfDeclarationOnNextLine: 'false' -BinPackArguments: 'false' -BinPackParameters: 'false' +AllowAllArgumentsOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: false +BinPackArguments: false +BinPackParameters: false BreakBeforeBinaryOperators: All -BreakBeforeTernaryOperators: 'true' +BreakBeforeTernaryOperators: true -Cpp11BracedListStyle: 'true' -FixNamespaceComments: 'true' +Cpp11BracedListStyle: true +FixNamespaceComments: true # About include -IncludeBlocks: Regroup +IncludeBlocks: Regroup IncludeCategories: - - Regex: '^' - Priority: 2 - SortPriority: 0 - CaseSensitive: false - - Regex: '^<.*\.h>' - Priority: 1 - SortPriority: 0 - CaseSensitive: false - - Regex: '^<.*' - Priority: 2 - SortPriority: 0 - CaseSensitive: false - - Regex: '.*' - Priority: 3 - SortPriority: 0 - CaseSensitive: false + - Regex: '^' + Priority: 2 + SortPriority: 0 + CaseSensitive: false + - Regex: '^<.*\.h>' + Priority: 1 + SortPriority: 0 + CaseSensitive: false + - Regex: '^<.*' + Priority: 2 + SortPriority: 0 + CaseSensitive: false + - Regex: '.*' + Priority: 3 + SortPriority: 0 + CaseSensitive: false IncludeIsMainRegex: '([-_](test|unittest))?$' IncludeIsMainSourceRegex: '' -IndentWidth: '4' +IndentWidth: 4 IndentWrappedFunctionNames: true # About Point @@ -47,22 +47,22 @@ PointerAlignment: Left PackConstructorInitializers: NextLine -ReflowComments: 'true' -SortIncludes: 'true' -SortUsingDeclarations: 'true' +ReflowComments: true +SortIncludes: true +SortUsingDeclarations: true # About space -SpaceAfterCStyleCast: 'false' -SpaceAfterLogicalNot: 'false' -SpaceBeforeRangeBasedForLoopColon: 'false' -SpaceInEmptyParentheses: 'false' -SpacesInAngles: 'false' -SpacesInCStyleCastParentheses: 'false' -SpacesInContainerLiterals: 'false' -SpacesInParentheses: 'false' -SpacesInSquareBrackets: 'false' +SpaceAfterCStyleCast: false +SpaceAfterLogicalNot: false +SpaceBeforeRangeBasedForLoopColon: false +SpaceInEmptyParentheses: false +SpacesInAngles: false +SpacesInCStyleCastParentheses: false +SpacesInContainerLiterals: false +SpacesInParentheses: false +SpacesInSquareBrackets: false -Standard: Cpp11 -TabWidth: '4' +Standard: c++11 +TabWidth: 4 UseTab: Never ... diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1d218801c5..a504f55794 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,11 +1,15 @@ ### Reminder - [ ] Have you linked an issue with this pull request? +- [ ] Have you added adequate unit tests and/or case tests for your pull request? - [ ] Have you noticed possible changes of behavior below or in the linked issue? - [ ] Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable) ### Linked Issue Fix #... +### Unit Tests and/or Case Tests for my changes +- A unit test is added for each new feature or bug fix. + ### What's changed? - Example: My changes might affect the performance of the application under certain conditions, and I have tested the impact on various scenarios... diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml new file mode 100644 index 0000000000..0470d5f050 --- /dev/null +++ b/.github/workflows/pytest.yml @@ -0,0 +1,26 @@ +name: Pyabacus Build and Test + +on: + pull_request: + +jobs: + test: + name: PyTest + runs-on: ubuntu-latest + container: + image: ghcr.io/deepmodeling/abacus-gnu + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.8 + - name: Build Pyabacus + run: | + cd python/pyabacus + python -m pip install -v .[test] + - name: Test Pyabacus + run: | + cd python/pyabacus/tests + pytest -v diff --git a/CMakeLists.txt b/CMakeLists.txt index b03faf8fad..455e8e7876 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,6 @@ if(POLICY CMP0135) # https://cmake.org/cmake/help/git-stage/policy/CMP0135.html endif() project(ABACUS - VERSION 3.0.0 DESCRIPTION "ABACUS is an electronic structure package based on DFT." HOMEPAGE_URL "https://github.com/deepmodeling/abacus-develop" LANGUAGES CXX @@ -394,19 +393,9 @@ if(MKLROOT) list(APPEND math_libs -lifcore) endif() else() - # In compatibility to builtin FindLAPACK.cmake before v3.5.4 - if(DEFINED LAPACK_DIR) - string(APPEND CMAKE_PREFIX_PATH ";${LAPACK_DIR}") - endif() - if(DEFINED LAPACK_LIBRARY) - set(LAPACK_LIBRARIES ${LAPACK_LIBRARY}) - endif() - if(DEFINED BLAS_DIR) - string(APPEND CMAKE_PREFIX_PATH ";${BLAS_DIR}") - endif() find_package(FFTW3 REQUIRED) - find_package(LAPACK REQUIRED) + find_package(Lapack REQUIRED) include_directories(${FFTW3_INCLUDE_DIRS}) list(APPEND math_libs FFTW3::FFTW3 LAPACK::LAPACK BLAS::BLAS) diff --git a/Dockerfile.cuda b/Dockerfile.cuda index e950f097f9..fc14430a6a 100644 --- a/Dockerfile.cuda +++ b/Dockerfile.cuda @@ -17,7 +17,7 @@ ADD https://api.github.com/repos/deepmodeling/abacus-develop/git/refs/heads/deve RUN git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \ cd abacus-develop && \ - cmake -B build -DUSE_CUDA=ON && \ + cmake -B build -DUSE_CUDA=ON -DENABLE_RAPIDJSON=ON && \ cmake --build build -j`nproc` && \ cmake --install build && \ rm -rf build && \ diff --git a/Dockerfile.gnu b/Dockerfile.gnu index 060d930563..c8316479c9 100644 --- a/Dockerfile.gnu +++ b/Dockerfile.gnu @@ -21,7 +21,7 @@ ADD https://api.github.com/repos/deepmodeling/abacus-develop/git/refs/heads/deve RUN git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \ cd abacus-develop && \ - cmake -B build -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON && \ + cmake -B build -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_RAPIDJSON=ON && \ cmake --build build -j`nproc` && \ cmake --install build && \ rm -rf build && \ diff --git a/Dockerfile.intel b/Dockerfile.intel index 3947f05b9e..39ca4c1431 100644 --- a/Dockerfile.intel +++ b/Dockerfile.intel @@ -56,7 +56,7 @@ ADD https://api.github.com/repos/deepmodeling/abacus-develop/git/refs/heads/deve RUN source /opt/intel/oneapi/setvars.sh && \ git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \ cd abacus-develop && \ - cmake -B build -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON && \ + cmake -B build -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_RAPIDJSON=ON && \ cmake --build build -j`nproc` && \ cmake --install build && \ rm -rf build && \ diff --git a/cmake/FindBlas.cmake b/cmake/FindBlas.cmake new file mode 100644 index 0000000000..a3c7f75069 --- /dev/null +++ b/cmake/FindBlas.cmake @@ -0,0 +1,15 @@ +if(DEFINED BLAS_DIR) + string(APPEND CMAKE_PREFIX_PATH ";${BLAS_DIR}") +endif() +if(DEFINED BLAS_LIBRARY) + set(BLAS_LIBRARIES ${BLAS_LIBRARY}) +endif() + +find_package(BLAS REQUIRED) + +if(NOT TARGET BLAS::BLAS) + add_library(BLAS::BLAS UNKNOWN IMPORTED) + set_target_properties(BLAS::BLAS PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${BLAS_LIBRARIES}") +endif() diff --git a/cmake/FindLapack.cmake b/cmake/FindLapack.cmake new file mode 100644 index 0000000000..15c3976d64 --- /dev/null +++ b/cmake/FindLapack.cmake @@ -0,0 +1,17 @@ +# In compatibility to builtin FindLAPACK.cmake before v3.5.4 +if(DEFINED LAPACK_DIR) + string(APPEND CMAKE_PREFIX_PATH ";${LAPACK_DIR}") +endif() +if(DEFINED LAPACK_LIBRARY) + set(LAPACK_LIBRARIES ${LAPACK_LIBRARY}) +endif() + +find_package(Blas REQUIRED) +find_package(LAPACK REQUIRED) + +if(NOT TARGET LAPACK::LAPACK) + add_library(LAPACK::LAPACK UNKNOWN IMPORTED) + set_target_properties(LAPACK::LAPACK PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${LAPACK_LIBRARIES}") +endif() diff --git a/cmake/FindLibxc.cmake b/cmake/FindLibxc.cmake index 2800942ca9..18a0ace4a3 100644 --- a/cmake/FindLibxc.cmake +++ b/cmake/FindLibxc.cmake @@ -11,7 +11,7 @@ endif() find_package(PkgConfig) if(PKG_CONFIG_FOUND) pkg_search_module(Libxc IMPORTED_TARGET GLOBAL libxc) - find_package_handle_standard_args(Libxc DEFAULT_MSG Libxc_LINK_LIBRARIES Libxc_INCLUDE_DIRS) + find_package_handle_standard_args(Libxc DEFAULT_MSG Libxc_LINK_LIBRARIES Libxc_FOUND) endif() if(NOT Libxc_FOUND) find_package(Libxc REQUIRED HINTS diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index 517cdefd09..e2a9504c0e 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -17,7 +17,7 @@ - [init\_chg](#init_chg) - [init\_vel](#init_vel) - [nelec](#nelec) - - [nelec_delta](#nelec_delta) + - [nelec\_delta](#nelec_delta) - [nupdown](#nupdown) - [dft\_functional](#dft_functional) - [xc\_temperature](#xc_temperature) @@ -277,6 +277,7 @@ - [yukawa\_potential](#yukawa_potential) - [yukawa\_lambda](#yukawa_lambda) - [omc](#omc) + - [onsite\_radius](#onsite_radius) - [vdW correction](#vdw-correction) - [vdw\_method](#vdw_method) - [vdw\_s6](#vdw_s6) @@ -337,8 +338,8 @@ - [td\_trigo\_amp](#td_trigo_amp) - [td\_heavi\_t0](#td_heavi_t0) - [td\_heavi\_amp](#td_heavi_amp) - - [td\_out\_dipole](#td_out_dipole) - - [td\_out\_efield](#td_out_efield) + - [out\_dipole](#out_dipole) + - [out\_efield](#out_efield) - [ocp](#ocp) - [ocp\_set](#ocp_set) - [Variables useful for debugging](#variables-useful-for-debugging) @@ -440,8 +441,9 @@ These variables are used to control general system parameters. - 0: Only time reversal symmetry would be considered in symmetry operations, which implied k point and -k point would be treated as a single k point with twice the weight. - 1: Symmetry analysis will be performed to determine the type of Bravais lattice and associated symmetry operations. (point groups, space groups, primitive cells, and irreducible k-points) - **Default**: - - -1: if (*[dft_fuctional](#dft_functional)==hse/hf/pbe0/scan0/opt_orb* or *[rpa](#rpa)==True*) and *[calculation](#calculation)!=nscf*. Currently symmetry is not supported in EXX (exact exchange) calculation. - - 0: if *[calculation](#calculation)==md/nscf/get_pchg/get_wf/get_S* or *[gamma_only]==True* + - 0: + - if *[calculation](#calculation)==md/nscf/get_pchg/get_wf/get_S* or *[gamma_only]==True*; + - If (*[dft_fuctional](#dft_functional)==hse/hf/pbe0/scan0/opt_orb* or *[rpa](#rpa)==True*). Currently *symmetry==1* is not supported in EXX (exact exchange) calculation. - 1: else ### symmetry_prec @@ -1451,6 +1453,8 @@ These variables are used to control the output of properties. - npsin = 4: SPIN1_CHG.cube, SPIN2_CHG.cube, SPIN3_CHG.cube, and SPIN4_CHG.cube. The circle order of the charge density on real space grids is: x is the outer loop, then y and finally z (z is moving fastest). + + If EXX(exact exchange) is calculated, (i.e. *[dft_fuctional](#dft_functional)==hse/hf/pbe0/scan0/opt_orb* or *[rpa](#rpa)==True*), the Hexx(R) files will be output in the folder `OUT.${suffix}` too, which can be read in NSCF calculation. - **Default**: False ### out_pot @@ -1654,16 +1658,20 @@ These variables are used to control the output of properties. - **Type**: Boolean - **Availability**: Numerical atomic orbital basis -- **Description**: Whether to save charge density files and Hamiltonian matrix files per ionic step, which are used to restart calculations. According to the value of [read_file_dir](#read_file_dir): +- **Description**: Whether to save charge density files per ionic step, which are used to restart calculations. According to the value of [read_file_dir](#read_file_dir): - auto: These files are saved in folder `OUT.${suffix}/restart/`; - other: These files are saved in folder `${read_file_dir}/restart/`. + + If EXX(exact exchange) is calculated (i.e. *[dft_fuctional](#dft_functional)==hse/hf/pbe0/scan0/opt_orb* or *[rpa](#rpa)==True*), the Hexx(k) files for each k-point will also be saved in the above folder, which can be read in EXX calculation with *[restart_load](#restart_load)==True*. - **Default**: False ### restart_load - **Type**: Boolean - **Availability**: Numerical atomic orbital basis -- **Description**: If [restart_save](#restart_save) is set to true and an electronic iteration is finished, calculations can be restarted from the charge density file and Hamiltonian matrix file, which are saved in the former calculation. Please ensure [read_file_dir](#read_file_dir) is correct, and the charge density file and Hamiltonian matrix file exist. +- **Description**: If [restart_save](#restart_save) is set to true and an electronic iteration is finished, calculations can be restarted from the charge density file, which are saved in the former calculation. Please ensure [read_file_dir](#read_file_dir) is correct, and the charge density file exist. + + If EXX(exact exchange) is calculated (i.e. *[dft_fuctional](#dft_functional)==hse/hf/pbe0/scan0/opt_orb* or *[rpa](#rpa)==True*), the Hexx(k) files in the same folder for each k-point will also be read. - **Default**: False ### rpa @@ -2561,11 +2569,12 @@ These variables are used to control DFT+U correlated parameters ### dft_plus_u -- **Type**: Boolean +- **Type**: Integer - **Description**: Determines whether to calculate the plus U correction, which is especially important for correlated electrons. - - True: Calculate plus U correction. - - False: Do not calculate plus U correction. -- **Default**: False + - 1: Calculate plus U correction with radius-adjustable localized projections (with parameter `onsite_radius`). + - 2: Calculate plus U correction using first zeta of NAOs as projections (this is old method for testing). + - 0: Do not calculate plus U correction. +- **Default**: 0 ### orbital_corr @@ -2612,6 +2621,44 @@ These variables are used to control DFT+U correlated parameters - **Default**: 0 +### onsite_radius + +- **Type**: Real +- **Availability**: `dft_plus_u` is set to 1 +- **Description**: + + - The `Onsite-radius` parameter facilitates modulation of the single-zeta portion of numerical atomic orbitals for projections for DFT+U. + - The modulation algorithm includes a smooth truncation applied directly to the tail of the original orbital, followed by normalization. Consider the function: + $$ + g(r;\sigma)=\begin{cases} + 1-\exp\left(-\frac{(r-r_c)^2}{2\sigma^2}\right), & r < r_c\\ + 0, & r \geq r_c + \end{cases} + $$ + - where $\sigma$ is a parameter that controls the smoothing interval. A normalized function truncated smoothly at $r_c$ can be represented as: + + $$ + \alpha(r) = \frac{\chi(r)g(r;\sigma)}{\langle\chi(r)g(r;\sigma), \chi(r)g(r;\sigma)\rangle} + $$ + + - To find an appropriate $\sigma$, the optimization process is as follows: + + - Maximizing the overlap integral under a normalization constraint is equivalent to minimizing an error function: + + $$ + \min \langle \chi(r)-\alpha(r), \chi(r)-\alpha(r)\rangle \quad \text{subject to} \quad \langle \alpha(r),\alpha(r)\rangle=1 + $$ + + - Similar to the process of generating numerical atomic orbitals, this optimization choice often induces additional oscillations in the outcome. To suppress these oscillations, we may include a derivative term in the objective function ($f'(r)\equiv \mathrm{d}f(r)/\mathrm{d}r$): + + $$ + \min \left[\gamma\langle \chi(r)-\alpha(r), \chi(r)-\alpha(r)\rangle + \langle \chi'(r)-\alpha'(r), \chi'(r)-\alpha'(r)\rangle\right] \quad \text{subject to} \quad \langle \alpha(r),\alpha(r)\rangle=1 + $$ + + - where $\gamma$ is a parameter that adjusts the relative weight of the error function to the derivative error function. +- **Unit**: Bohr +- **Default**: 5.0 + [back to top](#full-list-of-input-keywords) ## vdW correction @@ -3130,7 +3177,7 @@ These variables are used to control berry phase and wannier90 interface paramete E = 0.0 , t>t0 - **Default**: 2.74 -### td_out_dipole +### out_dipole - **Type**: Boolean - **Description**: @@ -3138,10 +3185,10 @@ These variables are used to control berry phase and wannier90 interface paramete - False: do not output dipole. - **Default**: False -### td_out_efield +### out_efield - **Type**: Boolean -- **Description**: The unit of output file is atomic unit (1 a.u. = 1 Ry/(bohr $\cdot$ e) = 51.422 V/Angstrom). +- **Description**: output TDDFT Efield or not(V/Angstrom) - True: output efield. - False: do not output efield. - **Default**: False @@ -3505,7 +3552,7 @@ for `nspin 2` case. The difference is that `lambda`, `target_mag`, and `constrai ## Quasiatomic Orbital (QO) analysis -These variables are used to control the usage of QO analysis. Please note present implementation of QO always yield numerically instable results, use with much care. +These variables are used to control the usage of QO analysis. QO further compress information from LCAO: usually PW basis has dimension in million, LCAO basis has dimension below thousand, and QO basis has dimension below hundred. ### qo_switch @@ -3518,10 +3565,12 @@ These variables are used to control the usage of QO analysis. Please note presen - **Type**: String - **Description**: specify the type of atomic basis - `pswfc`: use the pseudowavefunction in pseudopotential files as atomic basis. To use this option, please make sure in pseudopotential file there is pswfc in it. - - `hydrogen`: generate hydrogen-like atomic basis. + - `hydrogen`: generate hydrogen-like atomic basis (or with Slater screening). + - `szv`: use the first set of zeta for each angular momentum from numerical atomic orbitals as atomic basis. *warning: to use* `pswfc` *, please use norm-conserving pseudopotentials with pseudowavefunctions, SG15 pseudopotentials cannot support this option.* -- **Default**: `hydrogen` + *Developer notes: for ABACUS-lcao calculation, it is the most recommend to use `szv` instead of `pswfc` which is originally put forward in work of QO implementation on PW basis. The information loss always happens if `pswfc` or `hydrogen` orbitals are not well tuned, although making kpoints sampling more dense will mitigate this problem, but orbital-adjust parameters are needed to test system-by-system in this case.* +- **Default**: `szv` ### qo_strategy @@ -3535,13 +3584,13 @@ These variables are used to control the usage of QO analysis. Please note presen - `energy-full`: will generate hydrogen-like orbitals according to Aufbau principle. For example the Cu (1s2 2s2 2p6 3s2 3p6 3d10 4s1), will generate these orbitals. - `energy-valence`: from the highest n (principal quantum number) layer and n-1 layer, generate all occupied and possible ls (angular momentum quantum number) for only once, for example Cu, will generate 4s, 3d and 3p orbitals. - For `qo_basis pswfc` - - `all`: use all possible pseudowavefunctions in pseudopotential file. + For `qo_basis pswfc` and `qo_basis szv` + - `all`: use all possible pseudowavefunctions/numerical atomic orbital (of first zeta) in pseudopotential/numerical atomic orbital file. - `s`/`p`/`d`/...: only use s/p/d/f/...-orbital(s). - `spd`: use s, p and d orbital(s). Any unordered combination is acceptable. - + *warning: for* `qo_basis hydrogen` *to use* `full`, *generation strategy may cause the space spanned larger than the one spanned by numerical atomic orbitals, in this case, must filter out orbitals in some way* -- **Default**: `minimal-valence` +- **Default**: for `hydrogen`: `energy-valence`, for `pswfc` and `szv`: `all` ### qo_screening_coeff diff --git a/docs/advanced/interface/TB2J.md b/docs/advanced/interface/TB2J.md new file mode 100644 index 0000000000..8a2d731557 --- /dev/null +++ b/docs/advanced/interface/TB2J.md @@ -0,0 +1,205 @@ +# TB2J + +## Introduction + +[TB2J](https://github.com/mailhexu/TB2J) is an open-source Python package for the automatic computation of magnetic interactions (including exchange and Dzyaloshinskii-Moriya) between atoms of magnetic crystals from density functional Hamiltonians based on Wannier functions or linear combinations of atomic orbitals. The program is based on Green’s function method with the local rigid spin rotation treated as a perturbation. The ABACUS interface has been added since TB2J version 0.8.0. + +For more information, see the documentation on https://tb2j.readthedocs.io/en/latest/ + +## Installation + +The most easy way to install TB2J is to use pip: + +```bash +pip install TB2J +``` + +You can also download TB2J from the github page, and install with: + +```bash +git clone https://github.com/mailhexu/TB2J.git +cd TB2J +python setup.py install +``` + +## The Heisenberg model +The Heisenberg Hamiltonian in TB2J contains three different parts, which are: + +$E = -\sum_{i \neq j} \left[ J_{\text{iso}}^{ij} \vec{S}_i \cdot \vec{S}_j + \vec{S}_i J_{\text{ani}}^{ij} \vec{S}_j + \vec{D}_{ij} \cdot (\vec{S}_i \times \vec{S}_j) \right],$ + +where $J_{\text{iso}}^{ij}$ represents the isotropic exchange, $J_{\text{ani}}^{ij}$ represents the symmetric anisotropic exhcange which is a 3 $\times$ 3 tensor with $J^{\text{ani}} = J^{\text{ani,T}}$, $\vec{D}_{ij}$ represents the Dzyaloshinskii-Moriya interaction (DMI). + +> **Note:** Exchange parameters conventions for other Heisenberg Hamiltonian can be found in [Conventions of Heisenberg Model](https://tb2j.readthedocs.io/en/latest/src/convention.html). + +## How to use + +With the LCAO basis set, TB2J can directly take the output and compute the exchange parameters. For the PW and LCAO-in-PW basis set, the Wannier90 interace can be used instead. In this tutorial we will use LCAO. + +### Collinear calculation without SOC + +We take Fe as an example to illustrate how to use ABACUS to generate the input files required for TB2J. + +#### 1. Perform ABACUS calculation. + `INPUT` file: + +``` +INPUT_PARAMETERS +#Parameters (1.General) +suffix Fe +stru_file STRU +kpoint_file KPT +pseudo_dir ./ +orbital_dir ./ +calculation scf +ntype 1 +nspin 2 +symmetry 1 +noncolin 0 +lspinorb 0 + +#Parameters (2.PW) +ecutwfc 100 +scf_thr 1.0e-6 +init_chg atomic +out_mul 1 + +#Parameters (4.Relaxation) +ks_solver genelpa +scf_nmax 200 +out_bandgap 0 + +#Parameters (5.LCAO) +basis_type lcao +gamma_only 0 + +#Parameters (6.Smearing) +smearing_method gauss +smearing_sigma 0.001 + +#Parameters (7.Charge Mixing) +mixing_type broyden +mixing_beta 0.2 + +# Variables related to output information +out_mat_hs2 1 +``` + +`STRU` file: +``` +ATOMIC_SPECIES +Fe 55.845 Fe_ONCV_PBE_FR-1.0.upf + +NUMERICAL_ORBITAL +Fe_gga_8au_100Ry_4s2p2d1f.orb + +LATTICE_CONSTANT +1.8897261258369282 + +LATTICE_VECTORS +2.8660000000 0.0000000000 0.0000000000 +0.0000000000 2.8660000000 0.0000000000 +0.0000000000 0.0000000000 2.8660000000 + +ATOMIC_POSITIONS +Direct + +Fe +5.0000000000 +2 +0.0000000000 0.0000000000 0.0000000000 1 1 1 mag 2.5 +0.5000000000 0.5000000000 0.5000000000 1 1 1 mag 2.5 +``` + +and `KPT` file: +``` +K_POINTS +0 +Gamma +8 8 8 0 0 0 +``` +After the key parameter `out_mat_hs2` is turned on, the Hamiltonian matrix $H(R)$ (in $Ry$) and overlap matrix $S(R)$ will be written into files in the directory `OUT.${suffix}` . In the INPUT, the line: + +``` +suffix Fe +``` + +specifies the suffix of the output, in this calculation, we set the path to the directory of the DFT calculation, which is the current directory (".") and the suffix to Fe. + +#### 2. Perform TB2J calculation: + +```bash +abacus2J.py --path . --suffix Fe --elements Fe --kmesh 7 7 7 +``` + +This first read the atomic structures from th `STRU` file, then read the Hamiltonian and the overlap matrices stored in the files named starting from `data-HR-*` and `data-SR-*` files. It also read the fermi energy from the `OUT.Fe/running_scf.log` file. + +With the command above, we can calculate the $J$ with a $7 \times 7 \times 7$ k-point grid. This allows for the calculation of exchange between spin pairs between $7 \times 7 \times 7$ supercell. Note: the kmesh is not dense enough for a practical calculation. For a very dense k-mesh, the `--rcut` option can be used to set the maximum distance of the magnetic interactions and thus reduce the computation cost. But be sure that the cutoff is not too small. + +The description of the output files in `TB2J_results` can be found in the [TB2J documentation](https://tb2j.readthedocs.io/en/latest/src/output.html). We can find the exchange parameters with `Fe` by : + +```bash +grep "Fe" exchange.out +``` + +the following contents showing the first, second and third nearest neighbor exchange parameters as 18.6873, 9.9213 and 0.8963 meV, resoectively. More equivalent exchange parameters are also shown. + +``` + Fe1 Fe2 ( -1, -1, -1) 18.6873 (-1.433, -1.433, -1.433) 2.482 + Fe1 Fe2 ( -1, -1, 0) 18.6867 (-1.433, -1.433, 1.433) 2.482 + Fe1 Fe2 ( -1, 0, -1) 18.6866 (-1.433, 1.433, -1.433) 2.482 + Fe1 Fe2 ( -1, 0, 0) 18.6873 (-1.433, 1.433, 1.433) 2.482 + Fe1 Fe2 ( 0, -1, -1) 18.6873 ( 1.433, -1.433, -1.433) 2.482 + Fe1 Fe2 ( 0, -1, 0) 18.6866 ( 1.433, -1.433, 1.433) 2.482 + Fe1 Fe2 ( 0, 0, -1) 18.6867 ( 1.433, 1.433, -1.433) 2.482 + Fe1 Fe2 ( 0, 0, 0) 18.6873 ( 1.433, 1.433, 1.433) 2.482 + Fe2 Fe1 ( 0, 0, 0) 18.6873 (-1.433, -1.433, -1.433) 2.482 + Fe2 Fe1 ( 0, 0, 1) 18.6867 (-1.433, -1.433, 1.433) 2.482 + Fe2 Fe1 ( 0, 1, 0) 18.6866 (-1.433, 1.433, -1.433) 2.482 + Fe2 Fe1 ( 0, 1, 1) 18.6873 (-1.433, 1.433, 1.433) 2.482 + Fe2 Fe1 ( 1, 0, 0) 18.6873 ( 1.433, -1.433, -1.433) 2.482 + Fe2 Fe1 ( 1, 0, 1) 18.6866 ( 1.433, -1.433, 1.433) 2.482 + Fe2 Fe1 ( 1, 1, 0) 18.6867 ( 1.433, 1.433, -1.433) 2.482 + Fe2 Fe1 ( 1, 1, 1) 18.6873 ( 1.433, 1.433, 1.433) 2.482 + Fe1 Fe1 ( -1, 0, 0) 9.9213 (-2.866, 0.000, 0.000) 2.866 + Fe2 Fe2 ( -1, 0, 0) 9.9213 (-2.866, 0.000, 0.000) 2.866 + Fe1 Fe1 ( 0, -1, 0) 9.9211 ( 0.000, -2.866, 0.000) 2.866 + Fe2 Fe2 ( 0, -1, 0) 9.9211 ( 0.000, -2.866, 0.000) 2.866 + Fe1 Fe1 ( 0, 0, -1) 9.9210 ( 0.000, 0.000, -2.866) 2.866 + Fe2 Fe2 ( 0, 0, -1) 9.9210 ( 0.000, 0.000, -2.866) 2.866 + Fe1 Fe1 ( 0, 0, 1) 9.9210 ( 0.000, 0.000, 2.866) 2.866 + Fe2 Fe2 ( 0, 0, 1) 9.9210 ( 0.000, 0.000, 2.866) 2.866 + Fe1 Fe1 ( 0, 1, 0) 9.9211 ( 0.000, 2.866, 0.000) 2.866 + Fe2 Fe2 ( 0, 1, 0) 9.9211 ( 0.000, 2.866, 0.000) 2.866 + Fe1 Fe1 ( 1, 0, 0) 9.9213 ( 2.866, 0.000, 0.000) 2.866 + Fe2 Fe2 ( 1, 0, 0) 9.9213 ( 2.866, 0.000, 0.000) 2.866 + Fe1 Fe1 ( -1, -1, 0) 0.8963 (-2.866, -2.866, 0.000) 4.053 + Fe2 Fe2 ( -1, -1, 0) 0.8963 (-2.866, -2.866, 0.000) 4.053 + Fe1 Fe1 ( -1, 0, -1) 0.8970 (-2.866, 0.000, -2.866) 4.053 + Fe2 Fe2 ( -1, 0, -1) 0.8970 (-2.866, 0.000, -2.866) 4.053 +``` + +Several other formats of the exchange parameters are also provided in the `TB2J_results` directory , which can be used in spin dynamics code, e.g. [MULTIBINIT](https://docs.abinit.org/tutorial/spin_model/), [Vampire](https://vampire.york.ac.uk/). + +### Non-collinear calculation with SOC + +The DMI and anisotropic exchange are result of the SOC, therefore requires the DFT calculation to be done with SOC enabled. To get the full set of exchange parameters, a "rotate and merge" procedure is needed, in which several DFT calculations with either the structure or the spin rotated are needed. For each of the non-collinear calcualtion, we compute the exchange parameters from the DFT calculation with the same command as in the collienar case. + +```bash +abacus2J.py --path . --suffix Fe --elements Fe --kmesh 7 7 7 +``` + +And then the "TB2J_merge.py" command can be used to get the final spin interaction parameters. + + +### Parameters of abacus2J.py + +We can use the command + +```bash +abacus2J.py --help +``` + +to view the parameters and the usage of them in abacus2J.py. + +### Acknowledgments +We thanks to Xu He to provide critical interface support. diff --git a/docs/advanced/interface/index.rst b/docs/advanced/interface/index.rst index c1a745dcea..4bb8704727 100644 --- a/docs/advanced/interface/index.rst +++ b/docs/advanced/interface/index.rst @@ -16,3 +16,4 @@ Interfaces to Other Softwares pyatb ShengBTE candela + TB2J diff --git a/docs/advanced/json/json_add.md b/docs/advanced/json/json_add.md new file mode 100644 index 0000000000..2632257a86 --- /dev/null +++ b/docs/advanced/json/json_add.md @@ -0,0 +1,219 @@ +# Table of Contents + +1. [Abacus-Json Usage Instructions](#1-abacus-json-usage-instructions) + - [Normal Usage](#normal-usage) + - [Add/Modify a value to object json node](#addmodify-a-value-to-object-json-node-key2-is-a-object-node) + - [Pushback a value to array json node](#pushback-a-value-to-array-json-node-key2-is-a-array-node) + - [Initialization and Assignment Functions for Different Value Types in Arrays](#initialization-and-assignment-functions-for-different-value-types-in-arrays) + - [Object Type](#object-type) + - [Array Type](#array-type) + - [Array Modification Instructions](#array-modification-instructions) +2. [Json Codes Addition Guidelines](#2-json-codes-addition-guidelines) + - [Abacus JSON Functionality Code Structure](#abacus-json-functionality-code-structure) + - [Add JSON code principles](#add-json-code-principles) + + + +# 1. Abacus-Json Usage Instructions + +In Abacus, the main utility functions for manipulating JSON trees are outlined below. These functions are used to add objects to Abacus JSON trees. + +Function signature: +void AbacusJson::add_json (std::vector keys, const T& value,bool IsArray) +Where: +- `keys` is a vector of string dictionaries, representing the node paths where values are to be added in the JSON tree. +- `value` is a generic value type, including int, bool, double, string, or rapidjson value type, indicating the value to be added to the Abacus JSON. +- `IsArray` is a boolean object, indicating whether the current node being added is an array. `true` represents an array node, while `false` represents a non-array node. + +Example usage: +const std::string version = "v3.5.2"; +AbacusJson::add_json({"general_info", "version"}, version, false); + + + +## Normal usage + +### Add/Modify a value to object json node (key2 is a object node): +```cpp +Json::AbacusJson::add_json({"key1","key2"}, 3.1415,false); +``` + +### Pushback a value to array json node (key2 is a array node): +```cpp +Json::AbacusJson::add_json({"key1","key2"}, 3.1415,true); +``` + +Through this function alone, the addition of the majority of JSON parameters can be achieved. However, for complex array types, additional operations are required. + + +## Initialization and Assignment Functions for Different Value Types in Arrays + +### Object Type: +Since the object type consists of key-value pairs, four member functions are divided based on whether key and val are of type std::string. + +- JaddStringV(str,val): key is not string, val is string +- JaddStringK(str,val): key is string, val is not string +- JaddStringKV(str,val): both key and val are string +- JaddNormal(str,val): both key and val are not string + + +### Array Type: +For array types, the following member functions are used directly. + +- JPushBack(val): val is not string +- JPushBackString(val): val is string + +For example, to add nodes to a JSON tree with multiple arrays in Abacus, the following code is needed: + +```cpp +// add key-val to an object array +for(int i=0;i<1;i++){ + Json::jsonValue object(JobjectType); + std::string str = std::to_string(i*100); + + object.JaddNormal("int",i); + object.JaddStringV("string", str); + Json::AbacusJson::add_json({"array"}, object,true); +} +``` + +```cpp +// add array in array +Json::jsonValue object0(JarrayType); + +object0.JPushBack(1); +object0.JPushBack(2); +object0.JPushBack(3); + +Json::AbacusJson::add_json({"Darray"}, object0,true); +``` + + + + + +## Array Modification Instructions + +For values that need to be modified in arrays, the following method can be used: +- The index number of the array starts at 0, if it's negative, it's going from back to front. eg. If the index is -1, it means that the last element of the array is modified: +- If the path contains an array, use the array index directly. + +```cpp +AbacusJson::add_json({"path",index }, value, is_array); +``` + +Here, index is a number. index >= 0 indicates the index from the beginning of the array, while index < 0 indicates traversal from the end of the array. + +For example, to modify the value of "vasp" to "cp2k" in the following JSON tree: + +```json +"Json":{ + "key6": { + "key7": [ + { + "a":1, + "new":2 + } + "vasp", + "abacus" + ] + } +} +``` +The relative path of "vasp" in layman's terms is Json - key6 - key7[0]. To use the JSON modification method in abacus, simply change the index [0] to "0". + +```cpp +AbacusJson::add_json({"Json","key6","key7",1}, "cp2k" , false); +``` + +If traversal is done from the end: +```cpp +AbacusJson::add_json({"Json","key6","key7",-2}, "cp2k", false); +``` + +An error is reported if index exceeds the array length! +```cpp +AbacusJson::add_json({"Json","key6","key7",3}, "cp2k", false); +``` + + + + +# 2. Abacus Json Codes Addition Guidelines + +## Abacus JSON Functionality Code Structure + +The current code structure of JSON functionality in Abacus is roughly as follows: + +- source/module_io + - para_json.cpp: Contains JSON generation and output interfaces directly called by the device in Abacus. + - json_output/: Contains the functionality encapsulation class `abacusjson.cpp` of RapidJSON in Abacus and code classes for parameter generation in various JSON modules. + - test: Code testing files in `json_output`. + + +## Add JSON code principles: +In Abacus JSON addition, the following principles need to be followed: + +1. Whenever possible, code to be added in the module should be written in the `json_output` module (there may also be cases where parameters cannot be directly obtained through parameter passing in `json_output`), and then called in the path `para_json.cpp` -> `device.cpp` or other main execution paths. (Ensure minimal impact on other modules as much as possible) + +2. For parameters that can be obtained without depending on other modules, do not reference parameter values saved in other modules. (Such as `mpi_num`, `start_time`) + +3. Use classes as function parameters as much as possible instead of using global classes for obtained parameters. (For example, in `gen_general_info`, `Input`) + +4. After adding parameters, supplement test code in `module_io/json_output/test`. + +For the current JSON file, there are two JSON modules: `init` and `general_info`, `output_info`. +Taking `general_info` as an example, the code to be added is as follows: + +```cpp +namespace Json +{ + +#ifdef __RAPIDJSON +void gen_general_info(Input *input) +{ + +#ifdef VERSION + const std::string version = VERSION; +#else + const std::string version = "unknown"; +#endif +#ifdef COMMIT + const std::string commit = COMMIT; +#else + const std::string commit = "unknown"; +#endif + + // start_time + std::time_t start_time = input->get_start_time(); + std::string start_time_str; + convert_time(start_time, start_time_str); + + // end_time + std::time_t time_now = std::time(NULL); + std::string end_time_str; + convert_time(time_now, end_time_str); + +#ifdef __MPI + int mpi_num = Parallel_Global::mpi_number; + int omp_num = Parallel_Global::omp_number; +#elif + int mpi_num = 1; + int omp_num = 1; +#endif + + AbacusJson::add_json({"general_info", "version"}, version,false); + AbacusJson::add_json({"general_info", "commit"}, commit,false); + AbacusJson::add_json({"general_info", "device"}, input->device,false); + AbacusJson::add_json({"general_info", "mpi_num"}, mpi_num,false); + AbacusJson::add_json({"general_info", "omp_num"}, omp_num,false); + AbacusJson::add_json({"general_info", "pseudo_dir"}, input->pseudo_dir,false); + AbacusJson::add_json({"general_info", "orbital_dir"}, input->orbital_dir,false); + AbacusJson::add_json({"general_info", "stru_file"}, input->stru_file,false); + AbacusJson::add_json({"general_info", "kpt_file"}, input->kpoint_file,false); + AbacusJson::add_json({"general_info", "start_time"}, start_time_str,false); + AbacusJson::add_json({"general_info", "end_time"}, end_time_str,false); +} +#endif +} // namespace Json +``` \ No newline at end of file diff --git a/docs/advanced/json/json_para.md b/docs/advanced/json/json_para.md new file mode 100644 index 0000000000..1ae86190fc --- /dev/null +++ b/docs/advanced/json/json_para.md @@ -0,0 +1,85 @@ +# JSON Configuration Parameters Documentation + +- [JSON Configuration Parameters Documentation](#json-configuration-parameters-documentation) + - [Overview](#overview) + - [General Information](#general-information) + - [Input](#input) + - [Init](#init) + - [Output](#output) + - [Final Structure](#final-structure) + +## Overview + +This JSON template provides input and output configurations for ABACUS. It contains parameters for the execution of the program and the output of results, primarily for recording computational processes and outcomes for post processing. + +Notice: one need to add the option `-DENABLE_RAPIDJSON=ON` when compiling ABACUS to enable the output of "abacus.json". + + +## General Information + +- `version` - [str] The version number of ABACUS. +- `commit` - [str] The commit hash of ABACUS code at the time of computation. +- `start_time` - [str] The start time of the computation. +- `end_time` - [str] The end time of the computation. +- `device` - [str] The name of the hardware device on which the computation was run. +- `omp_number` - [int] The number of OpenMP threads. +- `mpi_number` - [int] The number of MPI processes. +- `out_dir` - [str] The output directory, e.g., "OUT.ABACUS". +- `log_file` - [str] The name of the log file, e.g., "running_scf.log". +- `pseudo_dir` - [str] The directory where pseudopotential files are stored. +- `orbital_dir` - [str] The directory where atomic orbital files are stored. +- `stru_file` - [str] The name of the structure file. +- `kpt_file` - [str] The name of the k-point file. + +## Input +- A dictionary of parameters and their values as defined by the user in the INPUT file. (This part of the content will not be output in the current version yet.) + + +## Init + + +- `Input` - Lists the value of all input parameters. (This part of the content will not be output in the current version yet.) +- `point_group` - [str] the Schoenflies name of the point group. +- `point_group_in_space` - [str] the Schoenflies name of the point group in the space group. +- `nkstot`, `nkstot_ibz` - [int] Total number of k-points and total number of irreducible k-points. +- `nelectron_each_type` - [object(str-int)] The number of valence electron for each atom type, e.g., `{"C": 2, "H":1}`. +- `nelectron` - [int] Total number of electrons. +- `nband` - [int] Number of bands. +- `natom` - [int] Total number of atoms. +- `natom_each_type` - [object(str-int)] The atom number of each atom type, e.g., `{"C": 2, "H":1}`. +- `label` - [array(str)] An array of atomic labels. +- `element` - [array(object(str:str))] The element of each atom type. +- `cell` - [array(array(double))] The lattice vector. Unit in Angstrom. +- `coordinate` - [array(array(double))] The cartesian coordinates of each atom. Unit in Angstrom. +- `mag` - [array(double)] The magnetic moments for each atom. +- `pp` - [object(str-str)] The pseudopotential file of each atom type. +- `orb` - [object(str-str)] The orbital file of each atom type. + + +## Output + +An array of dicts, including information about each self-consistent field (SCF) step, such as energy, convergence, and configuration: + +- `energy`, `e_fermi` - [double] The total energy and Fermi energy. Unit in eV. +- `force` - [array(array(double))] The forces calculated on each atom. Unit in eV/Angstrom. +- `stress` - [array(array(double))] The stress tensor. Unit in Kbar. +- `cell` - [array(array(double))] The cell parameters. Unit in Angstrom. +- `coordinate` - [array(array(double))] The coordinates of the atoms in the box after the simulation. +- `total_mag` , `absolute_mag` , `mag` - [double] The total magnetic moment; total absolute magnetic moment; and a list of magnetic moments for each atom, respectively. +- `scf_converge` - [bool] A boolean indicating whether the scf optimization has converged. +- `scf` - [array(object(str:double)] A list of each scf step, each item contains: + - `energy` - [double] The total energy. Unit in eV. + - `ediff` - [double] The energy difference between the current and previous step. Unit in eV. + - `drho` - [double] The charge density difference between the current and previous step. + - `time` - [double] The time used for the current step. Unit in seconds. + +## Final Structure +Parameters regarding the final converged results and the optimized geometry: + +- `energy` - [double] The final energy. +- `label` - [str] An array of atomic labels. +- `cell` - [array(array(double))] The resulting cell parameters. +- `coordinate` - [array(array(double))] The final atomic coordinates. +- `relax_converge` - [bool] A boolean indicating whether the geometry optimization has converged. +- `dos` - [array(array(array(double)))] The state energy, and the dimension is NSPIN\*NKPOINT\*NBAND. +- `dos_weight` - [array(array(array(double)))] The weight of each state, and the dimension is same as `dos`. \ No newline at end of file diff --git a/docs/community/faq.md b/docs/community/faq.md index 8daadb6492..e2a1cdee02 100644 --- a/docs/community/faq.md +++ b/docs/community/faq.md @@ -107,4 +107,8 @@ write(cs_stru, cs_atoms, format='abacus', pp=pp, basis=basis) ABACUS applies the density difference between two SCF steps (labeled as `DRHO` in the screen output) as the convergence criterion, which is considered as a more robust choice compared with the energy difference. `DRHO` is calculated via `DRHO = |rho(G)-rho_previous(G)|^2`. Note that the energy difference between two SCF steps (labed as `EDIFF`) is also printed out in the screen output. +**4. Why EDIFF is much slower than DRHO? + +For metaGGA calculations, it is normal because in addition to charge density, kinetic density also needs to be considered in metaGGA calculations. In this case, you can try set `mixing_tau = true`. If you find EDIFF is much slower than DRHO for non-metaGGA calculations, please start a new issue to us. + [back to top](#frequently-asked-questions) diff --git a/docs/quick_start/easy_install.md b/docs/quick_start/easy_install.md index 4089e303a3..de1f04989f 100644 --- a/docs/quick_start/easy_install.md +++ b/docs/quick_start/easy_install.md @@ -152,6 +152,7 @@ You can change the number after `-j` on your need: set to the number of CPU core ## Run If ABACUS is installed into a custom directory using `CMAKE_INSTALL_PREFIX`, please add it to your environment variable `PATH` to locate the correct executable. +*(Note: `my-install-dir` should be changed to the location of your installed abacus:`/home/your-path/abacus/bin/`.)* ```bash export PATH=/my-install-dir/:$PATH @@ -198,7 +199,9 @@ We also support [Gitpod](https://www.gitpod.io/): [Open in Gitpod](https://gitpo ## Install by conda -Conda is a package management system with a separated environment, not requiring system privileges. A pre-built ABACUS binary with all requirements is available at [conda-forge](https://anaconda.org/conda-forge/abacus). It supports advanced features including Libxc, LibRI, and DeePKS. Conda will install the GPU-supported version of ABACUS if a valid GPU driver is present. Please refer to [the advanced installation guide](../advanced/install.md) for more details. +Conda is a package management system with a separated environment, not requiring system privileges. +You can refer to [DeepModeling conda FAQ](https://docs.deepmodeling.com/faq/conda.html) for how to setup a conda environment. +A pre-built ABACUS binary with all requirements is available at [conda-forge](https://anaconda.org/conda-forge/abacus). It supports advanced features including Libxc, LibRI, and DeePKS. Conda will install the GPU-supported version of ABACUS if a valid GPU driver is present. Please refer to [the advanced installation guide](../advanced/install.md) for more details. ```bash # Install diff --git a/examples/tddft/Absoption_spectrum/H2_length/INPUT b/examples/tddft/Absoption_spectrum/H2_length/INPUT index b98601ed85..c012912709 100644 --- a/examples/tddft/Absoption_spectrum/H2_length/INPUT +++ b/examples/tddft/Absoption_spectrum/H2_length/INPUT @@ -26,12 +26,10 @@ md_tfirst 0 #Parameters (6.Efield Parameters) td_vext 1 -td_stype 1 +td_stype 0 td_tstart 1 td_tend 1000 -td_lcut1 0.01 -td_lcut2 0.99 td_vext_dire 3 3 td_ttype 0 0 diff --git a/examples/tddft/Absoption_spectrum/H2_vel/INPUT b/examples/tddft/Absoption_spectrum/H2_velocity/INPUT similarity index 89% rename from examples/tddft/Absoption_spectrum/H2_vel/INPUT rename to examples/tddft/Absoption_spectrum/H2_velocity/INPUT index c012912709..b98601ed85 100644 --- a/examples/tddft/Absoption_spectrum/H2_vel/INPUT +++ b/examples/tddft/Absoption_spectrum/H2_velocity/INPUT @@ -26,10 +26,12 @@ md_tfirst 0 #Parameters (6.Efield Parameters) td_vext 1 -td_stype 0 +td_stype 1 td_tstart 1 td_tend 1000 +td_lcut1 0.01 +td_lcut2 0.99 td_vext_dire 3 3 td_ttype 0 0 diff --git a/examples/tddft/Absoption_spectrum/H2_vel/KPT b/examples/tddft/Absoption_spectrum/H2_velocity/KPT similarity index 100% rename from examples/tddft/Absoption_spectrum/H2_vel/KPT rename to examples/tddft/Absoption_spectrum/H2_velocity/KPT diff --git a/examples/tddft/Absoption_spectrum/H2_vel/STRU b/examples/tddft/Absoption_spectrum/H2_velocity/STRU similarity index 100% rename from examples/tddft/Absoption_spectrum/H2_vel/STRU rename to examples/tddft/Absoption_spectrum/H2_velocity/STRU diff --git a/examples/tddft/Absoption_spectrum/H2_vel/run.sh b/examples/tddft/Absoption_spectrum/H2_velocity/run.sh similarity index 100% rename from examples/tddft/Absoption_spectrum/H2_vel/run.sh rename to examples/tddft/Absoption_spectrum/H2_velocity/run.sh diff --git a/python/pyabacus/CMakeLists.txt b/python/pyabacus/CMakeLists.txt index 95407531ea..903387ee9a 100644 --- a/python/pyabacus/CMakeLists.txt +++ b/python/pyabacus/CMakeLists.txt @@ -19,12 +19,26 @@ if(DEFINED ENV{MKLROOT} AND NOT DEFINED MKLROOT) set(MKLROOT "$ENV{MKLROOT}") endif() if(MKLROOT) + + set(ENABLE_MPI ON) + if (ENABLE_MPI) + find_package(MPI REQUIRED) + include_directories(${MPI_CXX_INCLUDE_PATH}) + #add_compile_definitions(__MPI) + endif() + + set(USE_OPENMP ON) + if(USE_OPENMP) + find_package(OpenMP REQUIRED) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") + add_link_options(${OpenMP_CXX_LIBRARIES}) + endif() find_package(IntelMKL REQUIRED) add_definitions(-D__MKL) include_directories(${MKL_INCLUDE_DIRS} ${MKL_INCLUDE_DIRS}/fftw) - # Since libtorch will find its own MKL, the fftw part conflicts with the original one. - # When enable deepks, mkl will be linked within ${TORCH_LIBRARIES}. +# Since libtorch will find its own MKL, the fftw part conflicts with the original one. +# When enable deepks, mkl will be linked within ${TORCH_LIBRARIES}. if(NOT ENABLE_DEEPKS) list(APPEND math_libs IntelMKL::MKL) endif() @@ -38,7 +52,7 @@ else() find_package(LAPACK REQUIRED) include_directories(${FFTW3_INCLUDE_DIRS}) message(STATUS "FFTW3_INCLUDE_DIRS: ${FFTW3_INCLUDE_DIRS}") - list(APPEND math_libs FFTW3::FFTW3 LAPACK::LAPACK) + list(APPEND math_libs FFTW3::FFTW3 LAPACK::LAPACK) if(ENABLE_LCAO) find_package(ScaLAPACK REQUIRED) @@ -74,21 +88,32 @@ list(APPEND _naos ${NAO_PATH}/two_center_bundle.cpp ${NAO_PATH}/two_center_integrator.cpp ${NAO_PATH}/two_center_table.cpp + ${NAO_PATH}/projgen.cpp # dependency ${ABACUS_SOURCE_DIR}/module_base/kernels/math_op.cpp ${ABACUS_SOURCE_DIR}/module_psi/kernels/psi_memory_op.cpp - ${ABACUS_SOURCE_DIR}/module_io/output_radial.cpp ) add_library(naopack SHARED ${_naos} ) # link math_libs -target_link_libraries(naopack +if(MKLROOT) + target_link_libraries(naopack base container orb ${math_libs} -) + MPI::MPI_CXX + OpenMP::OpenMP_CXX + ) +else() + target_link_libraries(naopack + base + container + orb + ${math_libs} + ) +endif() # list(APPEND _sources ${_naos} ${_bases}) list(APPEND _sources ${PROJECT_SOURCE_DIR}/src/py_abacus.cpp diff --git a/python/pyabacus/README.md b/python/pyabacus/README.md index 533b35204c..dc9a533613 100644 --- a/python/pyabacus/README.md +++ b/python/pyabacus/README.md @@ -11,7 +11,7 @@ Installation - Create and activate a new conda env, e.g. `conda create -n myenv python=3.8 & conda activate myenv`. - Clone ABACUS main repository and `cd abacus-develop/python/pyabacus`. -- Build pyabacus by `pip install -v .` or install test dependencies & build pyabacus by `pip install .[test]`. (Use `pip install -r .[test] -i https://pypi.tuna.tsinghua.edu.cn/simple` to accelerate installation process.) +- Build pyabacus by `pip install -v .` or install test dependencies & build pyabacus by `pip install .[test]`. (Use `pip install -v .[test] -i https://pypi.tuna.tsinghua.edu.cn/simple` to accelerate installation process.) CI Examples @@ -21,12 +21,23 @@ There are examples for CI in `.github/workflows`. A simple way to produces binary "wheels" for all platforms is illustrated in the "wheels.yml" file, using [`cibuildwheel`][]. -Use `pytest` to run all the unit tests for pyabacus in the local machine. +Use `pytest -v` to run all the unit tests for pyabacus in the local machine. +```shell +$ cd tests/ +$ pytest -v +``` + +Run `python vis_nao.py` to visualize the numerical orbital. +```shell +$ cd examples/ +$ python vis_nao.py +``` -Run `python test_m_nao.py` in `tests` to check the S matrix. +Run `python ex_s_rotate.py` in `examples` to check the S matrix. ```shell -$ python test_m_nao.py +$ cd examples/ +$ python ex_s_rotate.py norm(S_e3 - S_numer) = 3.341208104032616e-15 ``` diff --git a/python/pyabacus/examples/ex_s_rotate.py b/python/pyabacus/examples/ex_s_rotate.py new file mode 100644 index 0000000000..0890a06635 --- /dev/null +++ b/python/pyabacus/examples/ex_s_rotate.py @@ -0,0 +1,99 @@ +from __future__ import annotations + +# import pytest +from pyabacus import ModuleNAO as nao +from pyabacus import ModuleBase as base +import numpy as np + +import copy +from indexmap import _index_map +from wigner_real import R, wigner_d_real + +import matplotlib.pyplot as plt + +orb_dir = '../../../tests/PP_ORB/' +file_list = ['H_gga_8au_100Ry_2s1p.orb', 'O_gga_10au_100Ry_2s2p1d.orb'] + +file_list = [orb_dir + orbfile for orbfile in file_list ] +nfile = len(file_list) + +orb = nao.RadialCollection() +orb.build(nfile, file_list, 'o') +sbt = base.SphericalBesselTransformer() +orb.set_transformer(sbt) + +rmax = orb.rcut_max * 2.0 +dr = 0.01 +nr = int(rmax / dr) + 1 + +orb.set_uniform_grid(True, nr, rmax, 'i', True) +S_intor = nao.TwoCenterIntegrator() +S_intor.tabulate(orb, orb, 'S', nr, rmax) +vR = np.array([1.0,0,0]).astype(np.float64) +#out = S_intor.calculate(1, 1, 0, 1, 0, 1, 0, 1, vR)[0] +#print(out) + +comp2mu, mu2comp = _index_map(2, [2, 1], [1, 2], [[2,1], [2,2,1]]) +#print(comp2mu, mu2comp) + +nao = len(comp2mu.items()) + +coord = [ + [ + np.array([-12.081531451316582,16.463368531712373,10.304287878967891]), + np.array([ -12.056180479123837,19.25408045699522,10.010554611214044]) + ], + [ + np.array([-13.1930046246741,17.91132430713516,10.440289103003526]) + ] + ] + + +S = np.zeros((nao, nao)) +for mu in range(nao): + itype1, iatom1, l1, zeta1, m1 = mu2comp[mu] + for nu in range(nao): + itype2, iatom2, l2, zeta2, m2 = mu2comp[nu] + vR = coord[itype2][iatom2] - coord[itype1][iatom1] + S[mu, nu] = S_intor.calculate(itype1, l1, zeta1, m1, itype2, l2, zeta2, m2, vR)[0] + + +S_prerot = np.copy(S) +coord_pre = copy.deepcopy(coord) + +val_pre, vec_pre = np.linalg.eigh(S_prerot) + +# random rotation +alpha = np.random.rand() * 2 * np.pi +beta = np.random.rand() * np.pi +gamma = np.random.rand() * 2 * np.pi +Rmat = R(alpha, beta, gamma) + +for coord_type in coord: + for i in range(len(coord_type)): + coord_type[i] = Rmat @ coord_type[i] + +D = np.zeros((nao, nao)) +mu = 0 +while mu < nao: + itype, iatom, l, zeta, m = mu2comp[mu] + D[mu:mu+2*l+1, mu:mu+2*l+1] = wigner_d_real(l, alpha, beta, gamma) + mu += 2*l+1 + +S_e3 = D @ S_prerot @ D.T # overlap matrix after rotation (by angular momentum theory) + +# numerical evaluation of S_e3 by two-center integrals +S = np.zeros((nao, nao)) +for mu in range(nao): + itype1, iatom1, l1, zeta1, m1 = mu2comp[mu] + for nu in range(nao): + itype2, iatom2, l2, zeta2, m2 = mu2comp[nu] + vR = coord[itype2][iatom2] - coord[itype1][iatom1] + S[mu, nu] = S_intor.calculate(itype1, l1, zeta1, m1, itype2, l2, zeta2, m2, vR)[0] + +val, vec = np.linalg.eigh(S) + +#print('S eigval diff: ', np.linalg.norm(val-val_pre, np.inf)) +print('norm(S_e3 - S_numer) = ', np.linalg.norm(S_e3 - S, np.inf)) + + diff --git a/python/pyabacus/tests/indexmap.py b/python/pyabacus/examples/indexmap.py similarity index 100% rename from python/pyabacus/tests/indexmap.py rename to python/pyabacus/examples/indexmap.py diff --git a/python/pyabacus/examples/vis_nao.py b/python/pyabacus/examples/vis_nao.py new file mode 100644 index 0000000000..ea2c98d0d0 --- /dev/null +++ b/python/pyabacus/examples/vis_nao.py @@ -0,0 +1,73 @@ +from pyabacus import ModuleNAO as nao +import numpy as np +from scipy.special import sph_harm +from scipy.interpolate import CubicSpline + +import matplotlib.pyplot as plt +import plotly.graph_objects as go + +def real_sph_harm(l, m, polar, azimuth): + if m > 0: + return np.sqrt(2) * np.real(sph_harm(m, l, azimuth, polar)) + elif m < 0: + return np.sqrt(2) * np.imag(sph_harm(m, l, azimuth, polar)) + else: + return np.real(sph_harm(m, l, azimuth, polar)) + + +def cart2sph(x, y, z): + r = np.sqrt(x**2 + y**2 + z**2) + polar = np.arccos(z/r) + azimuth = np.arctan2(y, x) + return r, polar, azimuth + +def orbital_plot(orb, itype, l, zeta, m): + chi = orb(itype, l, zeta) + + # 3d mesh grid + w = 3 + ngrid = 40 + x, y, z = np.mgrid[-w:w:ngrid*1j, -w:w:ngrid*1j, -w:w:ngrid*1j] + + x = x.flatten() + y = y.flatten() + z = z.flatten() + + # orbital value on grid + value = np.zeros_like(x) + + chi_spline = CubicSpline(chi.rgrid, chi.rvalue) + for i in range(ngrid**3): + r, polar, azimuth = cart2sph(x[i], y[i], z[i]) + if r < chi.rcut: + value[i] = chi_spline(r) * real_sph_harm(l, m, polar, azimuth) + + # plot + fig = go.Figure(data=go.Volume( + x=x, + y=y, + z=z, + value=value, + isomin=-0.2, + isomax=0.2, + opacity=0.1, # needs to be small to see through all surfaces + surface_count=20, # needs to be a large number for good volume rendering + )) + fig.show() + +if __name__ == '__main__': + + orb_dir = '../../../tests/PP_ORB/' + file_list = ['H_gga_8au_100Ry_2s1p.orb', 'O_gga_10au_100Ry_2s2p1d.orb'] + file_list = [orb_dir + orbfile for orbfile in file_list ] + nfile = len(file_list) + + # set parameters + l = 1 + zeta = 0 + m = 0 + itype = 0 + orb = nao.RadialCollection() + orb.build(nfile, file_list, 'o') + + orbital_plot(orb, itype, l, zeta, m) diff --git a/python/pyabacus/tests/wigner_real.py b/python/pyabacus/examples/wigner_real.py similarity index 100% rename from python/pyabacus/tests/wigner_real.py rename to python/pyabacus/examples/wigner_real.py diff --git a/python/pyabacus/pyproject.toml b/python/pyabacus/pyproject.toml index ce11b20344..85bd47833c 100644 --- a/python/pyabacus/pyproject.toml +++ b/python/pyabacus/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ ] [project.optional-dependencies] -test = ["contourpy","cycler","exceptiongroup","fonttools","importlib-metadata","importlib-resources","iniconfig","kiwisolver","matplotlib","mpmath","numpy","packaging","pillow","platformdirs","pluggy","pyparsing","pytest","python-dateutil","six","stylize","sympy","tomli","yapf","zipp"] +test = ["contourpy","cycler","exceptiongroup","fonttools","importlib-metadata","importlib-resources","iniconfig","kiwisolver","matplotlib","mpmath","numpy","packaging","pillow","platformdirs","pluggy","pyparsing","pytest","python-dateutil","six","stylize","sympy","tomli","yapf","zipp", "scipy", "plotly"] [tool.scikit-build] diff --git a/python/pyabacus/src/py_abacus.cpp b/python/pyabacus/src/py_abacus.cpp index 52d87d8940..9313323593 100644 --- a/python/pyabacus/src/py_abacus.cpp +++ b/python/pyabacus/src/py_abacus.cpp @@ -8,6 +8,7 @@ void bind_m_nao(py::module& m); PYBIND11_MODULE(_core, m) { + m.doc() = "Python extension for ABACUS built with pybind11 and scikit-build."; bind_base_math(m); bind_m_nao(m); } \ No newline at end of file diff --git a/python/pyabacus/src/py_m_nao.cpp b/python/pyabacus/src/py_m_nao.cpp index 5fd53e5e72..826f11369e 100644 --- a/python/pyabacus/src/py_m_nao.cpp +++ b/python/pyabacus/src/py_m_nao.cpp @@ -1,9 +1,10 @@ #include #include #include + +#include "module_base/vector3.h" #include "module_basis/module_nao/radial_collection.h" #include "module_basis/module_nao/two_center_integrator.h" -#include "module_base/vector3.h" namespace py = pybind11; using namespace pybind11::literals; @@ -14,29 +15,73 @@ void bind_m_nao(py::module& m) { // Create the submodule for Module NAO py::module m_nao = m.def_submodule("ModuleNAO"); + m_nao.doc() = "Module for Numerical Atomic Orbitals (NAO) in ABACUS"; // Bind the RadialCollection class py::class_(m_nao, "RadialCollection") - .def(py::init<>()) - .def("build", [](RadialCollection& self, int nfile, const py::list &file_list, char ftype){ - std::vector files; - files.reserve(nfile); - for (auto file : file_list) - { - files.push_back(file.cast()); - } - self.build(nfile, files.data(), ftype); - }, "nfile"_a, "file_list"_a, "ftype"_a = '\0') - .def("set_transformer", &RadialCollection::set_transformer, "sbt"_a, "update"_a = 0) - .def("set_uniform_grid", &RadialCollection::set_uniform_grid, "for_r_space"_a, "ngrid"_a, "cutoff"_a, "mode"_a = 'i', "enable_fft"_a = false) - .def("set_grid", [](RadialCollection& self, const bool for_r_space, const int ngrid, py::array_t grid, const char mode = 'i'){ - py::buffer_info grid_info = grid.request(); - if (grid_info.ndim != 1) - { - throw std::runtime_error("Input array must be 1-dimensional"); - } - self.set_grid(for_r_space, ngrid, static_cast(grid_info.ptr), mode); - }, "for_r_space"_a, "ngrid"_a, "grid"_a, "mode"_a = 'i') + .def(py::init<>(), R"pbdoc( + A class that holds all numerical radial functions of the same kind. + + An instance of this class could be the collection of all radial functions + of numerical atomic orbitals, or all Kleinman-Bylander beta functions from + all elements involved in a calculation. + )pbdoc") + .def( + "build", + [](RadialCollection& self, int nfile, const py::list& file_list, char ftype) { + std::vector files; + files.reserve(nfile); + for (auto file: file_list) + { + files.push_back(file.cast()); + } + self.build(nfile, files.data(), ftype); + }, + "Builds the collection from (orbital) files", + "nfile"_a, + "file_list"_a, + "ftype"_a = '\0') + .def("set_transformer", + &RadialCollection::set_transformer, + "Sets a spherical Bessel transformers for all RadialSet objects.", + "sbt"_a, + "update"_a = 0) + .def("set_uniform_grid", + &RadialCollection::set_uniform_grid, + "Sets a common uniform grid for all RadialSet objects", + "for_r_space"_a, + "ngrid"_a, + "cutoff"_a, + "mode"_a = 'i', + "enable_fft"_a = false) + .def( + "set_grid", + [](RadialCollection& self, + const bool for_r_space, + const int ngrid, + py::array_t grid, + const char mode = 'i') { + py::buffer_info grid_info = grid.request(); + if (grid_info.size != ngrid) + { + throw std::runtime_error("grid array must be of size ngrid"); + } + self.set_grid(for_r_space, ngrid, static_cast(grid_info.ptr), mode); + }, + "Sets a common grid for all RadialSet objects", + "for_r_space"_a, + "ngrid"_a, + "grid"_a, + "mode"_a = 'i') + .def( + "__call__", + [](RadialCollection& self, const int itype, const int l, const int izeta) -> const NumericalRadial& { + return self(itype, l, izeta); + }, + py::return_value_policy::reference_internal, + "itype"_a, + "l"_a, + "izeta"_a) // Getters .def("symbol", &RadialCollection::symbol, "itype"_a) .def_property_readonly("ntype", &RadialCollection::ntype) @@ -46,54 +91,406 @@ void bind_m_nao(py::module& m) .def_property_readonly("rcut_max", overload_cast_<>()(&RadialCollection::rcut_max, py::const_)) .def("nzeta", &RadialCollection::nzeta, "itype"_a, "l"_a) .def("nzeta_max", overload_cast_()(&RadialCollection::nzeta_max, py::const_), "itype"_a) - .def_property_readonly("nzeta_max", overload_cast_<>()(&RadialCollection::nzeta_max, py::const_)) + .def("nzeta_max", overload_cast_<>()(&RadialCollection::nzeta_max, py::const_)) .def("nchi", overload_cast_()(&RadialCollection::nchi, py::const_), "itype"_a) - .def_property_readonly("nchi", overload_cast_<>()(&RadialCollection::nchi, py::const_)); - //Bind the TwoCenterIntegrator class + .def("nchi", overload_cast_<>()(&RadialCollection::nchi, py::const_)); + // Bind the TwoCenterIntegrator class py::class_(m_nao, "TwoCenterIntegrator") - .def(py::init<>()) - .def("tabulate", &TwoCenterIntegrator::tabulate, "bra"_a, "ket"_a, "op"_a, "nr"_a, "cutoff"_a) - .def("calculate", [](TwoCenterIntegrator& self, const int itype1, const int l1, const int izeta1, const int m1, const int itype2, const int l2, const int izeta2, const int m2, py::array_t pvR, bool cal_grad = false) - { - py::buffer_info pvR_info = pvR.request(); - if (pvR_info.size != 3) - { - throw std::runtime_error("Radial part must have 3 elements"); - } - double* cvR = static_cast(pvR_info.ptr); - ModuleBase::Vector3 vR(cvR[0], cvR[1], cvR[2]); - double out[1] = {0.0}; - double* grad_out = nullptr; - if (cal_grad) - { - grad_out = new double[3]; - } - self.calculate(itype1, l1, izeta1, m1, itype2, l2, izeta2, m2, vR, out, grad_out); - py::array_t out_array({1}, out); - if (cal_grad) - { - py::array_t grad_out_array({3}, grad_out); - return py::make_tuple(out_array, grad_out_array); - } - else - { - py::array_t grad_out_array({0}); - return py::make_tuple(out_array, grad_out_array); - } - - }, "itype1"_a, "l1"_a, "izeta1"_a, "m1"_a, "itype2"_a, "l2"_a, "izeta2"_a, "m2"_a, "pvR"_a, "cal_grad"_a = false) - .def("snap", [](TwoCenterIntegrator& self, const int itype1, const int l1, const int izeta1, const int m1, const int itype2, py::array_t pvR, const bool deriv){ - py::buffer_info pvR_info = pvR.request(); - if (pvR_info.size != 3) - { - throw std::runtime_error("Radial part must have 3 elements"); - } - double* cvR = static_cast(pvR_info.ptr); - ModuleBase::Vector3 vR(cvR[0], cvR[1], cvR[2]); - // TODO: check deriv & out memory allocation - std::vector> out; - self.snap(itype1, l1, izeta1, m1, itype2, vR, deriv, out); - return out; - }, "itype1"_a, "l1"_a, "izeta1"_a, "m1"_a, "itype2"_a, "pvR"_a, "deriv"_a = false); - + .def(py::init<>(), R"pbdoc( + A class to compute two-center integrals. + + This class computes two-center integrals of the form: + + / + I(R) = | dr phi1(r) (op) phi2(r - R) + / + + as well as their gradients, where op is 1 (overlap) or minus Laplacian (kinetic), and phi1, + phi2 are "atomic-orbital-like" functions of the form: + + phi(r) = chi(|r|) * Ylm(r/|r|) + + where chi is some numerical radial function and Ylm is some real spherical harmonics. + + This class is designed to efficiently compute the two-center integrals + between two "collections" of the above functions with various R, e.g., the + overlap integrals between all numerical atomic orbitals and all + Kleinman-Bylander nonlocal projectors, the overlap & kinetic integrals between all numerical atomic orbitals, etc. + This is done by tabulating the radial part of the integrals on an r-space grid and the real Gaunt coefficients in advance. + )pbdoc") + .def("tabulate", + &TwoCenterIntegrator::tabulate, + R"pbdoc( + Tabulates the radial part of a two-center integral. + + Parameters: + bra (RadialFunctions): The radial functions of the first collection. + ket (RadialFunctions): The radial functions of the second collection. + op (char): Operator, could be 'S' (overlap) or 'T' (kinetic). + nr (int): Number of r-space grid points. + cutoff (float): r-space cutoff radius. + )pbdoc", + "bra"_a, + "ket"_a, + "op"_a, + "nr"_a, + "cutoff"_a) + .def( + "calculate", + [](TwoCenterIntegrator& self, + const int itype1, + const int l1, + const int izeta1, + const int m1, + const int itype2, + const int l2, + const int izeta2, + const int m2, + py::array_t pvR, + bool cal_grad = false) { + py::buffer_info pvR_info = pvR.request(); + if (pvR_info.size != 3) + { + throw std::runtime_error("Radial part must have 3 elements"); + } + double* cvR = static_cast(pvR_info.ptr); + ModuleBase::Vector3 vR(cvR[0], cvR[1], cvR[2]); + double out[1] = {0.0}; + double* grad_out = nullptr; + if (cal_grad) + { + grad_out = new double[3]; + } + self.calculate(itype1, l1, izeta1, m1, itype2, l2, izeta2, m2, vR, out, grad_out); + py::array_t out_array(1, out); + if (cal_grad) + { + py::array_t grad_out_array(3, grad_out); + return py::make_tuple(out_array, grad_out_array); + } + else + { + py::array_t grad_out_array(0); + return py::make_tuple(out_array, grad_out_array); + } + }, + R"pbdoc( + Compute the two-center integrals. + + This function calculates the two-center integral + + / + I(R) = | dr phi1(r) (op_) phi2(r - R) + / + + or its gradient by using the tabulated radial part and real Gaunt coefficients. + + Parameters + ---------- + itype1 : int + Element index of orbital 1. + l1 : int + Angular momentum of orbital 1. + izeta1 : int + Zeta number of orbital 1. + m1 : int + Magnetic quantum number of orbital 1. + itype2 : int + Element index of orbital 2. + l2 : int + Angular momentum of orbital 2. + izeta2 : int + Zeta number of orbital 2. + m2 : int + Magnetic quantum number of orbital 2. + pvR : array_like + R2 - R1, the displacement vector between the two centers. + cal_grad : bool, optional + The gradient will not be computed if cal_grad is false. + + Returns + ------- + out_array : array_like + The two-center integral. + grad_out_array : array_like + Gradient of the two-center integral. + )pbdoc", + "itype1"_a, + "l1"_a, + "izeta1"_a, + "m1"_a, + "itype2"_a, + "l2"_a, + "izeta2"_a, + "m2"_a, + "pvR"_a, + "cal_grad"_a = false) + .def( + "snap", + [](TwoCenterIntegrator& self, + const int itype1, + const int l1, + const int izeta1, + const int m1, + const int itype2, + py::array_t pvR, + const bool deriv) { + py::buffer_info pvR_info = pvR.request(); + if (pvR_info.size != 3) + { + throw std::runtime_error("Radial part must have 3 elements"); + } + double* cvR = static_cast(pvR_info.ptr); + ModuleBase::Vector3 vR(cvR[0], cvR[1], cvR[2]); + // TODO: check deriv & out memory allocation + std::vector> out; + self.snap(itype1, l1, izeta1, m1, itype2, vR, deriv, out); + return out; + }, + R"pbdoc( + Compute a batch of two-center integrals. + + This function calculates the two-center integrals (and optionally their gradients) + between one orbital and all orbitals of a certain type from the other collection. + )pbdoc", + "itype1"_a, + "l1"_a, + "izeta1"_a, + "m1"_a, + "itype2"_a, + "pvR"_a, + "deriv"_a = false); + // Bind the NumericalRadial class + py::class_(m_nao, "NumericalRadial") + .def(py::init<>(), R"pbdoc( + A class that represents a numerical radial function. + + This class is designed to be the container for the radial part of numerical atomic orbitals, Kleinman-Bylander beta functions, and all other similar numerical radial functions in three-dimensional space, each of which is associated with some angular momentum l and whose r and k space values are related by an l-th order spherical Bessel transform. + + A NumericalRadial object can be initialized by "build", which requires the angular momentum, the number of grid points, the grid and the corresponding values. Grid does not have to be uniform. One can initialize the object in either r or k space. After initialization, one can set the + grid in the other space via set_grid or set_uniform_grid. Values in the other space are automatically computed by a spherical Bessel transform. + )pbdoc") + .def( + "build", + [](NumericalRadial& self, + const int l, + const bool for_r_space, + const int ngrid, + py::array_t grid, + py::array_t value, + const int p = 0, + const int izeta = 0, + const std::string symbol = "", + const int itype = 0, + const bool init_sbt = true) { + py::buffer_info grid_info = grid.request(); + py::buffer_info value_info = value.request(); + if (grid_info.size != ngrid) + { + throw std::runtime_error("grid array must be of size ngrid"); + } + self.build(l, + for_r_space, + ngrid, + static_cast(grid_info.ptr), + static_cast(value_info.ptr), + p, + izeta, + symbol, + itype, + init_sbt); + }, + R"pbdoc( + Initializes the object by providing the grid & values in one space. + + Parameters + ---------- + l : int + Angular momentum. + for_r_space : bool + Specifies whether the input corresponds to r or k space. + ngrid : int + Number of grid points. + grid : array_like + Grid points, must be positive & strictly increasing. + value : array_like + Values on the grid. + p : float + Implicit exponent in input values, see pr_ & pk_. + izeta : int + Multiplicity index of radial functions of the same itype and l. + symbol : str + Chemical symbol. + itype : int + Index for the element in calculation. + init_sbt : bool + If true, internal SphericalBesselTransformer will be initialized. + + Notes + ----- + init_sbt is only useful when the internal SphericalBesselTransformer (sbt_) is null-initialized; The function will NOT reset sbt_ if it is already usable. + )pbdoc", + "l"_a, + "for_r_space"_a, + "ngrid"_a, + "grid"_a, + "value"_a, + "p"_a = 0, + "izeta"_a = 0, + "symbol"_a = "", + "itype"_a = 0, + "init_sbt"_a = true) + .def("set_transformer", + &NumericalRadial::set_transformer, + R"pbdoc( + Sets a SphericalBesselTransformer. + + By default, the class uses an internal SphericalBesselTransformer, but one can optionally use a shared one. This could be beneficial when there are a lot of NumericalRadial objects whose grids have the same size. + + Parameters + ---------- + sbt : SphericalBesselTransformer + An external transformer. + update : int + Specifies whether and how values are recomputed with the new transformer. + Accepted values are: + * 0: does not recompute values; + * 1: calls a forward transform; + * -1: calls a backward transform. + )pbdoc", + "sbt"_a, + "update"_a = 0) + .def( + "set_grid", + [](NumericalRadial& self, + const bool for_r_space, + const int ngrid, + py::array_t grid, + const char mode = 'i') { + py::buffer_info grid_info = grid.request(); + if (grid_info.size != ngrid) + { + throw std::runtime_error("grid array must be of size ngrid"); + } + self.set_grid(for_r_space, ngrid, static_cast(grid_info.ptr), mode); + }, + R"pbdoc( + Sets up a grid. + + This function can be used to set up the grid which is absent in "build" (in which case values on the new grid are automatically computed by a spherical Bessel transform) or interpolate on an existing grid to a new grid. + + Parameters + ---------- + for_r_space : bool + Specifies whether to set grid for the r or k space. + ngrid : int + Number of grid points. + grid : array_like + Grid points, must be positive & strictly increasing. + mode : char + Specifies how values are updated, could be 'i' or 't': + - 'i': New values are obtained by interpolating and zero-padding + the existing values from current space. With this option, + it is an error if the designated space does not have a grid; + - 't': New values are obtained via transform from the other space. + With this option, it is an error if the other space does not + have a grid. + )pbdoc", + "for_r_space"_a, + "ngrid"_a, + "grid"_a, + "mode"_a = 'i') + .def("set_uniform_grid", + &NumericalRadial::set_uniform_grid, + R"pbdoc( + Sets up a uniform grid. + + The functionality of this function is similar to set_grid, except that the new grid is a uniform grid specified by the cutoff and the number of grid points, which are calculated as: + + grid[i] = i * (cutoff / (ngrid - 1)) + + Parameters + ---------- + for_r_space : bool + Specifies whether to set grid for the r or k space. + ngrid : int + Number of grid points. + cutoff : float + The maximum value of the grid, which determines the grid spacing. + enable_fft : bool + If true, this function will not only set up the grid & values in the designated space, but also sets the grid in the other space such that the r & k grids are FFT-compliant (and updates values via a FFT-based spherical Bessel transform). + mode : char + Specifies how values are updated, could be 'i' or 't'. + )pbdoc", + "for_r_space"_a, + "ngrid"_a, + "cutoff"_a, + "mode"_a = 'i', + "enable_fft"_a = false) + .def( + "set_value", + [](NumericalRadial& self, const bool for_r_space, py::array_t value, const int p) { + py::buffer_info value_info = value.request(); + self.set_value(for_r_space, static_cast(value_info.ptr), p); + }, + R"pbdoc( + Updates values on an existing grid. + + This function does not alter the grid; it merely updates values on the existing grid. The number of values to read from "value" is determined by the current number of points in the r or k space (nr_ or nk_). Values of the other space will be automatically updated if they exist. + + Warning + ------- + This function does not check the index bound; use with care! + )pbdoc", + "for_r_space"_a, + "value"_a, + "p"_a) + .def("wipe", &NumericalRadial::wipe, "r_space"_a = true, "k_space"_a = true) + .def("normalize", + &NumericalRadial::normalize, + R"pbdoc( + Normalizes the radial function. + + The radial function is normalized such that the integral of the square of the function multiplied by the square of the radial coordinate over the entire space is equal to one: + + ∫ from 0 to +∞ of (x^2 * f(x)^2) dx = 1 + + where x is r or k. The integral is evaluated with Simpson's rule. Values in the other space are updated automatically via a spherical Bessel transform. + )pbdoc", + "for_r_space"_a = true) + // Getters + .def_property_readonly("symbol", &NumericalRadial::symbol) + .def_property_readonly("itype", &NumericalRadial::itype) + .def_property_readonly("izeta", &NumericalRadial::izeta) + .def_property_readonly("l", &NumericalRadial::l) + .def_property_readonly("nr", &NumericalRadial::nr) + .def_property_readonly("nk", &NumericalRadial::nk) + .def_property_readonly("rcut", &NumericalRadial::rcut) + .def_property_readonly("kcut", &NumericalRadial::kcut) + .def_property_readonly("rmax", &NumericalRadial::rmax) + .def_property_readonly("kmax", &NumericalRadial::kmax) + .def_property_readonly("pr", &NumericalRadial::pr) + .def_property_readonly("pk", &NumericalRadial::pk) + .def_property_readonly("sbt", &NumericalRadial::sbt) + .def_property_readonly("rgrid", + [](NumericalRadial& self) { + const double* rgrid = self.rgrid(); + return py::array_t(self.nr(), rgrid); + }) + .def_property_readonly("kgrid", + [](NumericalRadial& self) { + const double* kgrid = self.kgrid(); + return py::array_t(self.nk(), kgrid); + }) + .def_property_readonly("rvalue", + [](NumericalRadial& self) { + const double* rvalue = self.rvalue(); + return py::array_t(self.nr(), rvalue); + }) + .def_property_readonly("kvalue", + [](NumericalRadial& self) { + const double* kvalue = self.kvalue(); + return py::array_t(self.nk(), kvalue); + }) + .def_property_readonly("is_fft_compliant", overload_cast_<>()(&NumericalRadial::is_fft_compliant, py::const_)); } \ No newline at end of file diff --git a/python/pyabacus/src/pyabacus/__init__.py b/python/pyabacus/src/pyabacus/__init__.py index f20598fbea..e3776b1616 100644 --- a/python/pyabacus/src/pyabacus/__init__.py +++ b/python/pyabacus/src/pyabacus/__init__.py @@ -1,4 +1,3 @@ from __future__ import annotations -# from ._core import __doc__, __version__, NumericalRadial, ModuleBase from ._core import ModuleBase, ModuleNAO __all__ = ["ModuleBase", "ModuleNAO"] \ No newline at end of file diff --git a/python/pyabacus/tests/test_base_math.py b/python/pyabacus/tests/test_base_math.py index 671d10edc8..1d5190521f 100644 --- a/python/pyabacus/tests/test_base_math.py +++ b/python/pyabacus/tests/test_base_math.py @@ -1,19 +1,19 @@ from __future__ import annotations import pytest -from pyabacus import ModuleBase as m +from pyabacus import ModuleBase as base import numpy as np def test_sphbes(): - s = m.Sphbes() + s = base.Sphbes() # test for sphbesj assert s.sphbesj(1, 0.0) == 0.0 assert s.sphbesj(0, 0.0) == 1.0 def test_sbt(): - sbt = m.SphericalBesselTransformer() + sbt = base.SphericalBesselTransformer() @pytest.fixture def simpson_setup(): @@ -25,7 +25,7 @@ def simpson_setup(): def test_simpson(simpson_setup): n, func, dx= simpson_setup - s = m.Integral() + s = base.Integral() assert s.simpson(n, func, dx) == pytest.approx(0, abs=1e-10) diff --git a/python/pyabacus/tests/test_m_nao.py b/python/pyabacus/tests/test_m_nao.py index 0890a06635..0d4c908d68 100644 --- a/python/pyabacus/tests/test_m_nao.py +++ b/python/pyabacus/tests/test_m_nao.py @@ -1,99 +1,83 @@ from __future__ import annotations -# import pytest +import pytest from pyabacus import ModuleNAO as nao from pyabacus import ModuleBase as base import numpy as np -import copy -from indexmap import _index_map -from wigner_real import R, wigner_d_real - -import matplotlib.pyplot as plt - -orb_dir = '../../../tests/PP_ORB/' -file_list = ['H_gga_8au_100Ry_2s1p.orb', 'O_gga_10au_100Ry_2s2p1d.orb'] - -file_list = [orb_dir + orbfile for orbfile in file_list ] -nfile = len(file_list) - -orb = nao.RadialCollection() -orb.build(nfile, file_list, 'o') -sbt = base.SphericalBesselTransformer() -orb.set_transformer(sbt) - -rmax = orb.rcut_max * 2.0 -dr = 0.01 -nr = int(rmax / dr) + 1 - -orb.set_uniform_grid(True, nr, rmax, 'i', True) -S_intor = nao.TwoCenterIntegrator() -S_intor.tabulate(orb, orb, 'S', nr, rmax) -vR = np.array([1.0,0,0]).astype(np.float64) -#out = S_intor.calculate(1, 1, 0, 1, 0, 1, 0, 1, vR)[0] -#print(out) - -comp2mu, mu2comp = _index_map(2, [2, 1], [1, 2], [[2,1], [2,2,1]]) -#print(comp2mu, mu2comp) - -nao = len(comp2mu.items()) - -coord = [ - [ - np.array([-12.081531451316582,16.463368531712373,10.304287878967891]), - np.array([ -12.056180479123837,19.25408045699522,10.010554611214044]) - ], - [ - np.array([-13.1930046246741,17.91132430713516,10.440289103003526]) - ] - ] - - -S = np.zeros((nao, nao)) -for mu in range(nao): - itype1, iatom1, l1, zeta1, m1 = mu2comp[mu] - for nu in range(nao): - itype2, iatom2, l2, zeta2, m2 = mu2comp[nu] - vR = coord[itype2][iatom2] - coord[itype1][iatom1] - S[mu, nu] = S_intor.calculate(itype1, l1, zeta1, m1, itype2, l2, zeta2, m2, vR)[0] - - -S_prerot = np.copy(S) -coord_pre = copy.deepcopy(coord) - -val_pre, vec_pre = np.linalg.eigh(S_prerot) - -# random rotation -alpha = np.random.rand() * 2 * np.pi -beta = np.random.rand() * np.pi -gamma = np.random.rand() * 2 * np.pi -Rmat = R(alpha, beta, gamma) - -for coord_type in coord: - for i in range(len(coord_type)): - coord_type[i] = Rmat @ coord_type[i] - -D = np.zeros((nao, nao)) -mu = 0 -while mu < nao: - itype, iatom, l, zeta, m = mu2comp[mu] - D[mu:mu+2*l+1, mu:mu+2*l+1] = wigner_d_real(l, alpha, beta, gamma) - mu += 2*l+1 - -S_e3 = D @ S_prerot @ D.T # overlap matrix after rotation (by angular momentum theory) - -# numerical evaluation of S_e3 by two-center integrals -S = np.zeros((nao, nao)) -for mu in range(nao): - itype1, iatom1, l1, zeta1, m1 = mu2comp[mu] - for nu in range(nao): - itype2, iatom2, l2, zeta2, m2 = mu2comp[nu] - vR = coord[itype2][iatom2] - coord[itype1][iatom1] - S[mu, nu] = S_intor.calculate(itype1, l1, zeta1, m1, itype2, l2, zeta2, m2, vR)[0] - -val, vec = np.linalg.eigh(S) - -#print('S eigval diff: ', np.linalg.norm(val-val_pre, np.inf)) -print('norm(S_e3 - S_numer) = ', np.linalg.norm(S_e3 - S, np.inf)) +def test_nr(): + l = 1 + dr = 0.01 + sz = 5000 + itype = 3 + pr = -1 + izeta = 5 + symbol = "Au" + grid = np.empty(sz, dtype=np.float64) + f = np.empty(sz, dtype=np.float64) + for i in range(sz): + r = i * dr + grid[i] = r + f[i] = np.exp(-r) + chi = nao.NumericalRadial() + chi.build(l, True, sz, grid, f, pr, izeta, symbol, itype) + assert chi.symbol == symbol + assert chi.izeta == izeta + assert chi.itype == itype + assert chi.l == l + assert chi.nr == sz + assert chi.nk == 0 + assert chi.rmax == grid[sz-1] + for i in range(sz): + assert(chi.rgrid[i] == grid[i]) + assert(chi.rvalue[i] == f[i]) + assert chi.pr == pr + assert chi.pk == 0 + assert chi.is_fft_compliant == False + +def test_rc(): + orb_dir = '../../../tests/PP_ORB/' + file_list = ["C_gga_8au_100Ry_2s2p1d.orb", "H_gga_8au_60Ry_2s1p.orb", "O_gga_10au_100Ry_2s2p1d.orb", "Fe_gga_9au_100Ry_4s2p2d1f.orb"] + file_list = [orb_dir + orbfile for orbfile in file_list] + nfile = len(file_list) + + orb = nao.RadialCollection() + orb.build(nfile, file_list, 'o') + + assert orb.symbol(0) == 'C' + assert orb.symbol(1) == 'H' + assert orb.symbol(2) == 'O' + assert orb.symbol(3) == 'Fe' + + assert orb.ntype == 4 + assert orb.lmax == 3 + assert orb.rcut_max == 10.0 + + assert orb.nzeta(0,0) == 2 + assert orb.nzeta(1,0) == 2 + assert orb.nzeta(2,0) == 2 + assert orb.nzeta(3,0) == 4 + + + assert orb.nzeta_max(0) == 2 + assert orb.nzeta_max(3) == 4 + + assert orb.nchi(0) == 5 + assert orb.nchi(3) == 9 + assert orb.nchi() == 22 + + # not support index RadialSet now + # support index NumericalRadial test + assert orb(0,0,0).l == 0 + assert orb(0,1,0).l == 1 + assert orb(0,1,1).l == 1 + assert orb(0,2,0).l == 2 + + + + + + + diff --git a/source/Makefile b/source/Makefile index bb9bb9e4d3..c9a6962bb8 100644 --- a/source/Makefile +++ b/source/Makefile @@ -10,6 +10,12 @@ LIBS = -lm -lpthread OPTS = -std=c++14 -pedantic -m64 ${INCLUDES} HONG = -D__LCAO HONG += -D__ELPA + +# An FFT-based spherical Bessel transform algorithm has become +# the default since v3.3.4. Comment out the following line to use +# the original Simpson-based spherical Bessel transform. +HONG += -DUSE_NEW_TWO_CENTER + ifeq ($(OPENMP), ON) ELPA_NAME = elpa_openmp else @@ -45,7 +51,8 @@ ifeq ($(DEBUG), ON) endif OPTS += -O0 -fsanitize=address -fno-omit-frame-pointer -Wall -g #It can check segmental defaults else - HONG += -Ofast -march=native -DNDEBUG + # FIXME -Ofast is not compatible with the new two-center integration algorithm + HONG += -O3 -march=native -DNDEBUG endif ifeq ($(INTEL), ON) diff --git a/source/Makefile.Objects b/source/Makefile.Objects index a71b0e8de7..45903f3a73 100644 --- a/source/Makefile.Objects +++ b/source/Makefile.Objects @@ -274,6 +274,7 @@ OBJS_HAMILT_LCAO=hamilt_lcao.o\ deepks_lcao.o\ op_exx_lcao.o\ sc_lambda_lcao.o\ + dftu_new.o\ OBJS_HCONTAINER=base_matrix.o\ atom_pair.o\ @@ -342,6 +343,7 @@ OBJS_ORBITAL=ORB_atomic.o\ two_center_bundle.o\ two_center_integrator.o\ two_center_table.o\ + projgen.o\ OBJS_PSI=psi.o\ psi_memory_op.o\ @@ -428,8 +430,9 @@ OBJS_IO=input.o\ restart.o\ binstream.o\ to_wannier90.o\ - to_qo.o\ - to_qo_tools.o\ + to_qo_kernel.o\ + to_qo_mpi.o\ + to_qo_structures.o\ to_wannier90_pw.o\ to_wannier90_lcao_in_pw.o\ to_wannier90_lcao.o\ @@ -453,6 +456,7 @@ OBJS_IO=input.o\ general_info.o\ init_info.o\ readin_info.o\ + output_info.o\ OBJS_IO_LCAO=cal_r_overlap_R.o\ write_orb_info.o\ @@ -492,6 +496,10 @@ OBJS_LCAO=DM_gamma.o\ FORCE_gamma_tvnl.o\ FORCE_gamma_vl.o\ FORCE_k.o\ + foverlap_k.o\ + ftvnl_dphi_k.o\ + fvl_dphi_k.o\ + fvnl_dbeta_k.o\ LCAO_gen_fixedH.o\ LCAO_hamilt.o\ LCAO_matrix.o\ diff --git a/source/driver_run.cpp b/source/driver_run.cpp index 5222be6aa5..de6cb18193 100644 --- a/source/driver_run.cpp +++ b/source/driver_run.cpp @@ -19,16 +19,16 @@ * Esolver::Run takes in a configuration and provides force and stress, * the configuration-changing subroutine takes force and stress and updates the configuration */ -void Driver::driver_run() +void Driver::driver_run(void) { ModuleBase::TITLE("Driver", "driver_line"); ModuleBase::timer::tick("Driver", "driver_line"); - // 1. Determine type of Esolver + //! 1: initialize the ESolver ModuleESolver::ESolver *p_esolver = nullptr; ModuleESolver::init_esolver(p_esolver); - // 2. Setup cell and atom information + //! 2: setup cell and atom information #ifndef __LCAO if(GlobalV::BASIS_TYPE == "lcao_in_pw" || GlobalV::BASIS_TYPE == "lcao") { @@ -37,30 +37,29 @@ void Driver::driver_run() #endif GlobalC::ucell.setup_cell(GlobalV::stru_file, GlobalV::ofs_running); - // 3. For these two types of calculations + //! 3: for these two types of calculations // nothing else need to be initialized - if(GlobalV::CALCULATION == "test_neighbour" || GlobalV::CALCULATION == "test_memory") + if(GlobalV::CALCULATION == "test_neighbour" + || GlobalV::CALCULATION == "test_memory") { - p_esolver->Run(0, GlobalC::ucell); + p_esolver->run(0, GlobalC::ucell); ModuleBase::QUIT(); } - // 4. Initialize Esolver,and fill json-structure - p_esolver->Init(INPUT, GlobalC::ucell); + //! 4: initialize Esolver and fill json-structure + p_esolver->init(INPUT, GlobalC::ucell); #ifdef __RAPIDJSON Json::gen_stru_wrapper(&GlobalC::ucell); #endif - //------------------------------------------------------------ - // This part onward needs to be refactored. - //---------------------------MD/Relax------------------------- + //! 5: md or relax calculations if(GlobalV::CALCULATION == "md") { Run_MD::md_line(GlobalC::ucell, p_esolver, INPUT.mdp); } - else // scf; cell relaxation; nscf; etc + else //! scf; cell relaxation; nscf; etc { if (GlobalV::precision_flag == "single") { @@ -73,10 +72,9 @@ void Driver::driver_run() rl_driver.relax_driver(p_esolver); } } - //---------------------------MD/Relax------------------ - // 6. clean up esolver - p_esolver->postprocess(); + //! 6: clean up esolver + p_esolver->post_process(); ModuleESolver::clean_esolver(p_esolver); ModuleBase::timer::tick("Driver", "driver_line"); diff --git a/source/module_base/global_variable.cpp b/source/module_base/global_variable.cpp index c1f769e93a..71c8db3d24 100644 --- a/source/module_base/global_variable.cpp +++ b/source/module_base/global_variable.cpp @@ -25,8 +25,8 @@ int NLOCAL = 0; // total number of local basis. double KSPACING[3] = {0.0,0.0,0.0}; double MIN_DIST_COEF = 0.2; -double PSEUDORCUT; -bool PSEUDO_MESH; +double PSEUDORCUT=0;//initialization +bool PSEUDO_MESH=0; std::string CALCULATION = "scf"; std::string ESOLVER_TYPE = "ksdft"; @@ -221,7 +221,7 @@ double tau = 1.0798 * 1e-5; double sigma_k = 0.6; double nc_k = 0.00037; -bool dft_plus_u = false; //DFTU control +int dft_plus_u = 0; //DFTU control //Xinyang Dong added for rpa bool rpa_setorb = false; @@ -299,8 +299,11 @@ std::string sc_file = "none"; // Quasiatomic orbital related //========================================================== bool qo_switch = false; -std::string qo_basis = "hydrogen"; +std::string qo_basis = "szv"; std::vector qo_strategy = {}; double qo_thr = 1.0e-6; std::vector qo_screening_coeff = {}; + +// on-site orbitals +double onsite_radius = 0.0; } // namespace GlobalV diff --git a/source/module_base/global_variable.h b/source/module_base/global_variable.h index 2df0c6f57a..a504307ce2 100644 --- a/source/module_base/global_variable.h +++ b/source/module_base/global_variable.h @@ -250,7 +250,7 @@ extern double sigma_k; extern double nc_k; // DFTU control -extern bool dft_plus_u; +extern int dft_plus_u; // rpa related extern bool rpa_setorb; extern std::vector rpa_orbitals; @@ -331,5 +331,8 @@ extern std::string qo_basis; extern std::vector qo_strategy; extern double qo_thr; extern std::vector qo_screening_coeff; + +// radius of on-site orbitals +extern double onsite_radius; } // namespace GlobalV #endif diff --git a/source/module_base/test/math_integral_test.cpp b/source/module_base/test/math_integral_test.cpp index 7f0145527e..eded83f76d 100644 --- a/source/module_base/test/math_integral_test.cpp +++ b/source/module_base/test/math_integral_test.cpp @@ -2,6 +2,8 @@ #include"gtest/gtest.h" #include +#include +#include #include "module_base/constants.h" @@ -328,17 +330,21 @@ TEST_F(SimpsonIntegralITF, UniformGridOdd) const int ngrid_max = 10000; double *f = new double[ngrid_max]; int ind = 0; - for (int ngrid = 3; ngrid <= ngrid_max; ngrid += 2) { + double ref_val = std::atan(end) - std::atan(start); + std::ofstream file_o("data/itf_uni_out.bin", std::ios::binary); + for (int ngrid = 5; ngrid <= ngrid_max; ngrid += 2) { const double dx = (end - start) / (ngrid - 1); for (int i = 0; i < ngrid; ++i) { double x = start + i * dx; f[i] = 1.0 / (1.0 + x * x); } - double tol = (end-start) * std::pow(dx, 4) * 24 / 180; EXPECT_NEAR(std::atan(end) - std::atan(start), ModuleBase::Integral::simpson(ngrid, f, dx), std::max(tol, doublethreshold)); + double err = std::abs(ModuleBase::Integral::simpson(ngrid, f, dx) - ref_val) / std::abs(ref_val); + file_o.write(reinterpret_cast(&err), sizeof(double)); } delete[] f; + file_o.close(); } TEST_F(SimpsonIntegralITF, SinGridOdd) @@ -348,8 +354,9 @@ TEST_F(SimpsonIntegralITF, SinGridOdd) double *xv = new double[ngrid_max]; double *h = new double[ngrid_max]; double *f = new double[ngrid_max]; - - for (int ngrid = 3; ngrid <= ngrid_max; ngrid += 2) { + std::ofstream file_o("data/itf_sin_out.bin", std::ios::binary); + double ref_val = std::atan(end) - std::atan(start); + for (int ngrid = 5; ngrid <= ngrid_max; ngrid += 2) { sinspace(start, end, ngrid, xv, h); for (int i = 0; i < ngrid; ++i) { f[i] = 1.0 / (1.0 + xv[i] * xv[i]); @@ -359,11 +366,14 @@ TEST_F(SimpsonIntegralITF, SinGridOdd) double dx = h[ngrid / 2]; double tol = (end-start) * std::pow(dx, 4); EXPECT_NEAR(std::atan(end) - std::atan(start), ModuleBase::Integral::simpson(ngrid, f, h), std::max(tol, doublethreshold)); + double err = std::abs(ModuleBase::Integral::simpson(ngrid, f, h) - ref_val) / std::abs(ref_val); + file_o.write(reinterpret_cast(&err), sizeof(double)); } delete[] xv; delete[] h; delete[] f; + file_o.close(); } class SimpsonIntegralExp : public testing::Test{ @@ -375,19 +385,21 @@ TEST_F(SimpsonIntegralExp, UniformGridOdd) double start = 0.0, end = 1.0; const int ngrid_max = 10000; double *f = new double[ngrid_max]; - double *errs = new double[ngrid_max]; - - for (int ngrid = 3; ngrid <= ngrid_max; ngrid += 2) { + std::ofstream file_o("data/exp_uni_out.bin", std::ios::binary); + double ref_val = std::exp(end) - std::exp(start); + for (int ngrid = 5; ngrid <= ngrid_max; ngrid += 2) { const double dx = (end - start) / (ngrid - 1); for (int i = 0; i < ngrid; ++i) { double x = start + i * dx; f[i] = std::exp(x); } - double tol = (end-start) * std::exp(1) * std::pow(dx, 4) / 180; EXPECT_NEAR(std::exp(end) - std::exp(start), ModuleBase::Integral::simpson(ngrid, f, dx), std::max(tol, doublethreshold)); + double err = std::abs(ModuleBase::Integral::simpson(ngrid, f, dx) - ref_val) / std::abs(ref_val); + file_o.write(reinterpret_cast(&err), sizeof(double)); } delete[] f; + file_o.close(); } TEST_F(SimpsonIntegralExp, SinGridOdd) @@ -397,7 +409,8 @@ TEST_F(SimpsonIntegralExp, SinGridOdd) double *xv = new double[ngrid_max]; double *h = new double[ngrid_max]; double *f = new double[ngrid_max]; - + std::ofstream file_o("data/exp_sin_out.bin", std::ios::binary); + double ref_val = std::exp(end) - std::exp(start); // skip ngrid = 3 since the errors exceeds the threshold for (int ngrid = 5; ngrid <= ngrid_max; ngrid += 2) { sinspace(start, end, ngrid, xv, h); @@ -408,9 +421,12 @@ TEST_F(SimpsonIntegralExp, SinGridOdd) double dx = h[ngrid / 2]; double tol = (end-start) * std::pow(dx, 4); EXPECT_NEAR(std::exp(end) - std::exp(start), ModuleBase::Integral::simpson(ngrid, f, h), std::max(tol, doublethreshold)); + double err = std::abs(ModuleBase::Integral::simpson(ngrid, f, h) - ref_val) / std::abs(ref_val); + file_o.write(reinterpret_cast(&err), sizeof(double)); } delete[] xv; delete[] h; delete[] f; + file_o.close(); } \ No newline at end of file diff --git a/source/module_base/test/math_sphbes_test.cpp b/source/module_base/test/math_sphbes_test.cpp index e72c6e289c..36ad8ecdf0 100644 --- a/source/module_base/test/math_sphbes_test.cpp +++ b/source/module_base/test/math_sphbes_test.cpp @@ -1,5 +1,6 @@ #include "../math_sphbes.h" +#include #include #include @@ -257,6 +258,9 @@ TEST_F(Sphbes, SphericalBesselPrecisionGrid) const double dr = rcut / nr; double* r = new double[nr + 10]; double* Y = new double[nr * (l_hi - l_lo + 1) + 10]; + // save errs to binary file + std::ofstream file_o("data/sphj_old_out.bin", std::ios::binary); + std::ofstream file_n("data/sphj_new_out.bin", std::ios::binary); // case 0: x = 0, l = 0 EXPECT_NEAR(ModuleBase::Sphbes::sphbesj(0, 0), 1.0, 1e-12); @@ -288,6 +292,8 @@ TEST_F(Sphbes, SphericalBesselPrecisionGrid) for (int i = 0; i < nr; ++i) { EXPECT_NEAR(ModuleBase::Sphbes::sphbesj(l, r[i] * q), Y[l * nr + i], 1e-12); + double tmp = std::abs(Y[l * nr + i] - ModuleBase::Sphbes::sphbesj(l, r[i] * q)); + file_n.write(reinterpret_cast(&tmp), sizeof(double)); } } // test for old Bessel @@ -296,16 +302,18 @@ TEST_F(Sphbes, SphericalBesselPrecisionGrid) for (int l = l_lo; l <= l_hi; ++l) { ModuleBase::Sphbes::Spherical_Bessel(nr, r, q, l, jl_old); - double errs = 0.0; for (int i = 0; i < nr; ++i) { - errs += MAX(jl_old[i] - Y[l * nr + i], Y[l * nr + i] - jl_old[i]); + double tmp = std::abs(jl_old[i] - Y[l * nr + i]); + file_o.write(reinterpret_cast(&tmp), sizeof(double)); } - // std::cout << " l = " << l << ", errors: " << std::scientific << errs / nr << std::endl; } + delete[] r; delete[] Y; delete[] jl_old; + file_o.close(); + file_n.close(); } TEST_F(Sphbes, SphericalBesselPrecisionNearZero) diff --git a/source/module_base/timer.cpp b/source/module_base/timer.cpp index 48dbb0be8a..5a40d000d2 100644 --- a/source/module_base/timer.cpp +++ b/source/module_base/timer.cpp @@ -158,10 +158,14 @@ void timer::write_to_json(std::string file_name) auto double_to_string = [](double d) -> std::string { formatter::Fmt fmt(0, 15, ' ', false, false, false); - if(isinf(d)) + if(std::isinf(d)) + { return "Infinity"; + } else + { return fmt.format(d); + } }; // The output json file format is like this: diff --git a/source/module_basis/module_ao/ORB_atomic.cpp b/source/module_basis/module_ao/ORB_atomic.cpp index 3cfd8561b1..0ff927561f 100644 --- a/source/module_basis/module_ao/ORB_atomic.cpp +++ b/source/module_basis/module_ao/ORB_atomic.cpp @@ -8,6 +8,9 @@ Numerical_Orbital::Numerical_Orbital() //question remains this->nchi = nullptr; this->phiLN = new Numerical_Orbital_Lm[1]; + this->rcut = 0.0; + this->max_nchi = 0; + this->type = 0; } Numerical_Orbital::~Numerical_Orbital() diff --git a/source/module_basis/module_nao/CMakeLists.txt b/source/module_basis/module_nao/CMakeLists.txt index ae97696ec3..3fd68c3393 100644 --- a/source/module_basis/module_nao/CMakeLists.txt +++ b/source/module_basis/module_nao/CMakeLists.txt @@ -14,6 +14,7 @@ if(ENABLE_LCAO) two_center_table.cpp two_center_integrator.cpp two_center_bundle.cpp + projgen.cpp ) if(ENABLE_COVERAGE) diff --git a/source/module_basis/module_nao/atomic_radials.cpp b/source/module_basis/module_nao/atomic_radials.cpp index ac82c0d225..1d0205199b 100644 --- a/source/module_basis/module_nao/atomic_radials.cpp +++ b/source/module_basis/module_nao/atomic_radials.cpp @@ -6,6 +6,8 @@ #include "module_base/parallel_common.h" #include "module_base/tool_quit.h" +#include "projgen.h" +#include "module_base/math_integral.h" AtomicRadials& AtomicRadials::operator=(const AtomicRadials& rhs) { @@ -61,6 +63,46 @@ void AtomicRadials::build(const std::string& file, const int itype, std::ofstrea } } +void AtomicRadials::build(RadialSet* const other, const int itype, const double rcut) +{ + this->symbol_ = other->symbol(); + this->lmax_ = other->lmax(); + this->nchi_ = other->nchi(); + this->nzeta_max_ = other->nzeta_max(); + this->itype_ = itype; + this->symbol_ = other->symbol(); + this->nzeta_ = new int[this->lmax_ + 1]; + for (int l = 0; l <= this->lmax_; ++l) + { + this->nzeta_[l] = other->nzeta(l); + } + this->indexing(); + this->chi_ = new NumericalRadial[nchi_]; + for(int ichi = 0;ichinchi_;ichi++) + { + const int l = other->cbegin()[ichi].l(); + int ngrid = other->cbegin()[ichi].nr(); + const double* rgrid = other->cbegin()[ichi].rgrid(); + const double* rvalue = other->cbegin()[ichi].rvalue(); + const int izeta = other->cbegin()[ichi].izeta(); + // if the cutoff radius is larger than the original one, just copy the orbitals + if(rcut >= other->cbegin()[ichi].rcut()) + { + this->chi_[ichi].build(l, true, ngrid, rgrid, rvalue, 0, izeta, symbol_, itype, false); + } + else + { + // call smoothgen to modify the orbitals to the local projections + std::vector rvalue_new; + smoothgen(ngrid, rgrid, rvalue, rcut, rvalue_new); + ngrid = rvalue_new.size(); + //projgen(l, ngrid, rgrid, rvalue, rcut, 20, rvalue_new); + //build the new on-site orbitals + this->chi_[ichi].build(l, true, ngrid, rgrid, rvalue_new.data(), 0, izeta, symbol_, itype, false); + } + } +} + void AtomicRadials::read_abacus_orb(std::ifstream& ifs, std::ofstream* ptr_log, const int rank) { /* diff --git a/source/module_basis/module_nao/atomic_radials.h b/source/module_basis/module_nao/atomic_radials.h index 9f06e8489e..869ddeea1d 100644 --- a/source/module_basis/module_nao/atomic_radials.h +++ b/source/module_basis/module_nao/atomic_radials.h @@ -38,6 +38,8 @@ class AtomicRadials : public RadialSet const int rank = 0 //!< MPI rank ); + void build(RadialSet* const other, const int itype, const double rcut); + //! Get the energy cutoff as given by the orbital file double orb_ecut() const { return orb_ecut_; } diff --git a/source/module_basis/module_nao/hydrogen_radials.cpp b/source/module_basis/module_nao/hydrogen_radials.cpp index d21c23ccb0..a0e6479774 100644 --- a/source/module_basis/module_nao/hydrogen_radials.cpp +++ b/source/module_basis/module_nao/hydrogen_radials.cpp @@ -24,7 +24,7 @@ void HydrogenRadials::build(const int itype, const std::string strategy, std::ofstream* ptr_log) { - if(with_slater_screening) {printf("Build hydrogen_radials with Slater screening coefficients.\n");} + if(with_slater_screening&&rank==0) {printf("Build hydrogen_radials with Slater screening coefficients.\n");} cleanup(); itype_ = itype; symbol_ = symbol; @@ -118,8 +118,14 @@ double HydrogenRadials::generate_hydrogen_radial_toconv(const double charge, { dr = delta_r; } - printf("Searching for the cutoff radius for n = %d, l = %d, conv_thr = %6.4e\n", n, l, conv_thr); - printf("%10s%12s%14s%18s", "Step Nr.", "Rmax (a.u.)", "Norm", "Delta Norm\n"); + if(rank == 0) + { + printf("Searching for the cutoff radius for n = %d, l = %d, conv_thr = %6.4e\n", n, l, conv_thr); +#ifdef __MPI + printf("Convergence information only shown from rank 0, other ranks will be silent.\n"); +#endif + printf("%10s%12s%14s%18s", "Step Nr.", "Rmax (a.u.)", "Norm", "Delta Norm\n"); + } int istep = 1; double delta_norm = 1.0; while((std::fabs(delta_norm) > conv_thr)) @@ -145,11 +151,14 @@ double HydrogenRadials::generate_hydrogen_radial_toconv(const double charge, delta_norm = norm; norm = radial_norm(rgrid, rvalue); delta_norm = norm - delta_norm; - if(istep == 0) printf("%10d%12.2f%14.10f%18.10e\n", istep, rmax_, norm, delta_norm); + if((istep == 0)&&(rank == 0)) printf("%10d%12.2f%14.10f%18.10e\n", istep, rmax_, norm, delta_norm); ++istep; } - printf("...\n"); - printf("%10d%12.2f%14.10f%18.10e\n", istep, rmax_, norm, delta_norm); + if(rank == 0) + { + printf("...\n"); + printf("%10d%12.2f%14.10f%18.10e\n", istep, rmax_, norm, delta_norm); + } return rmax_; } diff --git a/source/module_basis/module_nao/projgen.cpp b/source/module_basis/module_nao/projgen.cpp new file mode 100644 index 0000000000..4f32d6b461 --- /dev/null +++ b/source/module_basis/module_nao/projgen.cpp @@ -0,0 +1,174 @@ +#include "module_base/math_integral.h" +#include "module_base/math_sphbes.h" +#include "module_base/cubic_spline.h" +#include "projgen.h" + +#include +#include +#include +#include +#include + +using namespace ModuleBase; + +void projgen(const int l, const int nr, const double* r, const double* chi, const double rcut, const int nbes, std::vector& alpha) +{ + assert(rcut < r[nr - 1]); + assert(std::is_sorted(r, r + nr)); + + std::vector dr(nr - 1); + std::adjacent_difference(r, r + nr, dr.begin()); + + // lower_bound returns the first element that is equal or larger than rcut + int nr_proj = std::distance(r, std::lower_bound(r, r + nr, rcut)) + 1; + + // zeros of spherical Bessel function + std::vector theta(nbes); + Sphbes::sphbes_zeros(l, nbes, theta.data()); + + // z & w vectors (see notes) + std::vector z(nbes); + std::vector w(nbes); + + std::transform(theta.begin(), theta.end(), z.begin(), [rcut, l](double theta_p) + { return 0.5 * std::pow(rcut, 3) * std::pow(Sphbes::sphbesj(l+1, theta_p), 2); }); + + // r^2 * chi (independent from p) + std::vector tmp(nr_proj); + std::transform(r, r + nr_proj, chi, tmp.begin(), [](double r_i, double chi_i) { return r_i * r_i * chi_i; }); + + // r^2 * chi * j_l(theta[p] * r / rcut) (dependent on p) + std::vector integrand(nr_proj); + + for (int p = 0; p < nbes; ++p) { + std::transform(r, r + nr_proj, tmp.begin(), integrand.begin(), [theta, p, rcut, l](double r_i, double tmp_i) + { return tmp_i * Sphbes::sphbesj(l, theta[p] * r_i / rcut); }); + w[p] = Integral::simpson(nr_proj, integrand.data(), &dr[1]); + } + + // optimal coefficients + std::vector c(nbes, 0.0); + std::transform(w.begin(), w.end(), z.begin(), c.begin(), [](double w_p, double z_p) { return w_p * w_p / z_p; }); + double prefac = 1.0 / std::sqrt(std::accumulate(c.begin(), c.end(), 0.0)); + std::transform(w.begin(), w.end(), z.begin(), c.begin(), [prefac](double w_p, double z_p) + { return prefac * w_p / z_p; }); + + // new radial function + alpha.resize(nr_proj); + std::fill(alpha.begin(), alpha.end(), 0.0); + for (int i = 0; i < nr_proj; ++i) { + for (int p = 0; p < nbes; ++p) { + alpha[i] += c[p] * Sphbes::sphbesj(l, theta[p] * r[i] / rcut); + } + } +} + +void smoothgen(const int nr, const double* r, const double* chi, const double rcut, std::vector& alpha) +{ + // lambda function for generate the new radial function + assert(rcut < r[nr - 1]); + assert(std::is_sorted(r, r + nr)); + + std::vector dr(nr - 1); + std::adjacent_difference(r, r + nr, dr.begin()); + + // lower_bound returns the first element that is equal or larger than rcut + int nr_proj = std::distance(r, std::lower_bound(r, r + nr, rcut)) + 1; + alpha.resize(nr_proj); + auto smooth_sigma = [&](double sigma_in) { + for(int i=0;i tmp(nr_proj); + std::transform(r, r + nr_proj, alpha.data(), tmp.begin(), [](double r_i, double chi_i) { return r_i * r_i * chi_i; }); + + // r^2 * chi * chi + std::vector integrand(nr_proj); + + std::transform(alpha.data(), alpha.data() + nr_proj, tmp.begin(), integrand.begin(), [](double chi_i, double tmp_i) + { return tmp_i * chi_i; }); + double overlap = ModuleBase::Integral::simpson(nr_proj, integrand.data(), &dr[1]); + for(int i=0;i dchi(nr_proj); + cubspl.eval(nr_proj, r, nullptr, dchi.data()); + + // function for calculating the overlap between dalpha and dchi + auto overlap_dalpha_dchi = [&]() { + // calculate dalpha first + ModuleBase::CubicSpline cubspl_alpha; + cubspl_alpha.build(nr_proj, r, alpha.data()); + std::vector dalpha(nr_proj); + cubspl_alpha.eval(nr_proj, r, nullptr, dalpha.data()); + for(int i=0;i tmp(nr_proj); + std::transform(r, r + nr_proj, dalpha.data(), tmp.begin(), [](double r_i, double dalpha_i) { return r_i * r_i * dalpha_i; }); + + // r^2 * dalpha * dchi + std::vector integrand(nr_proj); + + std::transform(dalpha.data(), dalpha.data() + nr_proj, tmp.begin(), integrand.begin(), [](double dalpha_i, double tmp_i) + { return tmp_i * dalpha_i; }); + return ModuleBase::Integral::simpson(nr_proj, integrand.data(), &dr[1]); + }; + + // optimize sigma + double sigma_left = 0.1; + smooth_sigma(sigma_left); + double overlap_alpha_chi_left = overlap_dalpha_dchi(); + double sigma_right = 1.0; + smooth_sigma(sigma_right); + double overlap_alpha_chi_right = overlap_dalpha_dchi(); + double overlap_alpha_chi; + double sigma; + while (std::abs(overlap_alpha_chi_right - overlap_alpha_chi_left) > 1e-6) + { + sigma = (sigma_left + sigma_right) / 2; + smooth_sigma(sigma); + overlap_alpha_chi = overlap_dalpha_dchi(); + if(overlap_alpha_chi < overlap_alpha_chi_left && overlap_alpha_chi < overlap_alpha_chi_right) + {// the minimum is in the middle + if(overlap_alpha_chi_left > overlap_alpha_chi_right) + { + sigma_left = sigma; + overlap_alpha_chi_left = overlap_alpha_chi; + } + else + { + sigma_right = sigma; + overlap_alpha_chi_right = overlap_alpha_chi; + } + } + else + {// the minimum is on the left or right + if(overlap_alpha_chi_left < overlap_alpha_chi_right) + { + sigma_right = sigma; + overlap_alpha_chi_right = overlap_alpha_chi; + sigma_left = sigma_left - (sigma_right - sigma_left) * 0.5; + smooth_sigma(sigma_left); + overlap_alpha_chi_left = overlap_dalpha_dchi(); + } + else + { + sigma_left = sigma; + overlap_alpha_chi_left = overlap_alpha_chi; + sigma_right = sigma_right + (sigma_right - sigma_left) * 0.5; + smooth_sigma(sigma_right); + overlap_alpha_chi_right = overlap_dalpha_dchi(); + } + } + } +} + diff --git a/source/module_basis/module_nao/projgen.h b/source/module_basis/module_nao/projgen.h new file mode 100644 index 0000000000..5d886ec06c --- /dev/null +++ b/source/module_basis/module_nao/projgen.h @@ -0,0 +1,43 @@ +#ifndef MODULE_NAO_PROJGEN_H_ +#define MODULE_NAO_PROJGEN_H_ + +#include + +/** + * @brief Generates a projector's radial function for DFT+U + * + * Starting with a numerical radial function chi on grid r with angular momentum l, + * given a smaller cutoff radius rcut and the number of spherical Bessel components (j_l), + * this function generates a new radial function alpha of the same l on the truncated grid + * which satisfies the following conditions: + * + * * alpha = \sum_p j_l(theta[p]*r/rcut) * c[p] where theta[p] is the p-th zero of j_l; + * * \int_0^rcut alpha(r) r^2 dr = 1 (normalization); + * * \int_0^rcut alpha(r) chi(r) r^2 dr is maximized; + * + * @param[in] l angular momentum + * @param[in] nr number of grid points + * @param[in] r radial grid + * @param[in] chi radial function + * @param[in] rcut cutoff radius of the projector + * @param[in] nbes number of spherical Bessel components + * @param[out] alpha new radial function of the projector + * + */ +void projgen( + const int l, + const int nr, + const double* r, + const double* chi, + const double rcut, + const int nbes, + std::vector& alpha); + +void smoothgen( + const int nr, + const double* r, + const double* chi, + const double rcut, + std::vector& alpha); + +#endif \ No newline at end of file diff --git a/source/module_basis/module_nao/pswfc_radials.cpp b/source/module_basis/module_nao/pswfc_radials.cpp index 70fb5c4342..a765440280 100644 --- a/source/module_basis/module_nao/pswfc_radials.cpp +++ b/source/module_basis/module_nao/pswfc_radials.cpp @@ -4,6 +4,10 @@ #include #include +#ifdef __MPI +#include "module_base/parallel_common.h" +#endif + PswfcRadials& PswfcRadials::operator=(const PswfcRadials& rhs) { RadialSet::operator=(rhs); @@ -28,6 +32,11 @@ void PswfcRadials::build(const std::string& file, ifs.open(file); is_open = ifs.is_open(); } + +#ifdef __MPI + Parallel_Common::bcast_bool(is_open); +#endif + if (!is_open) { ModuleBase::WARNING_QUIT("AtomicRadials::read", "Couldn't open pseudopotential file: " + file); @@ -238,73 +247,136 @@ void PswfcRadials::read_upf_pswfc(std::ifstream& ifs, int nzeta = 0; double dr = 0.01; // in most cases, this is correct - - std::map, std::vector> result; - - std::string line = ""; - // read element - while(!startswith(line, "element=")&&!ifs.eof()) ifs >> line; - symbol_ = read_keyword_value(ifs, line); - // read lmax - while(!startswith(line, "l_max=")&&!ifs.eof()) ifs >> line; - lmax_ = std::stoi(read_keyword_value(ifs, line)); - // read ngrid - while(!startswith(line, "mesh_size=")&&!ifs.eof()) ifs >> line; - ngrid = std::stoi(read_keyword_value(ifs, line)); - // read nzeta - while(!startswith(line, "number_of_wfc=")&&!ifs.eof()) ifs >> line; - nzeta = std::stoi(read_keyword_value(ifs, line)); - nchi_ = nzeta; - // read contents of pseudowavefunction - while(line != "") ifs >> line; - nzeta_ = new int[lmax_ + 1]; - for(int il = 0; il < lmax_ + 1; il++) nzeta_[il] = 0; - for(int iz = 0; iz < nzeta; iz++) // read chi-by-chi + // the following will have values on rank 0, if MPI enabled, and will be broadcasted to all ranks + // or say the correlated container std::pair, will be decomposed into two std::vectors + // and the correlated container std::map, std::vector> therefore will + // be decomposed into three std::vectors + std::vector ls; + std::vector izetas; + std::vector rgrid; + std::vector> rvalues; + if(rank == 0) { - // find the next tag - while(!startswith(line, "> line; - // read l - while(!startswith(line, "l=")&&!ifs.eof()) ifs >> line; - int l = std::stoi(read_keyword_value(ifs, line)); - nzeta_[l] += 1; - // to data - while(line != ">"&&!ifs.eof()) ifs >> line; - // before read data, first create container to store - std::vector rvalue = std::vector(ngrid, 0.0); - for(int ir=0; ir < ngrid; ir++) + // result is a map from (l, izeta) to rvalue, i.e., from (l,zeta) to exact value of radial function + // it is a temporary container to store the result of pseudowavefunction, next will be transfer to + // ls, izetas, rgrid and rvalues std::vectors and broadcast + std::map, std::vector> result; + + std::string line = ""; + // read element + while(!startswith(line, "element=")&&!ifs.eof()) ifs >> line; + symbol_ = read_keyword_value(ifs, line); + // read lmax + while(!startswith(line, "l_max=")&&!ifs.eof()) ifs >> line; + lmax_ = std::stoi(read_keyword_value(ifs, line)); + // read ngrid + while(!startswith(line, "mesh_size=")&&!ifs.eof()) ifs >> line; + ngrid = std::stoi(read_keyword_value(ifs, line)); + // read nzeta + while(!startswith(line, "number_of_wfc=")&&!ifs.eof()) ifs >> line; + nzeta = std::stoi(read_keyword_value(ifs, line)); + nchi_ = nzeta; + // read contents of pseudowavefunction + while(line != "") ifs >> line; + nzeta_ = new int[lmax_ + 1]; + for(int il = 0; il < lmax_ + 1; il++) nzeta_[il] = 0; + for(int iz = 0; iz < nzeta; iz++) // read chi-by-chi { + // find the next tag + while(!startswith(line, "> line; + // read l + while(!startswith(line, "l=")&&!ifs.eof()) ifs >> line; + int l = std::stoi(read_keyword_value(ifs, line)); + nzeta_[l] += 1; + // to data + while(line != ">"&&!ifs.eof()) ifs >> line; + // before read data, first create container to store + std::vector rvalue = std::vector(ngrid, 0.0); + for(int ir=0; ir < ngrid; ir++) + { + ifs >> line; + double screening = std::exp(-screening_coeff * ir * dr); + rvalue[ir] = std::stod(line) * screening; + } + result[std::make_pair(l, nzeta_[l] - 1)] = rvalue; ifs >> line; - double screening = std::exp(-screening_coeff * ir * dr); - rvalue[ir] = std::stod(line) * screening; + assert(startswith(line, "> line; - assert(startswith(line, "first.first; + int iz = it->first.second; + ls.push_back(l); + izetas.push_back(iz); + rvalues.push_back(it->second); + } + } // rank 0 does almost everything, then broadcast one-by-one +#ifdef __MPI + // first broadcast descriptive information to all ranks + if(rank == 0) printf("PswfcRadials: pseudowavefunction read on rank 0, broadcast start.\n"); - if(result.size() == 0) + Parallel_Common::bcast_string(symbol_); + Parallel_Common::bcast_int(lmax_); + + Parallel_Common::bcast_int(nchi_); + Parallel_Common::bcast_int(nzeta_max_); + + Parallel_Common::bcast_int(ngrid); + // Parallel_Common::bcast_double(dr); // we dont need to broadcast dr again because it is fixed to 0.01 +#endif + // then adjust and allocate memory for ranks other than 0, according to information broadcasted + // from rank0 + if(rank != 0) { - ModuleBase::WARNING_QUIT("AtomicRadials::read", "pseudowavefunction information is absent in pseudopotential."); + nzeta_ = new int[lmax_ + 1]; + index_map_ = new int[(lmax_ + 1) * nzeta_max_]; + + // decomposed correlated container std::map, std::vector> into three std::vectors, + // additionally with rgrid the r values of pseudowavefunction + ls.resize(nchi_); + izetas.resize(nchi_); + rgrid.resize(ngrid); + rvalues.resize(nchi_); + for(int i = 0; i < nchi_; i++) rvalues[i].resize(ngrid); } +#ifdef __MPI + Parallel_Common::bcast_int(nzeta_, lmax_ + 1); + Parallel_Common::bcast_int(index_map_, (lmax_ + 1) * nzeta_max_); - nzeta_max_ = *std::max_element(nzeta_, nzeta_ + lmax_ + 1); - indexing(); // build index_map_ - - // cut rvalue to convergence and generate rgrid - std::vector rgrid = pswfc_prepossess(result, conv_thr); - // refresh ngird value - ngrid = rgrid.size(); + // correlated container bcast + Parallel_Common::bcast_int(ls.data(), nchi_); + Parallel_Common::bcast_int(izetas.data(), nchi_); + Parallel_Common::bcast_double(rgrid.data(), ngrid); + for(int i = 0; i < nchi_; i++) Parallel_Common::bcast_double(rvalues[i].data(), ngrid); + if(rank == 0) printf("PswfcRadials: pseudowavefunction read and broadcast finished on rank 0.\n"); +#endif + // do the following for all ranks, as if rank 0 chi_ = new NumericalRadial[nchi_]; - - for(auto it = result.begin(); it != result.end(); it++) + for(int i = 0; i < nchi_; i++) { - int l = it->first.first; - int iz = it->first.second; - chi_[index(l, iz)].build(l, true, ngrid, rgrid.data(), it->second.data(), 0, iz, symbol_, itype_, false); + chi_[index(ls[i], izetas[i])].build(ls[i], true, ngrid, rgrid.data(), rvalues[i].data(), 0, izetas[i], symbol_, itype_, false); if(std::fabs(screening_coeff - 0.0) > 1e-6) // PHYSICAL REVIEW B 78, 245112 2008 { - chi_[index(l, iz)].normalize(); + chi_[index(ls[i], izetas[i])].normalize(); } } + //printf("PswfcRadials: pseudowavefunction read and broadcast finished on rank %d.\n", rank); + // nzeta and index_map are not deleted here... } diff --git a/source/module_basis/module_nao/radial_collection.cpp b/source/module_basis/module_nao/radial_collection.cpp index 19e09f49fb..10df8a6e5c 100644 --- a/source/module_basis/module_nao/radial_collection.cpp +++ b/source/module_basis/module_nao/radial_collection.cpp @@ -153,6 +153,25 @@ void RadialCollection::build(const int ntype, Numerical_Nonlocal* const nls) set_rcut_max(); } +void RadialCollection::build(const RadialCollection* nls, const double radius) +{ + cleanup(); + this->ntype_ = nls->ntype(); + this->rcut_max_ = radius>0.0?radius:nls->rcut_max(); + this->radset_ = new RadialSet*[ntype_]; + this->lmax_ = nls->lmax(); + this->nchi_ = nls->nchi(); + this->nzeta_max_ = nls->nzeta_max(); + + for (int itype = 0; itype < ntype_; ++itype) + { + radset_[itype] = new AtomicRadials; + static_cast(radset_[itype])->build(nls->radset_[itype], itype, this->rcut_max_); + } + + iter_build(); +} + void RadialCollection::build(const int nfile, const std::string* const file, const char ftype) { @@ -213,7 +232,8 @@ void RadialCollection::build(const int ntype, const int* const nmax, const std::string* symbols, const double conv_thr, - const std::string* strategies) + const std::string* strategies, + const int& rank) { cleanup(); ntype_ = ntype; @@ -229,7 +249,7 @@ void RadialCollection::build(const int ntype, 10.0, // rcut should be determined automatically, in principle... 0.01, conv_thr, - 0, + rank, symbols[itype], strategies[itype]); @@ -246,7 +266,8 @@ void RadialCollection::build(const int ntype, void RadialCollection::build(const int ntype, const std::string* const file, const double* const screening_coeffs, - const double conv_thr) + const double conv_thr, + const int& rank) { cleanup(); ntype_ = ntype; @@ -255,7 +276,7 @@ void RadialCollection::build(const int ntype, for (int itype = 0; itype < ntype_; ++itype) { radset_[itype] = new PswfcRadials; - radset_[itype]->build(file[itype], itype, screening_coeffs[itype], conv_thr); + radset_[itype]->build(file[itype], itype, screening_coeffs[itype], conv_thr, nullptr, rank); lmax_ = std::max(lmax_, radset_[itype]->lmax()); nchi_ += radset_[itype]->nchi(); @@ -266,6 +287,23 @@ void RadialCollection::build(const int ntype, set_rcut_max(); } +void RadialCollection::build(const int lmax, const int nbes, const double rcut, const double sigma, const double dr) +{ + cleanup(); + ntype_ = 1; + radset_ = new RadialSet*[ntype_]; + + radset_[0] = new SphbesRadials; + radset_[0]->build(lmax, nbes, rcut, sigma, dr); + + lmax_ = lmax; + nchi_ = radset_[0]->nchi(); + nzeta_max_ = radset_[0]->nzeta_max(); + + iter_build(); + set_rcut_max(); +} + void RadialCollection::set_transformer(ModuleBase::SphericalBesselTransformer sbt, const int update) { for (int itype = 0; itype < ntype_; ++itype) @@ -336,4 +374,4 @@ void RadialCollection::to_file(const std::string& appendix, const std::string& f std::string fname = radset_[itype]->symbol() + "_" + appendix + ".orb"; radset_[itype]->write_abacus_orb(fname); } -} \ No newline at end of file +} diff --git a/source/module_basis/module_nao/radial_collection.h b/source/module_basis/module_nao/radial_collection.h index 3e1865e0f5..c92ecb400a 100644 --- a/source/module_basis/module_nao/radial_collection.h +++ b/source/module_basis/module_nao/radial_collection.h @@ -29,6 +29,9 @@ class RadialCollection /// Builds the collection from Numerical_Nonlocal objects. void build(const int ntype, Numerical_Nonlocal* const nls); + /// Builds the collection from RadialCollection objects and another radius cutoff. + void build(const RadialCollection* nls, double radius = 0.0); + /// builds the collection from quasi hydrogen radial functions void build(const int ntype, const double* const charges, @@ -36,13 +39,23 @@ class RadialCollection const int* const nmax, const std::string* symbols = nullptr, const double conv_thr = 1e-10, - const std::string* strategies = nullptr); + const std::string* strategies = nullptr, + const int& rank = 0); /// builds the collection from pseudopotential pswfc void build(const int ntype, const std::string* const file, const double* const screening_coeff, - const double conv_thr = 1e-10); + const double conv_thr = 1e-10, + const int& rank = 0); + + /// builds a collection of truncated spherical Bessel functions + void build(const int lmax, + const int nbes, + const double rcut, + const double sigma, + const double dr + ); /** * @name Getters diff --git a/source/module_basis/module_nao/radial_set.h b/source/module_basis/module_nao/radial_set.h index b875aadc0e..b102a30951 100644 --- a/source/module_basis/module_nao/radial_set.h +++ b/source/module_basis/module_nao/radial_set.h @@ -39,6 +39,13 @@ class RadialSet * set symbol_, itype_, nchi_ and chi_. * */ + + // FIXME The following functions are not pure virtual because each + // derived class may not need all of them. However, it is not a good + // design. Such functions will be removed in the future; their + // functionalities will be moved to the constructors of corresponding + // derived classes. + ///@{ /** * @brief Builds the object from a file. @@ -95,6 +102,24 @@ class RadialSet std::ofstream* const = nullptr, ///< output file stream for logging const int = 0 ///< MPI rank ) {} + + /** + * @brief Builds with the truncated spherical Bessel functions. + * + * This is the interface for building the RadialSet with the truncated + * spherical Bessel functions. + * See the derived class "SphbesRadials" for the implementation. + */ + virtual void build(const int, ///< maximum angular momentum + const int, ///< number of spherical Bessel functions + const double, ///< cutoff radius + const double = 0.1, ///< smoothing parameter + const double = 0.01, ///< radial grid spacing + const int = 0, ///< element index + std::ofstream* = nullptr, ///< output file stream for logging + const int = 0 ///< MPI rank + ) {}; + /** * @brief write any RadialSet object to a file in ABACUS numerical atomic orbital format. * diff --git a/source/module_basis/module_nao/sphbes_radials.cpp b/source/module_basis/module_nao/sphbes_radials.cpp index 14aceeda23..4901d32b0e 100644 --- a/source/module_basis/module_nao/sphbes_radials.cpp +++ b/source/module_basis/module_nao/sphbes_radials.cpp @@ -20,7 +20,7 @@ SphbesRadials& SphbesRadials::operator=(const SphbesRadials& rhs) return *this; } -void SphbesRadials::build(const std::string& file, const int itype, std::ofstream* ptr_log, const int rank) +void SphbesRadials::build(const std::string& file, const double dr, const int itype, std::ofstream* ptr_log, const int rank) { cleanup(); coeff_.clear(); @@ -57,6 +57,7 @@ void SphbesRadials::build(const std::string& file, const int itype, std::ofstrea } itype_ = itype; + dr_ = dr; read_coeff(ifs, ptr_log, rank); build_radset(); @@ -66,6 +67,46 @@ void SphbesRadials::build(const std::string& file, const int itype, std::ofstrea } } +void SphbesRadials::build(const int lmax, const int nbes, const double rcut, const double sigma, const double dr, const int itype, std::ofstream* ptr_log, const int rank) +{ + cleanup(); + coeff_.clear(); + + if (ptr_log) + { + (*ptr_log) << "\n\n\n\n"; + (*ptr_log) << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; + (*ptr_log) << " | |" << std::endl; + (*ptr_log) << " | SETUP TRUNCATED SPHERICAL BESSEL ORBITALS |" << std::endl; + (*ptr_log) << " | |" << std::endl; + (*ptr_log) << " | Orbital information includes the cutoff radius, angular momentum, |" << std::endl; + (*ptr_log) << " | zeta number, spherical Bessel coefficients and smoothing parameter. |" << std::endl; + (*ptr_log) << " | |" << std::endl; + (*ptr_log) << " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << std::endl; + (*ptr_log) << "\n\n\n\n"; + } + + itype_ = itype; + rcut_max_ = rcut; + sigma_ = sigma; + dr_ = dr; + + ////////////////////////// + // Instead of reading from a file, we will generate the coefficients here. + for (int l = 0; l <= lmax; ++l) + { + for (int zeta = 0; zeta < nbes; ++zeta) + { + std::vector coeff_q(nbes, 0.0); + coeff_q[zeta] = 1.0; + coeff_.emplace(std::make_pair(l, zeta), std::move(coeff_q)); + } + } + + ////////////////////////// + + build_radset(false); +} void SphbesRadials::read_coeff(std::ifstream& ifs, std::ofstream* ptr_log, const int rank) { @@ -119,7 +160,6 @@ void SphbesRadials::read_coeff(std::ifstream& ifs, std::ofstream* ptr_log, const } } - std::string SphbesRadials::extract(std::string const& str, std::string const& keyword) { std::smatch match; std::string regex_string = keyword + "=\" *([^= ]+) *\""; @@ -159,6 +199,8 @@ std::vector SphbesRadials::sphbes_comb(const int l, // f[ir] = \sum_{iq} coeff[iq] * j_{l}(q[i] * r[ir]) for (size_t iq = 0; iq != q.size(); ++iq) { + if (coeff_q[iq] == 0.0) continue; + ModuleBase::Sphbes::sphbesj(nr, r.data(), q[iq], l, tmp.data()); for (size_t ir = 0; ir != tmp.size(); ++ir) { @@ -174,7 +216,7 @@ double SphbesRadials::smooth(double r, double rcut, double sigma) return (r < rcut) * (sigma == 0 ? 1.0 : 1.0 - std::exp(-0.5 * std::pow( (r - rcut) / sigma, 2))); } -void SphbesRadials::build_radset() +void SphbesRadials::build_radset(const bool normalize) { // symbol_ is set in read_coeff() // itype_ is set in build() @@ -216,6 +258,6 @@ void SphbesRadials::build_radset() [this] (double ri, double fi) { return fi * smooth(ri, rcut_max_, sigma_); }); chi_[index(l, izeta)].build(l, true, nr, r.data(), f.data(), 0, izeta, symbol_, itype_, false); - chi_[index(l, izeta)].normalize(); + if (normalize) chi_[index(l, izeta)].normalize(); } } diff --git a/source/module_basis/module_nao/sphbes_radials.h b/source/module_basis/module_nao/sphbes_radials.h index d68190e0df..b05a2896ac 100644 --- a/source/module_basis/module_nao/sphbes_radials.h +++ b/source/module_basis/module_nao/sphbes_radials.h @@ -33,12 +33,35 @@ class SphbesRadials : public RadialSet * @param[in] rank MPI rank */ void build(const std::string& file, + const double dr = 0.01, const int itype = 0, std::ofstream* ptr_log = nullptr, const int rank = 0 ); - void set_dr(const double dr) { dr_ = dr; } + /** + * @brief Builds the class with truncated spherical Bessel functions. + * + * Instead of reading spherical Bessel coefficients from a file, an + * alternative way to build the class is to have each truncated + * spherical Bessel function as a NumericalRadial object. + * + * @param[in] lmax maximum angular momentum + * @param[in] nbes number of truncated spherical Bessel functions + * @param[in] itype element index in calculation + * @param[in] dr radial grid spacing + * @param[in] ptr_log output file stream for logging + * @param[in] rank MPI rank + */ + void build(const int lmax, + const int nbes, + const double rcut, + const double sigma, + const double dr = 0.01, + const int itype = 0, + std::ofstream* ptr_log = nullptr, + const int rank = 0 + ); /** * @name Getters @@ -66,7 +89,7 @@ class SphbesRadials : public RadialSet const int rank = 0); /// - void build_radset(); + void build_radset(const bool normalize = true); /// Extracts a substring (VALUE) from a string of the form KEYWORD=" VALUE ". std::string extract(std::string const& str, std::string const& keyword); diff --git a/source/module_basis/module_nao/test/CMakeLists.txt b/source/module_basis/module_nao/test/CMakeLists.txt index 0a90a43a21..46228ce0be 100644 --- a/source/module_basis/module_nao/test/CMakeLists.txt +++ b/source/module_basis/module_nao/test/CMakeLists.txt @@ -14,6 +14,7 @@ AddTest( ../atomic_radials.cpp ../radial_set.cpp ../numerical_radial.cpp + ../projgen.cpp ../../module_ao/ORB_atomic_lm.cpp ../../module_ao/ORB_atomic.cpp LIBS ${math_libs} device base @@ -78,6 +79,7 @@ AddTest( ../pswfc_radials.cpp ../radial_set.cpp ../numerical_radial.cpp + ../projgen.cpp ../sphbes_radials.cpp ../../module_ao/ORB_atomic_lm.cpp ../../module_ao/ORB_atomic.cpp @@ -96,6 +98,7 @@ AddTest( ../pswfc_radials.cpp ../sphbes_radials.cpp ../radial_set.cpp + ../projgen.cpp ../numerical_radial.cpp ../two_center_bundle.cpp ../two_center_integrator.cpp @@ -121,6 +124,7 @@ AddTest( ../real_gaunt_table.cpp ../radial_collection.cpp ../atomic_radials.cpp + ../projgen.cpp ../beta_radials.cpp ../hydrogen_radials.cpp ../pswfc_radials.cpp @@ -146,6 +150,27 @@ AddTest( ../pswfc_radials.cpp ../sphbes_radials.cpp ../radial_set.cpp + ../projgen.cpp + ../numerical_radial.cpp + LIBS ${math_libs} device base container orb +) + +AddTest( + TARGET generate_projection + SOURCES + projgen_test.cpp + ../two_center_bundle.cpp + ../two_center_integrator.cpp + ../two_center_table.cpp + ../real_gaunt_table.cpp + ../radial_collection.cpp + ../atomic_radials.cpp + ../beta_radials.cpp + ../hydrogen_radials.cpp + ../pswfc_radials.cpp + ../sphbes_radials.cpp + ../radial_set.cpp + ../projgen.cpp ../numerical_radial.cpp LIBS ${math_libs} device base container orb ) diff --git a/source/module_basis/module_nao/test/projgen_test.cpp b/source/module_basis/module_nao/test/projgen_test.cpp new file mode 100644 index 0000000000..aaea89f5d0 --- /dev/null +++ b/source/module_basis/module_nao/test/projgen_test.cpp @@ -0,0 +1,136 @@ +#include "module_basis/module_nao/projgen.h" +#include "gtest/gtest.h" + +#include "module_base/math_integral.h" +#include "module_base/math_sphbes.h" +#include "module_base/cubic_spline.h" + +#include +#include +#include +#include +#include + +/*********************************************************** + * Unit test of functions in projgen.cpp + * "projgen" : generate the projector coefficients + * "smoothgen" : smooth the projector coefficients and optimize the sigma + * + ***********************************************************/ + +TEST(projgen_test, projgen) +{ + // test orbital r^2 * exp(-r) + int l = 2; + double dr = 0.01; + double rcut_nao = 10; + int nr_nao = int(rcut_nao / dr) + 1; + std::vector r(nr_nao); + std::vector orb(nr_nao); + + for (int i = 0; i < nr_nao; ++i) { + r[i] = i * dr; + orb[i] = r[i] * r[i] * std::exp(-r[i]); + } + + // normalize the input orbital + std::vector integrand(nr_nao); + std::transform(r.begin(), r.end(), orb.begin(), integrand.begin(), + [](double r_i, double orb_i) { return std::pow(r_i * orb_i, 2); }); + double N = 1.0 / std::sqrt(ModuleBase::Integral::simpson(nr_nao, integrand.data(), dr)); + std::for_each(orb.begin(), orb.end(), [N](double& chi_i) { chi_i *= N; }); + + // projector information + double rcut_proj = 7.0; + int nbes = 7; + std::vector alpha; + + projgen(l, nr_nao, r.data(), orb.data(), rcut_proj, nbes, alpha); + + // compare with python script result + std::vector ref = { + 0.000000000000e+00, + 2.344902364599e-05, + 9.378381332712e-05, + 2.109675345121e-04, + 3.749388271050e-04, + 5.856118515995e-04, + 8.428763536364e-04, + 1.146597746904e-03, + 1.496617214310e-03, + 1.892751827321e-03, + 2.334794683381e-03, + 2.822515061259e-03, + 3.355658594204e-03, + 3.933947460740e-03, + 4.557080592928e-03, + 5.224733901903e-03, + 5.936560520491e-03, + 6.692191062668e-03, + 7.491233899644e-03, + 8.333275452302e-03, + }; + + for (int i = 0; i < 20; ++i) { + EXPECT_NEAR(alpha[i], ref[i], 1e-12); + } +} + +TEST(smoothgen_test, smoothgen) +{ + // test orbital r^2 * exp(-r) + int l = 2; + double dr = 0.01; + double rcut_nao = 10; + int nr_nao = int(rcut_nao / dr) + 1; + std::vector r(nr_nao); + std::vector orb(nr_nao); + + for (int i = 0; i < nr_nao; ++i) { + r[i] = i * dr; + orb[i] = r[i] * r[i] * std::exp(-r[i]); + } + + // normalize the input orbital + std::vector integrand(nr_nao); + std::transform(r.begin(), r.end(), orb.begin(), integrand.begin(), + [](double r_i, double orb_i) { return std::pow(r_i * orb_i, 2); }); + double N = 1.0 / std::sqrt(ModuleBase::Integral::simpson(nr_nao, integrand.data(), dr)); + std::for_each(orb.begin(), orb.end(), [N](double& chi_i) { chi_i *= N; }); + + // projector information + double rcut_proj = 7.0; + int nbes = 7; + std::vector alpha; + + smoothgen(nr_nao, r.data(), orb.data(), rcut_proj, alpha); + + // compare with python script result + std::vector ref = { + 0, + 4.3350439973614511e-05, + 0.00017167638355532129, + 0.00038242839374460959, + 0.0006731078535961104, + 0.0010412661227313883, + 0.0014845037064463464, + 0.0020004694372387291, + 0.0025868596685825239, + 0.0032414174807783905, + 0.0039619318987114734, + 0.0047462371213502306, + 0.0055922117628221264, + 0.006497778104904167, + 0.0074609013607684835, + 0.0084795889498252546, + 0.0095518897835073727, + 0.010675893561843302, + 0.01184973008066669, + 0.013071568549313281 + }; + + for (int i = 0; i < 20; ++i) { + //std::cout< +#ifdef __MPI +#include +#endif + class PswfcRadialsTest : public ::testing::Test { protected: virtual void SetUp() { - // code here will execute just before the test ensues - // (each TEST_F) +#ifdef __MPI + MPI_Comm_rank(MPI_COMM_WORLD, &GlobalV::MY_RANK); +#endif } virtual void TearDown() { // code here will be called just after the test completes @@ -164,8 +169,18 @@ TEST_F(PswfcRadialsTest, Build) int main(int argc, char** argv) { + +#ifdef __MPI + MPI_Init(&argc, &argv); +#endif + std::cout << "Current getcwd: " << getcwd(nullptr, 0) << std::endl; testing::InitGoogleTest(&argc, argv); int result = RUN_ALL_TESTS(); + +#ifdef __MPI + MPI_Finalize(); +#endif + return result; } \ No newline at end of file diff --git a/source/module_basis/module_nao/test/radial_collection_test.cpp b/source/module_basis/module_nao/test/radial_collection_test.cpp index f6e485353c..2838cd7294 100644 --- a/source/module_basis/module_nao/test/radial_collection_test.cpp +++ b/source/module_basis/module_nao/test/radial_collection_test.cpp @@ -277,6 +277,31 @@ TEST_F(RadialCollectionTest, Iteration) //EXPECT_EQ(*(orb.cend() - 1), &orb(3, 3, 0)); } +TEST_F(RadialCollectionTest, Build2) { + // build a collection of truncated spherical Bessel functions + int lmax = 3; + int nbes = 10; + double rcut = 10.0; + double sigma = 0.0; + double dr = 0.01; + orb.build(lmax, nbes, rcut, sigma, dr); + + orb.lmax(); + + EXPECT_EQ(orb.ntype(), 1); + EXPECT_EQ(orb.lmax(), lmax); + EXPECT_DOUBLE_EQ(orb.rcut_max(), rcut); + + for (int l = 0; l <= lmax; ++l) { + EXPECT_EQ(orb.nzeta(0, l), nbes); + } + + EXPECT_EQ(orb.nzeta_max(0), nbes); + EXPECT_EQ(orb.nchi(0), nbes*(lmax+1)); + EXPECT_EQ(orb.nchi(), nbes*(lmax+1)); +} + + int main(int argc, char** argv) { diff --git a/source/module_basis/module_nao/test/sphbes_radials_test.cpp b/source/module_basis/module_nao/test/sphbes_radials_test.cpp index 0596227a35..748ee3629d 100644 --- a/source/module_basis/module_nao/test/sphbes_radials_test.cpp +++ b/source/module_basis/module_nao/test/sphbes_radials_test.cpp @@ -3,11 +3,14 @@ #include "gtest/gtest.h" #include "module_base/global_variable.h" +#include "module_base/math_sphbes.h" #ifdef __MPI #include #endif +using ModuleBase::Sphbes; + /*********************************************************** * Unit test of class "SphbesRadials" ***********************************************************/ @@ -42,7 +45,8 @@ class SphbesRadialsTest : public ::testing::Test TEST_F(SphbesRadialsTest, Build) { - I_radials.build(file, 999, nullptr, GlobalV::MY_RANK); + double dr = 0.01; + I_radials.build(file, dr, 999, nullptr, GlobalV::MY_RANK); // Checks the basic info. EXPECT_EQ(I_radials.symbol(), "I"); @@ -83,6 +87,64 @@ TEST_F(SphbesRadialsTest, Build) EXPECT_NEAR(I_radials.chi(3, 0).rvalue(699), 2.68919830291794e-06, tol); } +TEST_F(SphbesRadialsTest, Build2) +{ + int lmax = 3; + int nbes = 10; + double rcut = 7.0; + double sigma = 0.0; + double dr = 0.01; + int itype = 999; + + I_radials.build(lmax, nbes, rcut, sigma, dr, itype, nullptr, 0); + + // Checks the basic info. + EXPECT_EQ(I_radials.symbol(), ""); + EXPECT_EQ(I_radials.itype(), itype); + EXPECT_EQ(I_radials.lmax(), lmax); + EXPECT_DOUBLE_EQ(I_radials.rcut_max(), rcut); + + EXPECT_EQ(I_radials.nzeta(0), nbes); + EXPECT_EQ(I_radials.nzeta(1), nbes); + EXPECT_EQ(I_radials.nzeta(2), nbes); + EXPECT_EQ(I_radials.nzeta(3), nbes); + EXPECT_EQ(I_radials.nzeta_max(), nbes); + EXPECT_EQ(I_radials.nchi(), nbes*(lmax+1)); + + double* zeros = new double[nbes*(lmax+1)]; + Sphbes::sphbes_zeros(lmax, nbes, zeros, true); + + for (int l = 0; l <= lmax; ++l) { + + for (int zeta = 0; zeta < nbes; ++zeta) { + + // Checks whether the spherical Bessel coefficients are correct. + for (int i = 0; i < nbes; i++) { + EXPECT_EQ(I_radials.coeff(l, zeta)[i], double(i == zeta)); + } + + // Checks whether the radial grid is computed correctly. + for (int i = 0; i < I_radials.chi(l, zeta).nr(); ++i) { + double q = zeros[l*nbes+zeta] / rcut; + EXPECT_NEAR(I_radials.chi(l, zeta).rvalue(i), + Sphbes::sphbesj(l, q * I_radials.chi(l, zeta).rgrid(i)), tol); + } + + // Checks whether the radial grid & values are computed correctly. + // NOTE: the radial functions are just truncated spherical Bessel functions. + double q = zeros[l*nbes+zeta] / rcut; + for (int i = 0; i < I_radials.chi(l, zeta).nr(); ++i) { + EXPECT_NEAR(I_radials.chi(l, zeta).rgrid(i), i * dr, tol); + + EXPECT_NEAR(I_radials.chi(l, zeta).rvalue(i), + Sphbes::sphbesj(l, q * I_radials.chi(l, zeta).rgrid(i)), tol); + } + } + } + + delete[] zeros; +} + int main(int argc, char** argv) { diff --git a/source/module_basis/module_nao/test/two_center_integrator_test.cpp b/source/module_basis/module_nao/test/two_center_integrator_test.cpp index 695e68dd2a..cf6db4b3ea 100644 --- a/source/module_basis/module_nao/test/two_center_integrator_test.cpp +++ b/source/module_basis/module_nao/test/two_center_integrator_test.cpp @@ -5,10 +5,12 @@ #include "module_base/spherical_bessel_transformer.h" #include "module_base/vector3.h" #include "module_base/ylm.h" +#include "module_base/math_sphbes.h" #include #include using iclock = std::chrono::high_resolution_clock; +using ModuleBase::Sphbes; ////////////////////////////////////////// //! for comparison with module_ao @@ -331,6 +333,62 @@ TEST_F(TwoCenterIntegratorTest, FiniteDifference) // otp.Destroy_Table(lcao); //} +TEST_F(TwoCenterIntegratorTest, SphericalBessel) +{ + int lmax = 3; + int nbes = 5; + int rcut = 7.0; + double sigma = 0.0; + double dr = 0.005; + // The truncated spherical Bessel function has discontinuous first and + // second derivative at the cutoff, so a small "dr" is required in order + // to achieve sufficient accuracy. + // + // for dr = 0.01, the error of kinetic matrix element is about 1.5e-3 + // for dr = 0.001, the error of kinetic matrix element is about 1.5e-4 + + orb.build(lmax, nbes, rcut, sigma, dr); + + ModuleBase::SphericalBesselTransformer sbt; + orb.set_transformer(sbt); + + double rmax = orb.rcut_max() * 2.0; + int nr = static_cast(rmax / dr) + 1; + + orb.set_uniform_grid(true, nr, rmax, 'i', true); + + S_intor.tabulate(orb, orb, 'S', nr, rmax); + T_intor.tabulate(orb, orb, 'T', nr, rmax); + + ModuleBase::Vector3 R0 = {0.0, 0.0, 0.0}; + + // zeros of spherical bessel functions + double* zeros = new double[nbes*(lmax+1)]; + Sphbes::sphbes_zeros(lmax, nbes, zeros, true); + + // checks the diagonal elements with analytical expression + double elem, ref; + for (int l = 0; l <= lmax; ++l) { + for (int zeta = 0; zeta < nbes; ++zeta) { + S_intor.calculate(0, l, zeta, 0, 0, l, zeta, 0, R0, &elem); + ref = 0.5 * std::pow(rcut, 3) * std::pow(Sphbes::sphbesj(l+1, zeros[l*nbes+zeta]), 2); + EXPECT_NEAR(elem, ref, 1e-5); + + T_intor.calculate(0, l, zeta, 0, 0, l, zeta, 0, R0, &elem); + ref = 0.5 * rcut * std::pow(zeros[l*nbes+zeta] * Sphbes::sphbesj(l+1, zeros[l*nbes+zeta]), 2); + EXPECT_NEAR(elem, ref, 1e-3); + + // orthogonality + for (int zeta2 = 0; zeta2 < zeta; ++zeta2) { + S_intor.calculate(0, l, zeta, 0, 0, l, zeta2, 0, R0, &elem); + ref = 0.0; + EXPECT_NEAR(elem, ref, 1e-5); + } + } + } + delete[] zeros; +} + int main(int argc, char** argv) { diff --git a/source/module_basis/module_nao/two_center_bundle.cpp b/source/module_basis/module_nao/two_center_bundle.cpp index f9479e0550..df41c79546 100644 --- a/source/module_basis/module_nao/two_center_bundle.cpp +++ b/source/module_basis/module_nao/two_center_bundle.cpp @@ -46,12 +46,22 @@ void TwoCenterBundle::build_alpha(int ndesc, std::string* file_desc0) } } +void TwoCenterBundle::build_orb_onsite(int ntype, double radius) +{ + if(GlobalV::onsite_radius > 0) + { + orb_onsite_ = std::unique_ptr(new RadialCollection); + orb_onsite_->build(orb_.get(), GlobalV::onsite_radius); + } +} + void TwoCenterBundle::tabulate() { ModuleBase::SphericalBesselTransformer sbt; orb_->set_transformer(sbt); beta_->set_transformer(sbt); if (alpha_) alpha_->set_transformer(sbt); + if (orb_onsite_) orb_onsite_->set_transformer(sbt); //================================================================ // build two-center integration tables @@ -66,6 +76,7 @@ void TwoCenterBundle::tabulate() orb_->set_uniform_grid(true, nr, cutoff, 'i', true); beta_->set_uniform_grid(true, nr, cutoff, 'i', true); if (alpha_) alpha_->set_uniform_grid(true, nr, cutoff, 'i', true); + if (orb_onsite_) orb_onsite_->set_uniform_grid(true, nr, cutoff, 'i', true); // build TwoCenterIntegrator objects kinetic_orb = std::unique_ptr(new TwoCenterIntegrator); @@ -87,6 +98,12 @@ void TwoCenterBundle::tabulate() ModuleBase::Memory::record("TwoCenterTable: Descriptor", overlap_orb_beta->table_memory()); } + if (orb_onsite_) + { + overlap_orb_onsite = std::unique_ptr(new TwoCenterIntegrator); + overlap_orb_onsite->tabulate(*orb_, *orb_onsite_, 'S', nr, cutoff); + } + ModuleBase::Memory::record("RealGauntTable", RealGauntTable::instance().memory()); // init Ylm (this shall be done by Ylm automatically! to be done later...) diff --git a/source/module_basis/module_nao/two_center_bundle.h b/source/module_basis/module_nao/two_center_bundle.h index 2ed33bdc50..5c6c7c43a7 100644 --- a/source/module_basis/module_nao/two_center_bundle.h +++ b/source/module_basis/module_nao/two_center_bundle.h @@ -17,6 +17,7 @@ class TwoCenterBundle void build_orb(int ntype, const std::string* file_orb0); void build_beta(int ntype, Numerical_Nonlocal* nl); void build_alpha(int ndesc = 0, std::string* file_desc0 = nullptr); + void build_orb_onsite(int ntype, double radius); void tabulate(); @@ -37,10 +38,12 @@ class TwoCenterBundle std::unique_ptr overlap_orb; std::unique_ptr overlap_orb_beta; std::unique_ptr overlap_orb_alpha; + std::unique_ptr overlap_orb_onsite; std::unique_ptr orb_; std::unique_ptr beta_; std::unique_ptr alpha_; + std::unique_ptr orb_onsite_; }; #endif diff --git a/source/module_basis/module_nao/two_center_integrator.h b/source/module_basis/module_nao/two_center_integrator.h index 7643d2e702..0dd0c69a1c 100644 --- a/source/module_basis/module_nao/two_center_integrator.h +++ b/source/module_basis/module_nao/two_center_integrator.h @@ -48,8 +48,6 @@ class TwoCenterIntegrator * @param[in] op Operator, could be 'S' or 'T'. * @param[in] nr Number of r-space grid points. * @param[in] cutoff r-space cutoff radius. - * @param[in] with_deriv If true, the derivative of radial table is also tabulated. - * This is necessary to compute the gradient of integrals. * */ void tabulate(const RadialCollection& bra, const RadialCollection& ket, diff --git a/source/module_cell/module_symmetry/symmetry.cpp b/source/module_cell/module_symmetry/symmetry.cpp index 8b0ca16dbb..7aac4c92fb 100644 --- a/source/module_cell/module_symmetry/symmetry.cpp +++ b/source/module_cell/module_symmetry/symmetry.cpp @@ -269,7 +269,16 @@ void Symmetry::analy_sys(const Lattice& lat, const Statistics& st, Atom* atoms, this->set_atom_map(atoms); - if (GlobalV::CALCULATION == "relax") this->all_mbl = this->is_all_movable(atoms, st); + if (GlobalV::CALCULATION == "relax") + { + this->all_mbl = this->is_all_movable(atoms, st); + if (!this->all_mbl) + { + std::cout << "WARNING: Symmetry cannot be kept when not all atoms are movable.\n "; + std::cout << "Continue with symmetry=0 ... \n"; + ModuleSymmetry::Symmetry::symm_flag = 0; + } + } delete[] newpos; delete[] na; diff --git a/source/module_cell/pseudo.cpp b/source/module_cell/pseudo.cpp index 4ded58cc81..9393e78168 100644 --- a/source/module_cell/pseudo.cpp +++ b/source/module_cell/pseudo.cpp @@ -100,7 +100,7 @@ void pseudo::set_pseudo_h(const Pseudopot_upf &upf) // mohan update 2021-02-22 // max number of points in the atomic radial mesh - int ndmx = 2000; + int ndmx = 200000; if (this->mesh > ndmx) { std::cout << "\n set_pseudo_h, too many grid points,"; diff --git a/source/module_cell/read_pp_blps.cpp b/source/module_cell/read_pp_blps.cpp index 648e201587..bc9f0d31d6 100644 --- a/source/module_cell/read_pp_blps.cpp +++ b/source/module_cell/read_pp_blps.cpp @@ -1,4 +1,6 @@ #include "read_pp.h" +#include "module_base/atom_in.h" +#include "module_base/element_name.h" int Pseudopot_upf::read_pseudo_blps(std::ifstream &ifs) { @@ -37,6 +39,16 @@ int Pseudopot_upf::read_pseudo_blps(std::ifstream &ifs) this->zp = static_cast(zion); ifs.ignore(300, '\n'); + atom_in ai; + for (auto each_type: ModuleBase::element_name) + { + if (zatom == ai.atom_Z[each_type]) + { + this->psd = each_type; + break; + } + } + int pspcod, pspxc, lloc, r2well; ifs >> pspcod >> pspxc >> this->lmax >> lloc >> this->mesh >> r2well; @@ -54,11 +66,25 @@ int Pseudopot_upf::read_pseudo_blps(std::ifstream &ifs) ModuleBase::WARNING_QUIT("Pseudopot_upf::read_pseudo_blps", msg); } - ifs.ignore(300, '\n'); - ifs.ignore(300, '\n'); - ifs.ignore(300, '\n'); - ifs.ignore(300, '\n'); - ifs.ignore(300, '\n'); + if (pspcod == 8) + { + for (int i = 0; i < 5; ++i) + { + ifs.ignore(300, '\n'); + } + } + else if (pspcod == 6) + { + for (int i = 0; i < 17; ++i) + { + ifs.ignore(300, '\n'); + } + } + else + { + std::string msg = "Unknown pspcod: " + std::to_string(pspcod); + ModuleBase::WARNING_QUIT("Pseudopot_upf::read_pseudo_blps", msg); + } assert(mesh > 0); @@ -71,11 +97,23 @@ int Pseudopot_upf::read_pseudo_blps(std::ifstream &ifs) ModuleBase::GlobalFunc::ZEROS(r,mesh); ModuleBase::GlobalFunc::ZEROS(rab,mesh); ModuleBase::GlobalFunc::ZEROS(vloc,mesh); - int num; - for(int i = 0;i < mesh; ++i) + int num = 0; + if (pspcod == 8) + { + for(int i = 0;i < mesh; ++i) + { + ifs >> num >> this->r[i] >> this->vloc[i]; + this->vloc[i] = this->vloc[i]*2; // Hartree to Ry + } + } + else if (pspcod == 6) { - ifs >> num >> this->r[i] >> this->vloc[i]; - this->vloc[i] = this->vloc[i]*2; // Hartree to Ry + double temp = 0.; + for(int i = 0;i < mesh; ++i) + { + ifs >> num >> this->r[i] >> temp >> this->vloc[i]; + this->vloc[i] = this->vloc[i]*2; // Hartree to Ry + } } rab[0] = r[1] - r[0]; for(int i = 1; i < mesh - 1; ++i) diff --git a/source/module_cell/test/read_pp_test.cpp b/source/module_cell/test/read_pp_test.cpp index e41a448b5a..3c1c7a23c5 100644 --- a/source/module_cell/test/read_pp_test.cpp +++ b/source/module_cell/test/read_pp_test.cpp @@ -494,7 +494,7 @@ TEST_F(ReadPPTest, BLPS) EXPECT_FALSE(upf->tvanp); EXPECT_FALSE(upf->has_so); EXPECT_EQ(upf->nbeta,0); - EXPECT_EQ(upf->psd,"Silicon"); + EXPECT_EQ(upf->psd,"Si"); EXPECT_EQ(upf->zp,4); EXPECT_EQ(upf->lmax,0); EXPECT_EQ(upf->mesh,1601); diff --git a/source/module_cell/unitcell.cpp b/source/module_cell/unitcell.cpp index e980e4d451..cf28b1adc2 100644 --- a/source/module_cell/unitcell.cpp +++ b/source/module_cell/unitcell.cpp @@ -1180,7 +1180,7 @@ void UnitCell::setup_cell_after_vc(std::ofstream &log) { log << std::endl; ModuleBase::GlobalFunc::OUT(log, "Volume (Bohr^3)", this->omega); - ModuleBase::GlobalFunc::OUT(log, "Volume (A^3))", this->omega * pow(ModuleBase::BOHR_TO_A, 3)); + ModuleBase::GlobalFunc::OUT(log, "Volume (A^3)", this->omega * pow(ModuleBase::BOHR_TO_A, 3)); } lat0_angstrom = lat0 * 0.529177; diff --git a/source/module_elecstate/elecstate.h b/source/module_elecstate/elecstate.h index 2c455d3923..06fc493f80 100644 --- a/source/module_elecstate/elecstate.h +++ b/source/module_elecstate/elecstate.h @@ -152,6 +152,7 @@ class ElecState void print_etot(const bool converged, const int& iter, const double& scf_thr, + const double& scf_thr_kin, const double& duration, const int printe, const double& pw_diag_thr = 0, diff --git a/source/module_elecstate/elecstate_exx.cpp b/source/module_elecstate/elecstate_exx.cpp index c4ea0ad87d..8881a74807 100644 --- a/source/module_elecstate/elecstate_exx.cpp +++ b/source/module_elecstate/elecstate_exx.cpp @@ -17,16 +17,6 @@ void ElecState::set_exx(const double& Eexx) } return; } -void ElecState::set_exx(const std::complex& Eexx) -{ - ModuleBase::TITLE("energy", "set_exx"); - - if (GlobalC::exx_info.info_global.cal_exx) - { - this->f_en.exx = GlobalC::exx_info.info_global.hybrid_alpha * std::real(Eexx); - } - return; -} #endif //__LCAO #endif //__EXX diff --git a/source/module_elecstate/elecstate_lcao.cpp b/source/module_elecstate/elecstate_lcao.cpp index df9b377376..a70153fe68 100644 --- a/source/module_elecstate/elecstate_lcao.cpp +++ b/source/module_elecstate/elecstate_lcao.cpp @@ -14,8 +14,10 @@ namespace elecstate template <> void ElecStateLCAO::print_psi(const psi::Psi& psi_in, const int istep) { - if (!ElecStateLCAO::out_wfc_lcao) - return; + if (!ElecStateLCAO::out_wfc_lcao) + { + return; + } // output but not do "2d-to-grid" conversion double** wfc_grid = nullptr; @@ -28,8 +30,11 @@ void ElecStateLCAO::print_psi(const psi::Psi& psi_in, const int template <> void ElecStateLCAO>::print_psi(const psi::Psi>& psi_in, const int istep) { - if (!ElecStateLCAO>::out_wfc_lcao && !ElecStateLCAO>::need_psi_grid) - return; + if (!ElecStateLCAO>::out_wfc_lcao + && !ElecStateLCAO>::need_psi_grid) + { + return; + } // output but not do "2d-to-grid" conversion std::complex** wfc_grid = nullptr; @@ -38,6 +43,7 @@ void ElecStateLCAO>::print_psi(const psi::Psilowf->wfc_k_grid[ik]; } + #ifdef __MPI this->lowf->wfc_2d_to_grid(istep, ElecStateLCAO>::out_wfc_flag, @@ -136,9 +142,9 @@ void ElecStateLCAO>::psiToRho(const psi::Psiuhm->GK.transfer_DM2DtoGrid(this->DM->get_DMR_vector()); // transfer DM2D to DM_grid in gint + this->gint_k->transfer_DM2DtoGrid(this->DM->get_DMR_vector()); // transfer DM2D to DM_grid in gint Gint_inout inout(this->loc->DM_R, this->charge->rho, Gint_Tools::job_type::rho); - this->uhm->GK.cal_gint(&inout); + this->gint_k->cal_gint(&inout); if (XC_Functional::get_func_type() == 3 || XC_Functional::get_func_type() == 5) { @@ -147,7 +153,7 @@ void ElecStateLCAO>::psiToRho(const psi::Psicharge->kin_r[is], this->charge->nrxx); } Gint_inout inout1(this->loc->DM_R, this->charge->kin_r, Gint_Tools::job_type::tau); - this->uhm->GK.cal_gint(&inout1); + this->gint_k->cal_gint(&inout1); } this->charge->renormalize_rho(); @@ -210,9 +216,13 @@ void ElecStateLCAO::psiToRho(const psi::Psi& psi) // calculate the charge density on real space grid. //------------------------------------------------------------ ModuleBase::GlobalFunc::NOTE("Calculate the charge on real space grid!"); - this->uhm->GG.transfer_DM2DtoGrid(this->DM->get_DMR_vector()); // transfer DM2D to DM_grid in gint + + this->gint_gamma->transfer_DM2DtoGrid(this->DM->get_DMR_vector()); // transfer DM2D to DM_grid in gint + Gint_inout inout(this->loc->DM, this->charge->rho, Gint_Tools::job_type::rho); - this->uhm->GG.cal_gint(&inout); + + this->gint_gamma->cal_gint(&inout); + if (XC_Functional::get_func_type() == 3 || XC_Functional::get_func_type() == 5) { for (int is = 0; is < GlobalV::NSPIN; is++) @@ -220,7 +230,7 @@ void ElecStateLCAO::psiToRho(const psi::Psi& psi) ModuleBase::GlobalFunc::ZEROS(this->charge->kin_r[is], this->charge->nrxx); } Gint_inout inout1(this->loc->DM, this->charge->kin_r, Gint_Tools::job_type::tau); - this->uhm->GG.cal_gint(&inout1); + this->gint_gamma->cal_gint(&inout1); } this->charge->renormalize_rho(); @@ -252,4 +262,4 @@ double ElecStateLCAO>::get_spin_constrain_energy() template class ElecStateLCAO; // Gamma_only case template class ElecStateLCAO>; // multi-k case -} // namespace elecstate \ No newline at end of file +} // namespace elecstate diff --git a/source/module_elecstate/elecstate_lcao.h b/source/module_elecstate/elecstate_lcao.h index c47e297b02..977e0a2fdb 100644 --- a/source/module_elecstate/elecstate_lcao.h +++ b/source/module_elecstate/elecstate_lcao.h @@ -2,7 +2,8 @@ #define ELECSTATELCAO_H #include "elecstate.h" -#include "module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.h" +#include "module_hamilt_lcao/module_gint/gint_gamma.h" +#include "module_hamilt_lcao/module_gint/gint_k.h" #include "module_hamilt_lcao/hamilt_lcaodft/local_orbital_charge.h" #include "module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.h" #include "module_elecstate/module_dm/density_matrix.h" @@ -18,6 +19,8 @@ class ElecStateLCAO : public ElecState const K_Vectors* klist_in , int nks_in, Local_Orbital_Charge* loc_in , + Gint_Gamma* gint_gamma_in, //mohan add 2024-04-01 + Gint_k* gint_k_in, //mohan add 2024-04-01 LCAO_Hamilt* uhm_in , Local_Orbital_wfc* lowf_in , ModulePW::PW_Basis* rhopw_in , @@ -25,15 +28,18 @@ class ElecStateLCAO : public ElecState { init_ks(chg_in, klist_in, nks_in, rhopw_in, bigpw_in); this->loc = loc_in; - this->uhm = uhm_in; + this->gint_gamma = gint_gamma_in; // mohan add 2024-04-01 + this->gint_k = gint_k_in; // mohan add 2024-04-01 this->lowf = lowf_in; this->classname = "ElecStateLCAO"; } virtual ~ElecStateLCAO() { - if (this->DM != nullptr) - delete this->DM; + if (this->DM != nullptr) + { + delete this->DM; + } } // void init(Charge* chg_in):charge(chg_in){} override; @@ -69,7 +75,9 @@ class ElecStateLCAO : public ElecState // void rhoBandK(const psi::Psi>& psi); Local_Orbital_Charge* loc = nullptr; - LCAO_Hamilt* uhm = nullptr; + Gint_Gamma* gint_gamma = nullptr; // mohan add 2024-04-01 + Gint_k* gint_k = nullptr; // mohan add 2024-04-01 + //LCAO_Hamilt* uhm = nullptr; // mohan modify 2024-04-01 Local_Orbital_wfc* lowf = nullptr; DensityMatrix* DM = nullptr; @@ -86,4 +94,4 @@ bool ElecStateLCAO::need_psi_grid = 1; } // namespace elecstate -#endif \ No newline at end of file +#endif diff --git a/source/module_elecstate/elecstate_lcao_tddft.cpp b/source/module_elecstate/elecstate_lcao_tddft.cpp index 3d3539fd1a..cc0e7133e4 100644 --- a/source/module_elecstate/elecstate_lcao_tddft.cpp +++ b/source/module_elecstate/elecstate_lcao_tddft.cpp @@ -63,9 +63,9 @@ void ElecStateLCAO_TDDFT::psiToRho_td(const psi::Psi>& psi) //------------------------------------------------------------ ModuleBase::GlobalFunc::NOTE("Calculate the charge on real space grid!"); - this->uhm->GK.transfer_DM2DtoGrid(this->DM->get_DMR_vector()); // transfer DM2D to DM_grid in gint + this->gint_k->transfer_DM2DtoGrid(this->DM->get_DMR_vector()); // transfer DM2D to DM_grid in gint Gint_inout inout(this->loc->DM_R, this->charge->rho, Gint_Tools::job_type::rho); // rho calculation - this->uhm->GK.cal_gint(&inout); + this->gint_k->cal_gint(&inout); this->charge->renormalize_rho(); @@ -110,5 +110,4 @@ void ElecStateLCAO_TDDFT::calculate_weights_td() } - -} // namespace elecstate \ No newline at end of file +} // namespace elecstate diff --git a/source/module_elecstate/elecstate_lcao_tddft.h b/source/module_elecstate/elecstate_lcao_tddft.h index f84a2c5ec2..140759e9d4 100644 --- a/source/module_elecstate/elecstate_lcao_tddft.h +++ b/source/module_elecstate/elecstate_lcao_tddft.h @@ -3,7 +3,7 @@ #include "elecstate.h" #include "elecstate_lcao.h" -#include "module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.h" +#include "module_hamilt_lcao/module_gint/gint_k.h" #include "module_hamilt_lcao/hamilt_lcaodft/local_orbital_charge.h" #include "module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.h" @@ -16,14 +16,14 @@ class ElecStateLCAO_TDDFT : public ElecStateLCAO> const K_Vectors* klist_in , int nks_in, Local_Orbital_Charge* loc_in , - LCAO_Hamilt* uhm_in , + Gint_k* gint_k_in, //mohan add 2024-04-01 Local_Orbital_wfc* lowf_in , ModulePW::PW_Basis* rhopw_in , ModulePW::PW_Basis_Big* bigpw_in ) { init_ks(chg_in, klist_in, nks_in, rhopw_in, bigpw_in); this->loc = loc_in; - this->uhm = uhm_in; + this->gint_k = gint_k_in; this->lowf = lowf_in; this->classname = "ElecStateLCAO_TDDFT"; } @@ -33,4 +33,4 @@ class ElecStateLCAO_TDDFT : public ElecStateLCAO> } // namespace elecstate -#endif \ No newline at end of file +#endif diff --git a/source/module_elecstate/elecstate_print.cpp b/source/module_elecstate/elecstate_print.cpp index f01d3ab238..1a20566aa0 100644 --- a/source/module_elecstate/elecstate_print.cpp +++ b/source/module_elecstate/elecstate_print.cpp @@ -154,6 +154,7 @@ void ElecState::print_band(const int& ik, const int& printe, const int& iter) void ElecState::print_etot(const bool converged, const int& iter_in, const double& scf_thr, + const double& scf_thr_kin, const double& duration, const int printe, const double& pw_diag_thr, @@ -260,6 +261,7 @@ void ElecState::print_etot(const bool converged, { this->f_en.etot_old = this->f_en.etot; } + this->f_en.etot_delta = this->f_en.etot - this->f_en.etot_old; // mohan update 2011-02-26 std::stringstream ss; @@ -373,9 +375,14 @@ void ElecState::print_etot(const bool converged, } std::cout << std::setprecision(6); std::cout << std::setw(15) << this->f_en.etot * ModuleBase::Ry_to_eV; - std::cout << std::setw(15) << (this->f_en.etot - this->f_en.etot_old) * ModuleBase::Ry_to_eV; + std::cout << std::setw(15) << this->f_en.etot_delta * ModuleBase::Ry_to_eV; std::cout << std::setprecision(3); std::cout << std::setw(11) << scf_thr; + if (elecstate::get_xc_func_type() == 3 || elecstate::get_xc_func_type() == 5) + { + std::cout << std::setprecision(3); + std::cout << std::setw(11) << scf_thr_kin; + } std::cout << std::setprecision(3); std::cout << std::setw(11) << duration; std::cout << std::endl; diff --git a/source/module_elecstate/fp_energy.h b/source/module_elecstate/fp_energy.h index bb5e90dc53..4d3e8d4ec3 100644 --- a/source/module_elecstate/fp_energy.h +++ b/source/module_elecstate/fp_energy.h @@ -14,6 +14,7 @@ struct fenergy { double etot = 0.0; ///< the total free energy double etot_old = 0.0; ///< old total free energy + double etot_delta = 0.0; // the difference of total energy between two steps = etot - etot_old double eband = 0.0; ///< the band energy double deband = 0.0; ///< correction for variational energy diff --git a/source/module_elecstate/module_charge/charge.cpp b/source/module_elecstate/module_charge/charge.cpp index 5056fbc9f2..b1c7dee91d 100644 --- a/source/module_elecstate/module_charge/charge.cpp +++ b/source/module_elecstate/module_charge/charge.cpp @@ -360,9 +360,15 @@ void Charge::atomic_rho(const int spin_number_need, rhoatm[ir] = atom->ncpp.rho_at[ir] / ModuleBase::FOUR_PI / r2; } rhoatm[0] - = pow((rhoatm[2] / rhoatm[1]), 1. / (atom->ncpp.r[2] - atom->ncpp.r[1])); // zws add - rhoatm[0] = pow(rhoatm[0], atom->ncpp.r[1]); - rhoatm[0] = rhoatm[1] / rhoatm[0]; + = pow((rhoatm[2] / rhoatm[1]), atom->ncpp.r[1] / (atom->ncpp.r[2] - atom->ncpp.r[1])); // zws add, sunliang updated 2024-03-04 + if (rhoatm[0] < 1e-12) + { + rhoatm[0] = rhoatm[1]; + } + else + { + rhoatm[0] = rhoatm[1] / rhoatm[0]; + } double charge = 0.0; ModuleBase::Integral::Simpson_Integral(atom->ncpp.msh, diff --git a/source/module_elecstate/module_charge/charge_extra.cpp b/source/module_elecstate/module_charge/charge_extra.cpp index b2f26fbd71..0a869db7af 100644 --- a/source/module_elecstate/module_charge/charge_extra.cpp +++ b/source/module_elecstate/module_charge/charge_extra.cpp @@ -429,7 +429,11 @@ void Charge_Extra::read_files( #ifdef __MPI Pgrid, #endif + GlobalV::MY_RANK, + GlobalV::ESOLVER_TYPE, + GlobalV::RANK_IN_STOGROUP, is, + GlobalV::ofs_running, GlobalV::NSPIN, filename, data[is], diff --git a/source/module_elecstate/module_charge/charge_init.cpp b/source/module_elecstate/module_charge/charge_init.cpp index 5b8ea4c693..1fac358e8d 100644 --- a/source/module_elecstate/module_charge/charge_init.cpp +++ b/source/module_elecstate/module_charge/charge_init.cpp @@ -52,7 +52,11 @@ void Charge::init_rho(elecstate::efermi& eferm_iout, const ModuleBase::ComplexMa #ifdef __MPI &(GlobalC::Pgrid), #endif + GlobalV::MY_RANK, + GlobalV::ESOLVER_TYPE, + GlobalV::RANK_IN_STOGROUP, is, + GlobalV::ofs_running, GlobalV::NSPIN, ssc.str(), this->rho[is], @@ -123,7 +127,11 @@ void Charge::init_rho(elecstate::efermi& eferm_iout, const ModuleBase::ComplexMa #ifdef __MPI &(GlobalC::Pgrid), #endif + GlobalV::MY_RANK, + GlobalV::ESOLVER_TYPE, + GlobalV::RANK_IN_STOGROUP, is, + GlobalV::ofs_running, GlobalV::NSPIN, ssc.str(), this->kin_r[is], @@ -174,7 +182,7 @@ void Charge::init_rho(elecstate::efermi& eferm_iout, const ModuleBase::ComplexMa { for (int is = 0; is < GlobalV::NSPIN; ++is) { - GlobalC::restart.load_disk("charge", is, this->nrxx, rho); + GlobalC::restart.load_disk("charge", is, this->nrxx, rho[is]); } GlobalC::restart.info_load.load_charge_finish = true; } diff --git a/source/module_elecstate/module_charge/charge_mixing.cpp b/source/module_elecstate/module_charge/charge_mixing.cpp index 9e2df119be..a44c050a1a 100755 --- a/source/module_elecstate/module_charge/charge_mixing.cpp +++ b/source/module_elecstate/module_charge/charge_mixing.cpp @@ -264,6 +264,44 @@ double Charge_Mixing::get_drho(Charge* chr, const double nelec) return drho; } +double Charge_Mixing::get_dkin(Charge* chr, const double nelec) +{ + if (!(XC_Functional::get_func_type() == 3 || XC_Functional::get_func_type() == 5)) + { + return 0.0; + }; + ModuleBase::TITLE("Charge_Mixing", "get_dkin"); + ModuleBase::timer::tick("Charge_Mixing", "get_dkin"); + double dkin = 0.0; + + // Get dkin from kin_r and kin_r_save for PW and LCAO both, which is different from drho. + for (int is = 0; is < GlobalV::NSPIN; is++) + { + if (is != 0 && is != 3 && GlobalV::DOMAG_Z) + { + continue; + } +#ifdef _OPENMP +#pragma omp parallel for reduction(+ : dkin) +#endif + for (int ir = 0; ir < this->rhopw->nrxx; ir++) + { + dkin += std::abs(chr->kin_r[is][ir] - chr->kin_r_save[is][ir]); + } + } +#ifdef __MPI + Parallel_Reduce::reduce_pool(dkin); +#endif + assert(nelec != 0); + assert(GlobalC::ucell.omega > 0); + assert(this->rhopw->nxyz > 0); + dkin *= GlobalC::ucell.omega / static_cast(this->rhopw->nxyz); + dkin /= nelec; + + ModuleBase::timer::tick("Charge_Mixing", "get_dkin"); + return dkin; +} + void Charge_Mixing::mix_rho_recip(Charge* chr) { std::complex* rhog_in = nullptr; diff --git a/source/module_elecstate/module_charge/charge_mixing.h b/source/module_elecstate/module_charge/charge_mixing.h index 98bdc277f2..3eb0127ec0 100644 --- a/source/module_elecstate/module_charge/charge_mixing.h +++ b/source/module_elecstate/module_charge/charge_mixing.h @@ -74,10 +74,11 @@ class Charge_Mixing void mix_dmr(elecstate::DensityMatrix, double>* DM); /** - * @brief Get the drho + * @brief Get the drho between rho and rho_save, similar for get_dkin * */ double get_drho(Charge* chr, const double nelec); + double get_dkin(Charge* chr, const double nelec); /** * @brief reset mixing, actually we only call init_mixing() to reset mixing instead of this function diff --git a/source/module_elecstate/module_dm/cal_dm_psi.cpp b/source/module_elecstate/module_dm/cal_dm_psi.cpp index 4164294b75..58d58ea959 100644 --- a/source/module_elecstate/module_dm/cal_dm_psi.cpp +++ b/source/module_elecstate/module_dm/cal_dm_psi.cpp @@ -44,8 +44,10 @@ void cal_dm_psi(const Parallel_Orbitals* ParaV, ModuleBase::WARNING_QUIT("ElecStateLCAO::cal_dm", "please check global2local_col!"); } } - if (ib_global >= wg.nc) - continue; + if (ib_global >= wg.nc) + { + continue; + } const double wg_local = wg(ik, ib_global); double* wg_wfc_pointer = &(wg_wfc(0, ib_local, 0)); BlasConnector::scal(nbasis_local, wg_local, wg_wfc_pointer, 1); @@ -107,9 +109,11 @@ void cal_dm_psi(const Parallel_Orbitals* ParaV, ModuleBase::WARNING_QUIT("ElecStateLCAO::cal_dm", "please check global2local_col!"); } } - if (ib_global >= wg.nc) - continue; - const double wg_local = wg(ik, ib_global); + if (ib_global >= wg.nc) + { + continue; + } + const double wg_local = wg(ik, ib_global); std::complex* wg_wfc_pointer = &(wg_wfc(0, ib_local, 0)); BlasConnector::scal(nbasis_local, wg_local, wg_wfc_pointer, 1); } @@ -233,7 +237,8 @@ void psiMulPsi(const psi::Psi>& psi1, const char N_char = 'N', T_char = 'T'; const int nlocal = psi1.get_nbasis(); const int nbands = psi1.get_nbands(); - const std::complex one_complex = {1.0, 0.0}, zero_complex = {0.0, 0.0}; + const std::complex one_complex = {1.0, 0.0}; + const std::complex zero_complex = {0.0, 0.0}; zgemm_(&N_char, &T_char, &nlocal, diff --git a/source/module_elecstate/module_dm/density_matrix.cpp b/source/module_elecstate/module_dm/density_matrix.cpp index 865245f905..bdd1947d62 100644 --- a/source/module_elecstate/module_dm/density_matrix.cpp +++ b/source/module_elecstate/module_dm/density_matrix.cpp @@ -440,11 +440,11 @@ void DensityMatrix::cal_DMR_test() const int* r_index = tmp_ap.get_R_index(ir); hamilt::BaseMatrix* tmp_matrix = tmp_ap.find_matrix(r_index[0], r_index[1], r_index[2]); #ifdef __DEBUG - if (tmp_matrix == nullptr) - { - std::cout << "tmp_matrix is nullptr" << std::endl; - continue; - } + if (tmp_matrix == nullptr) + { + std::cout << "tmp_matrix is nullptr" << std::endl; + continue; + } #endif std::complex tmp_res; // loop over k-points @@ -515,44 +515,47 @@ void DensityMatrix, double>::cal_DMR() #endif // loop over k-points if(GlobalV::NSPIN !=4 ) - for (int ik = 0; ik < this->_nks; ++ik) - { - // cal k_phase - // if TK==std::complex, kphase is e^{ikR} - const ModuleBase::Vector3 dR(r_index[0], r_index[1], r_index[2]); - const double arg = (this->_kv->kvec_d[ik] * dR) * ModuleBase::TWO_PI; - double sinp, cosp; - ModuleBase::libm::sincos(arg, &sinp, &cosp); - std::complex kphase = std::complex(cosp, sinp); - // set DMR element - double* tmp_DMR_pointer = tmp_matrix->get_pointer(); - std::complex* tmp_DMK_pointer = this->_DMK[ik + ik_begin].data(); - double* DMK_real_pointer = nullptr; - double* DMK_imag_pointer = nullptr; - // jump DMK to fill DMR - // DMR is row-major, DMK is column-major - tmp_DMK_pointer += col_ap * this->_paraV->nrow + row_ap; - for (int mu = 0; mu < this->_paraV->get_row_size(iat1); ++mu) - { - DMK_real_pointer = (double*)tmp_DMK_pointer; - DMK_imag_pointer = DMK_real_pointer + 1; - BlasConnector::axpy(this->_paraV->get_col_size(iat2), - kphase.real(), - DMK_real_pointer, - ld_hk2, - tmp_DMR_pointer, - 1); - // "-" since i^2 = -1 - BlasConnector::axpy(this->_paraV->get_col_size(iat2), - -kphase.imag(), - DMK_imag_pointer, - ld_hk2, - tmp_DMR_pointer, - 1); - tmp_DMK_pointer += 1; - tmp_DMR_pointer += this->_paraV->get_col_size(iat2); - } - } + { + for (int ik = 0; ik < this->_nks; ++ik) + { + // cal k_phase + // if TK==std::complex, kphase is e^{ikR} + const ModuleBase::Vector3 dR(r_index[0], r_index[1], r_index[2]); + const double arg = (this->_kv->kvec_d[ik] * dR) * ModuleBase::TWO_PI; + double sinp, cosp; + ModuleBase::libm::sincos(arg, &sinp, &cosp); + std::complex kphase = std::complex(cosp, sinp); + // set DMR element + double* tmp_DMR_pointer = tmp_matrix->get_pointer(); + std::complex* tmp_DMK_pointer = this->_DMK[ik + ik_begin].data(); + double* DMK_real_pointer = nullptr; + double* DMK_imag_pointer = nullptr; + // jump DMK to fill DMR + // DMR is row-major, DMK is column-major + tmp_DMK_pointer += col_ap * this->_paraV->nrow + row_ap; + for (int mu = 0; mu < this->_paraV->get_row_size(iat1); ++mu) + { + DMK_real_pointer = (double*)tmp_DMK_pointer; + DMK_imag_pointer = DMK_real_pointer + 1; + BlasConnector::axpy(this->_paraV->get_col_size(iat2), + kphase.real(), + DMK_real_pointer, + ld_hk2, + tmp_DMR_pointer, + 1); + // "-" since i^2 = -1 + BlasConnector::axpy(this->_paraV->get_col_size(iat2), + -kphase.imag(), + DMK_imag_pointer, + ld_hk2, + tmp_DMR_pointer, + 1); + tmp_DMK_pointer += 1; + tmp_DMR_pointer += this->_paraV->get_col_size(iat2); + } + } + } + // treat DMR as pauli matrix when NSPIN=4 if(GlobalV::NSPIN==4) { diff --git a/source/module_elecstate/module_dm/density_matrix.h b/source/module_elecstate/module_dm/density_matrix.h index 519f798f5d..1c758ae139 100644 --- a/source/module_elecstate/module_dm/density_matrix.h +++ b/source/module_elecstate/module_dm/density_matrix.h @@ -15,28 +15,33 @@ namespace elecstate * = for Gamma-only calculation * = ,double> for multi-k calculation */ - template struct ShiftRealComplex - { - using type = void; - }; - template<> - struct ShiftRealComplex { - using type = std::complex; - }; - template<> - struct ShiftRealComplex> { - using type = double; - }; - - template - class DensityMatrix - { - using TRShift = typename ShiftRealComplex::type; - public: - /** - * @brief Destructor of class DensityMatrix - */ - ~DensityMatrix(); +template struct ShiftRealComplex +{ + using type = void; +}; + +template<> +struct ShiftRealComplex +{ + using type = std::complex; +}; + +template<> +struct ShiftRealComplex> +{ + using type = double; +}; + +template +class DensityMatrix +{ + using TRShift = typename ShiftRealComplex::type; + + public: + /** + * @brief Destructor of class DensityMatrix + */ + ~DensityMatrix(); /** * @brief Constructor of class DensityMatrix for multi-k calculation @@ -160,6 +165,7 @@ namespace elecstate * @brief get pointer of paraV */ const Parallel_Orbitals* get_paraV_pointer() const; + const K_Vectors* get_kv_pointer() const; /** diff --git a/source/module_elecstate/test/elecstate_energy_test.cpp b/source/module_elecstate/test/elecstate_energy_test.cpp index e6fa84894d..141914fd45 100644 --- a/source/module_elecstate/test/elecstate_energy_test.cpp +++ b/source/module_elecstate/test/elecstate_energy_test.cpp @@ -67,7 +67,7 @@ class MockElecState : public ElecState void Set_GlobalV_Default() { GlobalV::imp_sol = false; - GlobalV::dft_plus_u = false; + GlobalV::dft_plus_u = 0; // base class GlobalV::NSPIN = 1; GlobalV::nelec = 10.0; @@ -128,7 +128,7 @@ TEST_F(ElecStateEnergyTest, CalEnergiesHarrisImpSol) TEST_F(ElecStateEnergyTest, CalEnergiesHarrisDFTU) { elecstate->f_en.deband_harris = 0.1; - GlobalV::dft_plus_u = true; + GlobalV::dft_plus_u = 1; elecstate->cal_energies(1); // deband_harris + hatree + efiled + gatefield + edftu + escon #ifdef __LCAO @@ -158,7 +158,7 @@ TEST_F(ElecStateEnergyTest, CalEnergiesEtotImpSol) TEST_F(ElecStateEnergyTest, CalEnergiesEtotDFTU) { elecstate->f_en.deband = 0.1; - GlobalV::dft_plus_u = true; + GlobalV::dft_plus_u = 1; elecstate->cal_energies(2); // deband + hatree + efiled + gatefield + edftu + escon #ifdef __LCAO diff --git a/source/module_elecstate/test/elecstate_print_test.cpp b/source/module_elecstate/test/elecstate_print_test.cpp index 08a91ca407..69f93df393 100644 --- a/source/module_elecstate/test/elecstate_print_test.cpp +++ b/source/module_elecstate/test/elecstate_print_test.cpp @@ -67,6 +67,10 @@ Charge::Charge() Charge::~Charge() { } +int elecstate::get_xc_func_type() +{ + return 0; +} /*************************************************************** * unit test of functions in elecstate_print.cpp @@ -223,6 +227,7 @@ TEST_F(ElecStatePrintTest, PrintEtot) bool converged = false; int iter = 1; double scf_thr = 0.1; + double scf_thr_kin = 0.0; double duration = 2.0; int printe = 1; double pw_diag_thr = 0.1; @@ -245,7 +250,7 @@ TEST_F(ElecStatePrintTest, PrintEtot) for (int i = 0; i < vdw_methods.size(); i++) { elecstate::tmp_vdw_method = vdw_methods[i]; - elecstate.print_etot(converged, iter, scf_thr, duration, printe, pw_diag_thr, avg_iter, false); + elecstate.print_etot(converged, iter, scf_thr, scf_thr_kin, duration, printe, pw_diag_thr, avg_iter, false); } // iteration of different ks_solver std::vector ks_solvers = {"cg", "lapack", "genelpa", "dav", "scalapack_gvx", "cusolver"}; @@ -253,7 +258,7 @@ TEST_F(ElecStatePrintTest, PrintEtot) { elecstate::tmp_ks_solver = ks_solvers[i]; testing::internal::CaptureStdout(); - elecstate.print_etot(converged, iter, scf_thr, duration, printe, pw_diag_thr, avg_iter, print); + elecstate.print_etot(converged, iter, scf_thr, scf_thr_kin, duration, printe, pw_diag_thr, avg_iter, print); output = testing::internal::GetCapturedStdout(); if (elecstate::tmp_ks_solver == "cg") { @@ -303,6 +308,7 @@ TEST_F(ElecStatePrintTest, PrintEtot2) bool converged = false; int iter = 1; double scf_thr = 0.1; + double scf_thr_kin = 0.0; double duration = 2.0; int printe = 0; double pw_diag_thr = 0.1; @@ -320,7 +326,7 @@ TEST_F(ElecStatePrintTest, PrintEtot2) GlobalV::MY_RANK = 0; GlobalV::BASIS_TYPE = "pw"; GlobalV::SCF_NMAX = 100; - elecstate.print_etot(converged, iter, scf_thr, duration, printe, pw_diag_thr, avg_iter, print); + elecstate.print_etot(converged, iter, scf_thr, scf_thr_kin, duration, printe, pw_diag_thr, avg_iter, print); GlobalV::ofs_running.close(); ifs.open("test.dat", std::ios::in); std::string str((std::istreambuf_iterator(ifs)), std::istreambuf_iterator()); @@ -340,6 +346,7 @@ TEST_F(ElecStatePrintTest, PrintEtotColorS2) bool converged = false; int iter = 1; double scf_thr = 2.0; + double scf_thr_kin = 0.0; double duration = 2.0; int printe = 1; double pw_diag_thr = 0.1; @@ -356,7 +363,7 @@ TEST_F(ElecStatePrintTest, PrintEtotColorS2) GlobalV::COLOUR = true; GlobalV::NSPIN = 2; GlobalV::MY_RANK = 0; - elecstate.print_etot(converged, iter, scf_thr, duration, printe, pw_diag_thr, avg_iter, print); + elecstate.print_etot(converged, iter, scf_thr, scf_thr_kin, duration, printe, pw_diag_thr, avg_iter, print); } TEST_F(ElecStatePrintTest, PrintEtotColorS4) @@ -364,6 +371,7 @@ TEST_F(ElecStatePrintTest, PrintEtotColorS4) bool converged = false; int iter = 1; double scf_thr = 0.1; + double scf_thr_kin = 0.0; double duration = 2.0; int printe = 1; double pw_diag_thr = 0.1; @@ -381,7 +389,7 @@ TEST_F(ElecStatePrintTest, PrintEtotColorS4) GlobalV::NSPIN = 4; GlobalV::NONCOLIN = true; GlobalV::MY_RANK = 0; - elecstate.print_etot(converged, iter, scf_thr, duration, printe, pw_diag_thr, avg_iter, print); + elecstate.print_etot(converged, iter, scf_thr, scf_thr_kin, duration, printe, pw_diag_thr, avg_iter, print); } TEST_F(ElecStatePrintTest, PrintEtotWarning) @@ -390,6 +398,7 @@ TEST_F(ElecStatePrintTest, PrintEtotWarning) bool converged = false; int iter = 1; double scf_thr = 0.1; + double scf_thr_kin = 0.0; double duration = 2.0; int printe = 0; double pw_diag_thr = 0.1; @@ -409,7 +418,7 @@ TEST_F(ElecStatePrintTest, PrintEtotWarning) GlobalV::SCF_NMAX = 100; elecstate::tmp_ks_solver = "unknown"; testing::internal::CaptureStdout(); - EXPECT_EXIT(elecstate.print_etot(converged, iter, scf_thr, duration, printe, pw_diag_thr, avg_iter, print), ::testing::ExitedWithCode(0), ""); + EXPECT_EXIT(elecstate.print_etot(converged, iter, scf_thr, scf_thr_kin, duration, printe, pw_diag_thr, avg_iter, print), ::testing::ExitedWithCode(0), ""); output = testing::internal::GetCapturedStdout(); EXPECT_THAT(output, testing::HasSubstr("print_etot found unknown ks_solver_type")); GlobalV::ofs_running.close(); diff --git a/source/module_esolver/esolver.cpp b/source/module_esolver/esolver.cpp index 336ed32b1b..fb366dfaf3 100644 --- a/source/module_esolver/esolver.cpp +++ b/source/module_esolver/esolver.cpp @@ -13,152 +13,173 @@ namespace ModuleESolver { - void ESolver::printname() - { - std::cout << classname << std::endl; - } - std::string determine_type() - { - std::string esolver_type = "none"; - if (GlobalV::BASIS_TYPE == "pw") - { - if(GlobalV::ESOLVER_TYPE == "sdft") - { - esolver_type = "sdft_pw"; - } - else if(GlobalV::ESOLVER_TYPE == "ofdft") - { - esolver_type = "ofdft"; - } - else if(GlobalV::ESOLVER_TYPE == "ksdft") - { - esolver_type = "ksdft_pw"; - } - } - else if (GlobalV::BASIS_TYPE == "lcao_in_pw") - { +void ESolver::printname(void) +{ + std::cout << classname << std::endl; +} + +std::string determine_type(void) +{ + std::string esolver_type = "none"; + if (GlobalV::BASIS_TYPE == "pw") + { + if(GlobalV::ESOLVER_TYPE == "sdft") + { + esolver_type = "sdft_pw"; + } + else if(GlobalV::ESOLVER_TYPE == "ofdft") + { + esolver_type = "ofdft"; + } + else if(GlobalV::ESOLVER_TYPE == "ksdft") + { + esolver_type = "ksdft_pw"; + } + } + else if (GlobalV::BASIS_TYPE == "lcao_in_pw") + { #ifdef __LCAO - if(GlobalV::ESOLVER_TYPE == "sdft") - { - esolver_type = "sdft_pw"; - } - else if(GlobalV::ESOLVER_TYPE == "ksdft") - { - esolver_type = "ksdft_pw"; - } + if(GlobalV::ESOLVER_TYPE == "sdft") + { + esolver_type = "sdft_pw"; + } + else if(GlobalV::ESOLVER_TYPE == "ksdft") + { + esolver_type = "ksdft_pw"; + } #else - ModuleBase::WARNING_QUIT("ESolver", "LCAO basis type must be compiled with __LCAO"); + ModuleBase::WARNING_QUIT("ESolver", "LCAO basis type must be compiled with __LCAO"); #endif - } - else if (GlobalV::BASIS_TYPE == "lcao") - { + } + else if (GlobalV::BASIS_TYPE == "lcao") + { #ifdef __LCAO - if(GlobalV::ESOLVER_TYPE == "tddft") - { - esolver_type = "ksdft_lcao_tddft"; - } - else if(GlobalV::ESOLVER_TYPE == "ksdft") - { - esolver_type = "ksdft_lcao"; - } + if(GlobalV::ESOLVER_TYPE == "tddft") + { + esolver_type = "ksdft_lcao_tddft"; + } + else if(GlobalV::ESOLVER_TYPE == "ksdft") + { + esolver_type = "ksdft_lcao"; + } #else - ModuleBase::WARNING_QUIT("ESolver", "LCAO basis type must be compiled with __LCAO"); + ModuleBase::WARNING_QUIT("ESolver", "LCAO basis type must be compiled with __LCAO"); #endif - } + } + + if(GlobalV::ESOLVER_TYPE == "lj") + { + esolver_type = "lj_pot"; + } + else if(GlobalV::ESOLVER_TYPE == "dp") + { + esolver_type = "dp_pot"; + } + else if(esolver_type == "none") + { + ModuleBase::WARNING_QUIT("ESolver", "No such esolver_type combined with basis_type"); + } + + GlobalV::ofs_running << " The esolver type has been set to : " << esolver_type << std::endl; + + auto device_info = GlobalV::device_flag; + + for (char &c : device_info) + { + if (std::islower(c)) + { + c = std::toupper(c); + } + } + if (GlobalV::MY_RANK == 0) + { + std::cout << " RUNNING WITH DEVICE : " << device_info << " / " + << psi::device::get_device_info(GlobalV::device_flag) << std::endl; + } - if(GlobalV::ESOLVER_TYPE == "lj") - { - esolver_type = "lj_pot"; - } - else if(GlobalV::ESOLVER_TYPE == "dp") - { - esolver_type = "dp_pot"; - } - else if(esolver_type == "none") - { - ModuleBase::WARNING_QUIT("ESolver", "No such esolver_type combined with basis_type"); - } + GlobalV::ofs_running << "\n RUNNING WITH DEVICE : " << device_info << " / " + << psi::device::get_device_info(GlobalV::device_flag) << std::endl; + + return esolver_type; +} - GlobalV::ofs_running << " The esolver type has been set to : " << esolver_type << std::endl; - auto device_info = GlobalV::device_flag; - for (char &c : device_info) { - if (std::islower(c)) { - c = std::toupper(c); - } - } - if (GlobalV::MY_RANK == 0) { - std::cout << " RUNNING WITH DEVICE : " << device_info << " / " - << psi::device::get_device_info(GlobalV::device_flag) << std::endl; - } - GlobalV::ofs_running << "\n RUNNING WITH DEVICE : " << device_info << " / " - << psi::device::get_device_info(GlobalV::device_flag) << std::endl; - return esolver_type; - } - //Some API to operate E_Solver - void init_esolver(ESolver*& p_esolver) - { - //determine type of esolver based on INPUT information - std::string esolver_type = determine_type(); +//Some API to operate E_Solver +void init_esolver(ESolver*& p_esolver) +{ + //determine type of esolver based on INPUT information + std::string esolver_type = determine_type(); - //initialize the corresponding Esolver child class - if (esolver_type == "ksdft_pw") - { - #if ((defined __CUDA) || (defined __ROCM)) - if (GlobalV::device_flag == "gpu") { - if (GlobalV::precision_flag == "single") { - p_esolver = new ESolver_KS_PW, psi::DEVICE_GPU>(); - } - else { - p_esolver = new ESolver_KS_PW, psi::DEVICE_GPU>(); - } - return; - } - #endif - if (GlobalV::precision_flag == "single") { - p_esolver = new ESolver_KS_PW, psi::DEVICE_CPU>(); - } - else { - p_esolver = new ESolver_KS_PW, psi::DEVICE_CPU>(); - } - } + //initialize the corresponding Esolver child class + if (esolver_type == "ksdft_pw") + { +#if ((defined __CUDA) || (defined __ROCM)) + if (GlobalV::device_flag == "gpu") + { + if (GlobalV::precision_flag == "single") + { + p_esolver = new ESolver_KS_PW, psi::DEVICE_GPU>(); + } + else + { + p_esolver = new ESolver_KS_PW, psi::DEVICE_GPU>(); + } + return; + } +#endif + if (GlobalV::precision_flag == "single") + { + p_esolver = new ESolver_KS_PW, psi::DEVICE_CPU>(); + } + else + { + p_esolver = new ESolver_KS_PW, psi::DEVICE_CPU>(); + } + } #ifdef __LCAO - else if (esolver_type == "ksdft_lcao") - { - if (GlobalV::GAMMA_ONLY_LOCAL) - p_esolver = new ESolver_KS_LCAO(); - else if (GlobalV::NSPIN < 4) - p_esolver = new ESolver_KS_LCAO, double>(); - else - p_esolver = new ESolver_KS_LCAO, std::complex>(); - } - else if (esolver_type == "ksdft_lcao_tddft") - { - p_esolver = new ESolver_KS_LCAO_TDDFT(); - } + else if (esolver_type == "ksdft_lcao") + { + if (GlobalV::GAMMA_ONLY_LOCAL) + { + p_esolver = new ESolver_KS_LCAO(); + } + else if (GlobalV::NSPIN < 4) + { + p_esolver = new ESolver_KS_LCAO, double>(); + } + else + { + p_esolver = new ESolver_KS_LCAO, std::complex>(); + } + } + else if (esolver_type == "ksdft_lcao_tddft") + { + p_esolver = new ESolver_KS_LCAO_TDDFT(); + } #endif - else if (esolver_type == "sdft_pw") - { - p_esolver = new ESolver_SDFT_PW(); - } - else if(esolver_type == "ofdft") - { - p_esolver = new ESolver_OF(); - } - else if (esolver_type == "lj_pot") - { - p_esolver = new ESolver_LJ(); - } - else if (esolver_type == "dp_pot") - { - p_esolver = new ESolver_DP(INPUT.mdp.pot_file); - } - } + else if (esolver_type == "sdft_pw") + { + p_esolver = new ESolver_SDFT_PW(); + } + else if(esolver_type == "ofdft") + { + p_esolver = new ESolver_OF(); + } + else if (esolver_type == "lj_pot") + { + p_esolver = new ESolver_LJ(); + } + else if (esolver_type == "dp_pot") + { + p_esolver = new ESolver_DP(INPUT.mdp.pot_file); + } +} + - void clean_esolver(ESolver*& pesolver) - { - delete pesolver; - } +void clean_esolver(ESolver*& pesolver) +{ + delete pesolver; +} } diff --git a/source/module_esolver/esolver.h b/source/module_esolver/esolver.h index 88345617ce..142efa2a4a 100644 --- a/source/module_esolver/esolver.h +++ b/source/module_esolver/esolver.h @@ -9,8 +9,6 @@ namespace ModuleESolver { class ESolver { - // protected: - // ModuleBase::matrix lattice_v; public: ESolver() { @@ -21,24 +19,27 @@ class ESolver { } - // virtual void Init(Input_EnSolver &inp, matrix &lattice_v)=0 - virtual void Init(Input& inp, UnitCell& cell) = 0; + //! initialize the energy solver by using input parameters and cell modules + virtual void init(Input& inp, UnitCell& cell) = 0; - // They shoud be add after atom class is refactored - // virtual void UpdateLatAtom(ModuleBase::matrix &lat_in, Atom &atom_in); - // virtual void UpdateLat(ModuleBase::matrix &lat_in); - // virtual void UpdateAtom(Atom &atom_in); + //! run energy solver + virtual void run(int istep, UnitCell& cell) = 0; - virtual void Run(int istep, UnitCell& cell) = 0; + //! deal with exx and other calculation than scf/md/relax: + //! such as nscf, get_wf and get_pchg + virtual void others(const int istep){}; - // Deal with exx and other calculation than scf/md/relax: - // such as nscf, get_wf and get_pchg - virtual void othercalculation(const int istep){}; + //! calculate total energy of a given system + virtual double cal_energy() = 0; - virtual double cal_Energy() = 0; - virtual void cal_Force(ModuleBase::matrix& force) = 0; - virtual void cal_Stress(ModuleBase::matrix& stress) = 0; - virtual void postprocess(){}; + //! calcualte forces for the atoms in the given cell + virtual void cal_force(ModuleBase::matrix& force) = 0; + + //! calcualte stress of given cell + virtual void cal_stress(ModuleBase::matrix& stress) = 0; + + //! perform post processing calculations + virtual void post_process(){}; // Print current classname. void printname(); @@ -59,7 +60,7 @@ class ESolver * * @return [out] std::string The type of ESolver */ -std::string determine_type(); +std::string determine_type(void); /** * @brief Determine and initialize an ESolver based on input information. diff --git a/source/module_esolver/esolver_dp.cpp b/source/module_esolver/esolver_dp.cpp index 8551ead5ff..4406a38ef8 100644 --- a/source/module_esolver/esolver_dp.cpp +++ b/source/module_esolver/esolver_dp.cpp @@ -25,7 +25,7 @@ namespace ModuleESolver { - void ESolver_DP::Init(Input& inp, UnitCell& ucell) + void ESolver_DP::init(Input& inp, UnitCell& ucell) { ucell_ = &ucell; dp_potential = 0; @@ -59,7 +59,7 @@ namespace ModuleESolver assert(ucell.nat == iat); } - void ESolver_DP::Run(const int istep, UnitCell& ucell) + void ESolver_DP::run(const int istep, UnitCell& ucell) { ModuleBase::TITLE("ESolver_DP", "Run"); ModuleBase::timer::tick("ESolver_DP", "Run"); @@ -122,18 +122,18 @@ namespace ModuleESolver ModuleBase::timer::tick("ESolver_DP", "Run"); } - double ESolver_DP::cal_Energy() + double ESolver_DP::cal_energy() { return dp_potential; } - void ESolver_DP::cal_Force(ModuleBase::matrix& force) + void ESolver_DP::cal_force(ModuleBase::matrix& force) { force = dp_force; ModuleIO::print_force(GlobalV::ofs_running, *ucell_, "TOTAL-FORCE (eV/Angstrom)", force, false); } - void ESolver_DP::cal_Stress(ModuleBase::matrix& stress) + void ESolver_DP::cal_stress(ModuleBase::matrix& stress) { stress = dp_virial; @@ -148,7 +148,7 @@ namespace ModuleESolver ModuleIO::print_stress("TOTAL-STRESS", stress, true, false); } - void ESolver_DP::postprocess() + void ESolver_DP::post_process(void) { GlobalV::ofs_running << "\n\n --------------------------------------------" << std::endl; GlobalV::ofs_running << std::setprecision(16); diff --git a/source/module_esolver/esolver_dp.h b/source/module_esolver/esolver_dp.h index 8e61661c38..54008eb038 100644 --- a/source/module_esolver/esolver_dp.h +++ b/source/module_esolver/esolver_dp.h @@ -36,7 +36,7 @@ class ESolver_DP : public ESolver * @param inp input parameters * @param cell unitcell information */ - void Init(Input& inp, UnitCell& cell) override; + void init(Input& inp, UnitCell& cell) override; /** * @brief Run the DP solver for a given ion/md step and unit cell @@ -44,7 +44,7 @@ class ESolver_DP : public ESolver * @param istep the current ion/md step * @param cell unitcell information */ - void Run(const int istep, UnitCell& cell) override; + void run(const int istep, UnitCell& cell) override; /** * @brief get the total energy without ion kinetic energy @@ -52,28 +52,28 @@ class ESolver_DP : public ESolver * @param etot the computed energy * @return total energy without ion kinetic energy */ - double cal_Energy() override; + double cal_energy() override; /** * @brief get the computed atomic forces * * @param force the computed atomic forces */ - void cal_Force(ModuleBase::matrix& force) override; + void cal_force(ModuleBase::matrix& force) override; /** * @brief get the computed lattice virials * * @param stress the computed lattice virials */ - void cal_Stress(ModuleBase::matrix& stress) override; + void cal_stress(ModuleBase::matrix& stress) override; /** * @brief Prints the final total energy of the DP model to the output file * * This function prints the final total energy of the DP model in eV to the output file along with some formatting. */ - void postprocess() override; + void post_process() override; private: /** diff --git a/source/module_esolver/esolver_fp.cpp b/source/module_esolver/esolver_fp.cpp index 9c231acf94..076196941e 100644 --- a/source/module_esolver/esolver_fp.cpp +++ b/source/module_esolver/esolver_fp.cpp @@ -4,237 +4,278 @@ #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_io/input.h" namespace ModuleESolver -{ ESolver_FP::ESolver_FP() - { - // pw_rho = new ModuleBase::PW_Basis(); +{ - pw_rho = new ModulePW::PW_Basis_Big(GlobalV::device_flag, GlobalV::precision_flag); +ESolver_FP::ESolver_FP() +{ + // pw_rho = new ModuleBase::PW_Basis(); + pw_rho = new ModulePW::PW_Basis_Big(GlobalV::device_flag, GlobalV::precision_flag); - if (GlobalV::double_grid) - { - pw_rhod = new ModulePW::PW_Basis_Big(GlobalV::device_flag, GlobalV::precision_flag); - } - else - { - pw_rhod = pw_rho; - } + if (GlobalV::double_grid) + { + pw_rhod = new ModulePW::PW_Basis_Big(GlobalV::device_flag, GlobalV::precision_flag); + } + else + { + pw_rhod = pw_rho; + } - //temporary, it will be removed - pw_big = static_cast(pw_rhod); - pw_big->setbxyz(INPUT.bx, INPUT.by, INPUT.bz); - sf.set(pw_rhod, INPUT.nbspline); + //temporary, it will be removed + pw_big = static_cast(pw_rhod); + pw_big->setbxyz(INPUT.bx, INPUT.by, INPUT.bz); + sf.set(pw_rhod, INPUT.nbspline); - GlobalC::ucell.symm.epsilon = GlobalC::ucell.symm.epsilon_input = INPUT.symmetry_prec; + GlobalC::ucell.symm.epsilon = GlobalC::ucell.symm.epsilon_input = INPUT.symmetry_prec; } - ESolver_FP::~ESolver_FP() - { - delete pw_rho; - if (GlobalV::double_grid) - { - delete pw_rhod; - } - delete this->pelec; - } - void ESolver_FP::Init(Input& inp, UnitCell& cell) - { - if(!GlobalV::use_paw) - { - cell.read_pseudo(GlobalV::ofs_running); - } + + +ESolver_FP::~ESolver_FP() +{ + delete pw_rho; + if (GlobalV::double_grid) + { + delete pw_rhod; + } + delete this->pelec; +} + + +void ESolver_FP::init(Input& inp, UnitCell& cell) +{ + if(!GlobalV::use_paw) + { + cell.read_pseudo(GlobalV::ofs_running); + } #ifdef __MPI - this->pw_rho->initmpi(GlobalV::NPROC_IN_POOL, GlobalV::RANK_IN_POOL, POOL_WORLD); -#endif - if (this->classname == "ESolver_OF") - this->pw_rho->setfullpw(inp.of_full_pw, inp.of_full_pw_dim); - // Initalize the plane wave basis set - if (inp.nx * inp.ny * inp.nz == 0) - this->pw_rho->initgrids(inp.ref_cell_factor * cell.lat0, cell.latvec, 4.0 * inp.ecutwfc); - else - this->pw_rho->initgrids(inp.ref_cell_factor * cell.lat0, cell.latvec, inp.nx, inp.ny, inp.nz); - this->pw_rho->initparameters(false, 4.0 * inp.ecutwfc); - this->pw_rho->ft.fft_mode = inp.fft_mode; - this->pw_rho->setuptransform(); - this->pw_rho->collect_local_pw(); - this->pw_rho->collect_uniqgg(); - - if (GlobalV::double_grid) - { - ModulePW::PW_Basis_Sup* pw_rhod_sup = static_cast(pw_rhod); -#ifdef __MPI - this->pw_rhod->initmpi(GlobalV::NPROC_IN_POOL, GlobalV::RANK_IN_POOL, POOL_WORLD); + this->pw_rho->initmpi(GlobalV::NPROC_IN_POOL, GlobalV::RANK_IN_POOL, POOL_WORLD); #endif - if (this->classname == "ESolver_OF") - this->pw_rhod->setfullpw(inp.of_full_pw, inp.of_full_pw_dim); - if (inp.ndx * inp.ndy * inp.ndz == 0) - this->pw_rhod->initgrids(inp.ref_cell_factor * cell.lat0, cell.latvec, inp.ecutrho); - else - this->pw_rhod->initgrids(inp.ref_cell_factor * cell.lat0, cell.latvec, inp.ndx, inp.ndy, inp.ndz); - this->pw_rhod->initparameters(false, inp.ecutrho); - this->pw_rhod->ft.fft_mode = inp.fft_mode; - pw_rhod_sup->setuptransform(this->pw_rho); - this->pw_rhod->collect_local_pw(); - this->pw_rhod->collect_uniqgg(); - } - - this->print_rhofft(inp, GlobalV::ofs_running); + if (this->classname == "ESolver_OF") + { + this->pw_rho->setfullpw(inp.of_full_pw, inp.of_full_pw_dim); } - void ESolver_FP::init_after_vc(Input& inp, UnitCell& cell) + //! Initalize the plane wave basis set + if (inp.nx * inp.ny * inp.nz == 0) { - ModuleBase::TITLE("ESolver_FP", "init_after_vc"); + this->pw_rho->initgrids(inp.ref_cell_factor * cell.lat0, cell.latvec, 4.0 * inp.ecutwfc); + } + else + { + this->pw_rho->initgrids(inp.ref_cell_factor * cell.lat0, cell.latvec, inp.nx, inp.ny, inp.nz); + } + this->pw_rho->initparameters(false, 4.0 * inp.ecutwfc); + this->pw_rho->ft.fft_mode = inp.fft_mode; + this->pw_rho->setuptransform(); + this->pw_rho->collect_local_pw(); + this->pw_rho->collect_uniqgg(); - if (GlobalV::md_prec_level == 2) + if (GlobalV::double_grid) + { + ModulePW::PW_Basis_Sup* pw_rhod_sup = static_cast(pw_rhod); +#ifdef __MPI + this->pw_rhod->initmpi(GlobalV::NPROC_IN_POOL, GlobalV::RANK_IN_POOL, POOL_WORLD); +#endif + if (this->classname == "ESolver_OF") { - if (inp.nx * inp.ny * inp.nz == 0) - this->pw_rho->initgrids(cell.lat0, cell.latvec, 4.0 * inp.ecutwfc); - else - this->pw_rho->initgrids(cell.lat0, cell.latvec, inp.nx, inp.ny, inp.nz); - - this->pw_rho->initparameters(false, 4.0 * inp.ecutwfc); - this->pw_rho->setuptransform(); - this->pw_rho->collect_local_pw(); - this->pw_rho->collect_uniqgg(); - - if (GlobalV::double_grid) - { - ModulePW::PW_Basis_Sup* pw_rhod_sup = static_cast(pw_rhod); - if (inp.ndx * inp.ndy * inp.ndz == 0) - this->pw_rhod->initgrids(cell.lat0, cell.latvec, inp.ecutrho); - else - this->pw_rhod->initgrids(cell.lat0, cell.latvec, inp.ndx, inp.ndy, inp.ndz); - this->pw_rhod->initparameters(false, inp.ecutrho); - pw_rhod_sup->setuptransform(this->pw_rho); - this->pw_rhod->collect_local_pw(); - this->pw_rhod->collect_uniqgg(); - } + this->pw_rhod->setfullpw(inp.of_full_pw, inp.of_full_pw_dim); } - else + if (inp.ndx * inp.ndy * inp.ndz == 0) { - // only G-vector and K-vector are changed due to the change of lattice vector - // FFT grids do not change!! - pw_rho->initgrids(cell.lat0, cell.latvec, pw_rho->nx, pw_rho->ny, pw_rho->nz); - pw_rho->collect_local_pw(); - pw_rho->collect_uniqgg(); - - if (GlobalV::double_grid) - { - this->pw_rhod->initgrids(cell.lat0, cell.latvec, pw_rhod->nx, pw_rhod->ny, pw_rhod->nz); - this->pw_rhod->collect_local_pw(); - this->pw_rhod->collect_uniqgg(); - } - - GlobalC::ppcell.init_vloc(GlobalC::ppcell.vloc, pw_rhod); - ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "LOCAL POTENTIAL"); + this->pw_rhod->initgrids(inp.ref_cell_factor * cell.lat0, cell.latvec, inp.ecutrho); } - this->pelec->omega = GlobalC::ucell.omega; - - if(ModuleSymmetry::Symmetry::symm_flag == 1) + else { - cell.symm.analy_sys(cell.lat, cell.st, cell.atoms, GlobalV::ofs_running); - ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "SYMMETRY"); + this->pw_rhod->initgrids(inp.ref_cell_factor * cell.lat0, cell.latvec, inp.ndx, inp.ndy, inp.ndz); } + this->pw_rhod->initparameters(false, inp.ecutrho); + this->pw_rhod->ft.fft_mode = inp.fft_mode; + pw_rhod_sup->setuptransform(this->pw_rho); + this->pw_rhod->collect_local_pw(); + this->pw_rhod->collect_uniqgg(); + } - kv.set_after_vc(cell.symm, GlobalV::global_kpoint_card, GlobalV::NSPIN, cell.G, cell.latvec); - ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT K-POINTS"); - } + this->print_rhofft(inp, GlobalV::ofs_running); +} - void ESolver_FP::print_rhofft(Input&inp, std::ofstream &ofs) - { - std::cout << " UNIFORM GRID DIM : " << pw_rho->nx << " * " << pw_rho->ny << " * " << pw_rho->nz - << std::endl; - std::cout << " UNIFORM GRID DIM(BIG) : " << pw_big->nbx << " * " << pw_big->nby << " * " << pw_big->nbz - << std::endl; - if (GlobalV::double_grid) - std::cout << " UNIFORM GRID DIM(DENSE) : " << pw_rhod->nx << " * " << pw_rhod->ny << " * " << pw_rhod->nz - << std::endl; - - ofs << "\n\n\n\n"; - ofs << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; - ofs << " | |" << std::endl; - ofs << " | Setup plane waves of charge/potential: |" << std::endl; - ofs << " | Use the energy cutoff and the lattice vectors to generate the |" << std::endl; - ofs << " | dimensions of FFT grid. The number of FFT grid on each processor |" << std::endl; - ofs << " | is 'nrxx'. The number of plane wave basis in reciprocal space is |" << std::endl; - ofs << " | different for charege/potential and wave functions. We also set |" << std::endl; - ofs << " | the 'sticks' for the parallel of FFT. The number of plane waves |" << std::endl; - ofs << " | is 'npw' in each processor. |" << std::endl; - ofs << " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << std::endl; - ofs << "\n\n\n\n"; - ofs << "\n SETUP THE PLANE WAVE BASIS" << std::endl; - double ecut = 4 * INPUT.ecutwfc; - if(inp.nx * inp.ny * inp.nz > 0) - { - ecut = this->pw_rho->gridecut_lat * this->pw_rho->tpiba2; - ofs << "use input fft dimensions for wave functions." << std::endl; - ofs << "calculate energy cutoff from nx, ny, nz:" << std::endl; - } - ModuleBase::GlobalFunc::OUT(ofs,"energy cutoff for charge/potential (unit:Ry)", ecut); - - ModuleBase::GlobalFunc::OUT(ofs,"fft grid for charge/potential", this->pw_rho->nx,this->pw_rho->ny,this->pw_rho->nz); - ModuleBase::GlobalFunc::OUT(ofs, "fft grid division", pw_big->bx, pw_big->by, pw_big->bz); - ModuleBase::GlobalFunc::OUT(ofs, "big fft grid for charge/potential", pw_big->nbx, pw_big->nby, pw_big->nbz); - ModuleBase::GlobalFunc::OUT(ofs, "nbxx", pw_big->nbxx); - ModuleBase::GlobalFunc::OUT(ofs, "nrxx", this->pw_rho->nrxx); - - ofs << "\n SETUP PLANE WAVES FOR CHARGE/POTENTIAL" << std::endl; - ModuleBase::GlobalFunc::OUT(ofs,"number of plane waves",this->pw_rho->npwtot); - ModuleBase::GlobalFunc::OUT(ofs,"number of sticks", this->pw_rho->nstot); - - ofs << "\n PARALLEL PW FOR CHARGE/POTENTIAL" << std::endl; - ofs <<" "<< std::setw(8) << "PROC"<< std::setw(15) << "COLUMNS(POT)"<< std::setw(15) << "PW" << std::endl; - for (int i = 0; i < GlobalV::NPROC_IN_POOL ; ++i) +void ESolver_FP::init_after_vc(Input& inp, UnitCell& cell) +{ + ModuleBase::TITLE("ESolver_FP", "init_after_vc"); + + if (GlobalV::md_prec_level == 2) + { + if (inp.nx * inp.ny * inp.nz == 0) { - ofs <<" "<pw_rho->nst_per[i] << std::setw(15) << this->pw_rho->npw_per[i] << std::endl; + this->pw_rho->initgrids(cell.lat0, cell.latvec, 4.0 * inp.ecutwfc); } - ofs << " --------------- sum -------------------" << std::endl; - ofs << " " << std::setw(8) << GlobalV::NPROC_IN_POOL << std::setw(15) << this->pw_rho->nstot << std::setw(15) << this->pw_rho->npwtot << std::endl; - - ModuleBase::GlobalFunc::OUT(ofs,"number of |g|", this->pw_rho->ngg); - ModuleBase::GlobalFunc::OUT(ofs,"max |g|", this->pw_rho->gg_uniq[ this->pw_rho->ngg-1]); - ModuleBase::GlobalFunc::OUT(ofs,"min |g|", this->pw_rho->gg_uniq[0]); - - if (GlobalV::double_grid) + else { - ofs << std::endl; - ofs << std::endl; - ofs << std::endl; - double ecut = INPUT.ecutrho; - if (inp.ndx * inp.ndy * inp.ndz > 0) + this->pw_rho->initgrids(cell.lat0, cell.latvec, inp.nx, inp.ny, inp.nz); + } + + this->pw_rho->initparameters(false, 4.0 * inp.ecutwfc); + this->pw_rho->setuptransform(); + this->pw_rho->collect_local_pw(); + this->pw_rho->collect_uniqgg(); + + if (GlobalV::double_grid) + { + ModulePW::PW_Basis_Sup* pw_rhod_sup = static_cast(pw_rhod); + if (inp.ndx * inp.ndy * inp.ndz == 0) { - ecut = this->pw_rhod->gridecut_lat * this->pw_rhod->tpiba2; - ofs << "use input fft dimensions for the dense part of charge density." << std::endl; - ofs << "calculate energy cutoff from ndx, ndy, ndz:" << std::endl; + this->pw_rhod->initgrids(cell.lat0, cell.latvec, inp.ecutrho); } - ModuleBase::GlobalFunc::OUT(ofs, "energy cutoff for dense charge/potential (unit:Ry)", ecut); - - ModuleBase::GlobalFunc::OUT(ofs, - "fft grid for dense charge/potential", - this->pw_rhod->nx, - this->pw_rhod->ny, - this->pw_rhod->nz); - ModuleBase::GlobalFunc::OUT(ofs, "nrxx", this->pw_rhod->nrxx); - - ofs << "\n SETUP PLANE WAVES FOR dense CHARGE/POTENTIAL" << std::endl; - ModuleBase::GlobalFunc::OUT(ofs, "number of plane waves", this->pw_rhod->npwtot); - ModuleBase::GlobalFunc::OUT(ofs, "number of sticks", this->pw_rhod->nstot); - - ofs << "\n PARALLEL PW FOR dense CHARGE/POTENTIAL" << std::endl; - ofs << " " << std::setw(8) << "PROC" << std::setw(15) << "COLUMNS(POT)" << std::setw(15) << "PW" - << std::endl; - for (int i = 0; i < GlobalV::NPROC_IN_POOL; ++i) + else { - ofs << " " << std::setw(8) << i + 1 << std::setw(15) << this->pw_rhod->nst_per[i] << std::setw(15) - << this->pw_rhod->npw_per[i] << std::endl; + this->pw_rhod->initgrids(cell.lat0, cell.latvec, inp.ndx, inp.ndy, inp.ndz); } - ofs << " --------------- sum -------------------" << std::endl; - ofs << " " << std::setw(8) << GlobalV::NPROC_IN_POOL << std::setw(15) << this->pw_rhod->nstot - << std::setw(15) << this->pw_rhod->npwtot << std::endl; + this->pw_rhod->initparameters(false, inp.ecutrho); + pw_rhod_sup->setuptransform(this->pw_rho); + this->pw_rhod->collect_local_pw(); + this->pw_rhod->collect_uniqgg(); + } + } + else + { + // only G-vector and K-vector are changed due to the change of lattice vector + // FFT grids do not change!! + pw_rho->initgrids(cell.lat0, cell.latvec, pw_rho->nx, pw_rho->ny, pw_rho->nz); + pw_rho->collect_local_pw(); + pw_rho->collect_uniqgg(); - ModuleBase::GlobalFunc::OUT(ofs, "number of |g|", this->pw_rhod->ngg); - ModuleBase::GlobalFunc::OUT(ofs, "max |g|", this->pw_rhod->gg_uniq[this->pw_rhod->ngg - 1]); - ModuleBase::GlobalFunc::OUT(ofs, "min |g|", this->pw_rhod->gg_uniq[0]); - } + if (GlobalV::double_grid) + { + this->pw_rhod->initgrids(cell.lat0, cell.latvec, pw_rhod->nx, pw_rhod->ny, pw_rhod->nz); + this->pw_rhod->collect_local_pw(); + this->pw_rhod->collect_uniqgg(); + } + + GlobalC::ppcell.init_vloc(GlobalC::ppcell.vloc, pw_rhod); + ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "LOCAL POTENTIAL"); + } + this->pelec->omega = GlobalC::ucell.omega; + + if(ModuleSymmetry::Symmetry::symm_flag == 1) + { + cell.symm.analy_sys(cell.lat, cell.st, cell.atoms, GlobalV::ofs_running); + ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "SYMMETRY"); + } + + kv.set_after_vc(cell.symm, GlobalV::global_kpoint_card, GlobalV::NSPIN, cell.G, cell.latvec); + ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT K-POINTS"); +} + + +void ESolver_FP::print_rhofft(Input&inp, std::ofstream &ofs) +{ + std::cout << " UNIFORM GRID DIM : " << pw_rho->nx << " * " << pw_rho->ny << " * " << pw_rho->nz + << std::endl; + std::cout << " UNIFORM GRID DIM(BIG) : " << pw_big->nbx << " * " << pw_big->nby << " * " << pw_big->nbz + << std::endl; + if (GlobalV::double_grid) + { + std::cout << " UNIFORM GRID DIM(DENSE) : " << pw_rhod->nx << " * " << pw_rhod->ny << " * " << pw_rhod->nz + << std::endl; } -} \ No newline at end of file + + ofs << "\n\n\n\n"; + ofs << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; + ofs << " | |" << std::endl; + ofs << " | Setup plane waves of charge/potential: |" << std::endl; + ofs << " | Use the energy cutoff and the lattice vectors to generate the |" << std::endl; + ofs << " | dimensions of FFT grid. The number of FFT grid on each processor |" << std::endl; + ofs << " | is 'nrxx'. The number of plane wave basis in reciprocal space is |" << std::endl; + ofs << " | different for charege/potential and wave functions. We also set |" << std::endl; + ofs << " | the 'sticks' for the parallel of FFT. The number of plane waves |" << std::endl; + ofs << " | is 'npw' in each processor. |" << std::endl; + ofs << " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << std::endl; + ofs << "\n\n\n\n"; + ofs << "\n SETUP THE PLANE WAVE BASIS" << std::endl; + + double ecut = 4 * INPUT.ecutwfc; + if(inp.nx * inp.ny * inp.nz > 0) + { + ecut = this->pw_rho->gridecut_lat * this->pw_rho->tpiba2; + ofs << "use input fft dimensions for wave functions." << std::endl; + ofs << "calculate energy cutoff from nx, ny, nz:" << std::endl; + } + + ModuleBase::GlobalFunc::OUT(ofs,"energy cutoff for charge/potential (unit:Ry)", ecut); + + ModuleBase::GlobalFunc::OUT(ofs,"fft grid for charge/potential", this->pw_rho->nx,this->pw_rho->ny,this->pw_rho->nz); + ModuleBase::GlobalFunc::OUT(ofs, "fft grid division", pw_big->bx, pw_big->by, pw_big->bz); + ModuleBase::GlobalFunc::OUT(ofs, "big fft grid for charge/potential", pw_big->nbx, pw_big->nby, pw_big->nbz); + ModuleBase::GlobalFunc::OUT(ofs, "nbxx", pw_big->nbxx); + ModuleBase::GlobalFunc::OUT(ofs, "nrxx", this->pw_rho->nrxx); + + ofs << "\n SETUP PLANE WAVES FOR CHARGE/POTENTIAL" << std::endl; + ModuleBase::GlobalFunc::OUT(ofs,"number of plane waves",this->pw_rho->npwtot); + ModuleBase::GlobalFunc::OUT(ofs,"number of sticks", this->pw_rho->nstot); + + ofs << "\n PARALLEL PW FOR CHARGE/POTENTIAL" << std::endl; + ofs <<" "<< std::setw(8) << "PROC"<< std::setw(15) << "COLUMNS(POT)"<< std::setw(15) << "PW" << std::endl; + + for (int i = 0; i < GlobalV::NPROC_IN_POOL ; ++i) + { + ofs <<" "<pw_rho->nst_per[i] + << std::setw(15) << this->pw_rho->npw_per[i] << std::endl; + } + ofs << " --------------- sum -------------------" << std::endl; + ofs << " " << std::setw(8) + << GlobalV::NPROC_IN_POOL + << std::setw(15) << this->pw_rho->nstot + << std::setw(15) << this->pw_rho->npwtot << std::endl; + + ModuleBase::GlobalFunc::OUT(ofs,"number of |g|", this->pw_rho->ngg); + ModuleBase::GlobalFunc::OUT(ofs,"max |g|", this->pw_rho->gg_uniq[ this->pw_rho->ngg-1]); + ModuleBase::GlobalFunc::OUT(ofs,"min |g|", this->pw_rho->gg_uniq[0]); + + if (GlobalV::double_grid) + { + ofs << std::endl; + ofs << std::endl; + ofs << std::endl; + double ecut = INPUT.ecutrho; + if (inp.ndx * inp.ndy * inp.ndz > 0) + { + ecut = this->pw_rhod->gridecut_lat * this->pw_rhod->tpiba2; + ofs << "use input fft dimensions for the dense part of charge density." << std::endl; + ofs << "calculate energy cutoff from ndx, ndy, ndz:" << std::endl; + } + ModuleBase::GlobalFunc::OUT(ofs, "energy cutoff for dense charge/potential (unit:Ry)", ecut); + + ModuleBase::GlobalFunc::OUT(ofs, + "fft grid for dense charge/potential", + this->pw_rhod->nx, + this->pw_rhod->ny, + this->pw_rhod->nz); + + ModuleBase::GlobalFunc::OUT(ofs, "nrxx", this->pw_rhod->nrxx); + + ofs << "\n SETUP PLANE WAVES FOR dense CHARGE/POTENTIAL" << std::endl; + ModuleBase::GlobalFunc::OUT(ofs, "number of plane waves", this->pw_rhod->npwtot); + ModuleBase::GlobalFunc::OUT(ofs, "number of sticks", this->pw_rhod->nstot); + + ofs << "\n PARALLEL PW FOR dense CHARGE/POTENTIAL" << std::endl; + ofs << " " << std::setw(8) << "PROC" << std::setw(15) << "COLUMNS(POT)" << std::setw(15) << "PW" + << std::endl; + + for (int i = 0; i < GlobalV::NPROC_IN_POOL; ++i) + { + ofs << " " << std::setw(8) << i + 1 << std::setw(15) << this->pw_rhod->nst_per[i] << std::setw(15) + << this->pw_rhod->npw_per[i] << std::endl; + } + ofs << " --------------- sum -------------------" << std::endl; + ofs << " " << std::setw(8) << GlobalV::NPROC_IN_POOL << std::setw(15) << this->pw_rhod->nstot + << std::setw(15) << this->pw_rhod->npwtot << std::endl; + + ModuleBase::GlobalFunc::OUT(ofs, "number of |g|", this->pw_rhod->ngg); + ModuleBase::GlobalFunc::OUT(ofs, "max |g|", this->pw_rhod->gg_uniq[this->pw_rhod->ngg - 1]); + ModuleBase::GlobalFunc::OUT(ofs, "min |g|", this->pw_rhod->gg_uniq[0]); + } +} + +} //! end of namespace ModuleESolver diff --git a/source/module_esolver/esolver_fp.h b/source/module_esolver/esolver_fp.h index 21b0588ff2..38e492d581 100644 --- a/source/module_esolver/esolver_fp.h +++ b/source/module_esolver/esolver_fp.h @@ -7,37 +7,61 @@ #include "module_cell/module_symmetry/symmetry.h" #include "module_elecstate/elecstate.h" #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" -// #include "hamilt.h" + +//! The First-Principles (FP) Energy Solver Class +/** + * This class represents components that needed in + * first-principles energy solver, such as the plane + * wave basis, the structure factors, and the k points. + * +*/ + namespace ModuleESolver { class ESolver_FP : public ESolver { public: + ModulePW::PW_Basis* pw_rho; + /** - * same as pw_rho for ncpp. + * @brief same as pw_rho for ncpp. Here 'd' stands for 'dense' * dense grid for for uspp, used for ultrasoft augmented charge density. * charge density and potential are defined on dense grids, * but effective potential needs to be interpolated on smooth grids in order to compute Veff|psi> */ ModulePW::PW_Basis* pw_rhod; ModulePW::PW_Basis_Big* pw_big; ///< [temp] pw_basis_big class + + //! Constructor ESolver_FP(); + + //! Deconstructor virtual ~ESolver_FP(); - virtual void Init(Input& inp, UnitCell& cell) override; + + //! Initialize of the first-principels energy solver + virtual void init(Input& inp, UnitCell& cell) override; + virtual void init_after_vc(Input& inp, UnitCell& cell); // liuyu add 2023-03-09 - // Hamilt* phamilt; + //! Electronic states elecstate::ElecState* pelec = nullptr; + + //! Electorn charge density Charge chr; - //--------------temporary---------------------------- - // this is the interface of non-self-consistant calculation + + //! Non-Self-Consistant Filed (NSCF) calculations virtual void nscf(){}; + //! Structure factors that used with plane-wave basis set Structure_Factor sf; + + //! K points in Brillouin zone K_Vectors kv; private: + + //! Print charge density using FFT void print_rhofft(Input& inp, std::ofstream &ofs); }; } diff --git a/source/module_esolver/esolver_ks.cpp b/source/module_esolver/esolver_ks.cpp index 5a978d5abc..de479128f3 100644 --- a/source/module_esolver/esolver_ks.cpp +++ b/source/module_esolver/esolver_ks.cpp @@ -25,560 +25,673 @@ #include "module_base/parallel_common.h" #endif +#include "module_io/json_output/output_info.h" + namespace ModuleESolver { - template - ESolver_KS::ESolver_KS() - { - classname = "ESolver_KS"; - basisname = "PLEASE ADD BASISNAME FOR CURRENT ESOLVER."; - scf_thr = GlobalV::SCF_THR; - drho = 0.0; - maxniter = GlobalV::SCF_NMAX; - niter = maxniter; - out_freq_elec = GlobalV::OUT_FREQ_ELEC; - - // pw_rho = new ModuleBase::PW_Basis(); - //temporary, it will be removed - pw_wfc = new ModulePW::PW_Basis_K_Big(GlobalV::device_flag, GlobalV::precision_flag); - ModulePW::PW_Basis_K_Big* tmp = static_cast(pw_wfc); - tmp->setbxyz(INPUT.bx,INPUT.by,INPUT.bz); - - ///---------------------------------------------------------- - /// charge mixing - ///---------------------------------------------------------- - p_chgmix = new Charge_Mixing(); - p_chgmix->set_rhopw(this->pw_rho, this->pw_rhod); - - ///---------------------------------------------------------- - /// wavefunc - ///---------------------------------------------------------- - this->wf.init_wfc = INPUT.init_wfc; - this->wf.mem_saver = INPUT.mem_saver; - this->wf.out_wfc_pw = INPUT.out_wfc_pw; - this->wf.out_wfc_r = INPUT.out_wfc_r; - } - - template - ESolver_KS::~ESolver_KS() - { - delete this->psi; - delete this->pw_wfc; - delete this->p_hamilt; - delete this->phsol; - delete this->p_chgmix; - } - - template - void ESolver_KS::Init(Input& inp, UnitCell& ucell) - { - ESolver_FP::Init(inp,ucell); - - //------------------Charge Mixing------------------ - p_chgmix->set_mixing(GlobalV::MIXING_MODE, - GlobalV::MIXING_BETA, - GlobalV::MIXING_NDIM, - GlobalV::MIXING_GG0, - GlobalV::MIXING_TAU, - GlobalV::MIXING_BETA_MAG, - GlobalV::MIXING_GG0_MAG, - GlobalV::MIXING_GG0_MIN, - GlobalV::MIXING_ANGLE, - GlobalV::MIXING_DMR); - +template +ESolver_KS::ESolver_KS() +{ + classname = "ESolver_KS"; + basisname = "PLEASE ADD BASISNAME FOR CURRENT ESOLVER."; + scf_thr = GlobalV::SCF_THR; + drho = 0.0; + maxniter = GlobalV::SCF_NMAX; + niter = maxniter; + out_freq_elec = GlobalV::OUT_FREQ_ELEC; + + // pw_rho = new ModuleBase::PW_Basis(); + //temporary, it will be removed + pw_wfc = new ModulePW::PW_Basis_K_Big(GlobalV::device_flag, GlobalV::precision_flag); + ModulePW::PW_Basis_K_Big* tmp = static_cast(pw_wfc); + tmp->setbxyz(INPUT.bx,INPUT.by,INPUT.bz); + + ///---------------------------------------------------------- + /// charge mixing + ///---------------------------------------------------------- + p_chgmix = new Charge_Mixing(); + p_chgmix->set_rhopw(this->pw_rho, this->pw_rhod); + + ///---------------------------------------------------------- + /// wavefunc + ///---------------------------------------------------------- + this->wf.init_wfc = INPUT.init_wfc; + this->wf.mem_saver = INPUT.mem_saver; + this->wf.out_wfc_pw = INPUT.out_wfc_pw; + this->wf.out_wfc_r = INPUT.out_wfc_r; +} + +template +ESolver_KS::~ESolver_KS() +{ + delete this->psi; + delete this->pw_wfc; + delete this->p_hamilt; + delete this->phsol; + delete this->p_chgmix; +} + +template +void ESolver_KS::init(Input& inp, UnitCell& ucell) +{ + ESolver_FP::init(inp,ucell); + + //------------------Charge Mixing------------------ + p_chgmix->set_mixing(GlobalV::MIXING_MODE, + GlobalV::MIXING_BETA, + GlobalV::MIXING_NDIM, + GlobalV::MIXING_GG0, + GlobalV::MIXING_TAU, + GlobalV::MIXING_BETA_MAG, + GlobalV::MIXING_GG0_MAG, + GlobalV::MIXING_GG0_MIN, + GlobalV::MIXING_ANGLE, + GlobalV::MIXING_DMR); + + /// PAW Section + #ifdef USE_PAW - if(GlobalV::use_paw) - { - int * atom_type; - double ** atom_coord; - std::vector filename_list; - - atom_type = new int [GlobalC::ucell.nat]; - atom_coord = new double * [GlobalC::ucell.nat]; - filename_list.resize(GlobalC::ucell.ntype); - - for(int ia = 0; ia < GlobalC::ucell.nat; ia ++) - { - atom_coord[ia] = new double [3]; - } - - int iat = 0; - for(int it = 0; it < GlobalC::ucell.ntype; it ++) - { - for(int ia = 0; ia < GlobalC::ucell.atoms[it].na; ia ++) - { - atom_type[iat] = it; - atom_coord[iat][0] = GlobalC::ucell.atoms[it].taud[ia].x; - atom_coord[iat][1] = GlobalC::ucell.atoms[it].taud[ia].y; - atom_coord[iat][2] = GlobalC::ucell.atoms[it].taud[ia].z; - iat ++; - } - } - - if(GlobalV::MY_RANK == 0) - { - std::ifstream ifa(GlobalV::stru_file.c_str(), std::ios::in); - if (!ifa) - { - ModuleBase::WARNING_QUIT("set_libpaw_files", "can not open stru file"); - } - - std::string line; - while(!ifa.eof()) - { - getline(ifa,line); - if (line.find("PAW_FILES") != std::string::npos) break; - } - - for(int it = 0; it < GlobalC::ucell.ntype; it++) - { - ifa >> filename_list[it]; - } - } + if(GlobalV::use_paw) + { + int * atom_type = nullptr; + double ** atom_coord = nullptr; + std::vector filename_list; + + atom_type = new int [ucell.nat]; + atom_coord = new double *[ucell.nat]; + filename_list.resize(ucell.ntype); + + for(int ia = 0; ia < ucell.nat; ia ++) + { + atom_coord[ia] = new double [3]; + } + + int iat = 0; + for(int it = 0; it < ucell.ntype; it ++) + { + for(int ia = 0; ia < ucell.atoms[it].na; ia ++) + { + atom_type[iat] = it; + atom_coord[iat][0] = ucell.atoms[it].taud[ia].x; + atom_coord[iat][1] = ucell.atoms[it].taud[ia].y; + atom_coord[iat][2] = ucell.atoms[it].taud[ia].z; + iat ++; + } + } + + if(GlobalV::MY_RANK == 0) + { + std::ifstream ifa(GlobalV::stru_file.c_str(), std::ios::in); + if (!ifa) + { + ModuleBase::WARNING_QUIT("set_libpaw_files", "can not open stru file"); + } + + std::string line; + while(!ifa.eof()) + { + getline(ifa,line); + if (line.find("PAW_FILES") != std::string::npos) break; + } + + for(int it = 0; it < ucell.ntype; it++) + { + ifa >> filename_list[it]; + } + } #ifdef __MPI - for(int it = 0; it < GlobalC::ucell.ntype; it++) - { - Parallel_Common::bcast_string(filename_list[it]); - } + for(int it = 0; it < ucell.ntype; it++) + { + Parallel_Common::bcast_string(filename_list[it]); + } #endif - - GlobalC::paw_cell.init_paw_cell(INPUT.ecutwfc, INPUT.cell_factor, - GlobalC::ucell.omega,GlobalC::ucell.nat,GlobalC::ucell.ntype, - atom_type,(const double **) atom_coord, - filename_list); - - for(int iat = 0; iat < GlobalC::ucell.nat; iat ++) - { - delete [] atom_coord[iat]; - } - delete [] atom_coord; - delete [] atom_type; - } + + GlobalC::paw_cell.init_paw_cell(INPUT.ecutwfc, INPUT.cell_factor, + ucell.omega,ucell.nat,ucell.ntype, + atom_type,(const double **) atom_coord, + filename_list); + + for(int iat = 0; iat < ucell.nat; iat ++) + { + delete [] atom_coord[iat]; + } + delete [] atom_coord; + delete [] atom_type; + } #endif - ucell.cal_nelec(GlobalV::nelec); - - /* it has been established that that - xc_func is same for all elements, therefore - only the first one if used*/ - if(GlobalV::use_paw) - { - XC_Functional::set_xc_type(GlobalV::DFT_FUNCTIONAL); - } - else - { - XC_Functional::set_xc_type(ucell.atoms[0].ncpp.xc_func); - } - ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "SETUP UNITCELL"); - - // symmetry analysis should be performed every time the cell is changed - if (ModuleSymmetry::Symmetry::symm_flag == 1) - { - ucell.symm.analy_sys(ucell.lat, ucell.st, ucell.atoms, GlobalV::ofs_running); - ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "SYMMETRY"); - } - - // Setup the k points according to symmetry. - this->kv.set(ucell.symm, GlobalV::global_kpoint_card, GlobalV::NSPIN, ucell.G, ucell.latvec); - ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT K-POINTS"); - - // print information - // mohan add 2021-01-30 - Print_Info::setup_parameters(ucell, this->kv); - - //if(GlobalV::BASIS_TYPE=="pw" || GlobalV::CALCULATION=="get_wf") - //{ - //Envelope function is calculated as lcao_in_pw - //new plane wave basis + /// End PAW + + ucell.cal_nelec(GlobalV::nelec); + + /* it has been established that that + xc_func is same for all elements, therefore + only the first one if used*/ + if(GlobalV::use_paw) + { + XC_Functional::set_xc_type(GlobalV::DFT_FUNCTIONAL); + } + else + { + XC_Functional::set_xc_type(ucell.atoms[0].ncpp.xc_func); + } + ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "SETUP UNITCELL"); + + // symmetry analysis should be performed every time the cell is changed + if (ModuleSymmetry::Symmetry::symm_flag == 1) + { + ucell.symm.analy_sys(ucell.lat, ucell.st, ucell.atoms, GlobalV::ofs_running); + ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "SYMMETRY"); + } + + // Setup the k points according to symmetry. + this->kv.set(ucell.symm, GlobalV::global_kpoint_card, GlobalV::NSPIN, ucell.G, ucell.latvec); + ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT K-POINTS"); + + // print information + // mohan add 2021-01-30 + Print_Info::setup_parameters(ucell, this->kv); + + //if(GlobalV::BASIS_TYPE=="pw" || GlobalV::CALCULATION=="get_wf") + //{ + //Envelope function is calculated as lcao_in_pw + //new plane wave basis #ifdef __MPI - this->pw_wfc->initmpi(GlobalV::NPROC_IN_POOL, GlobalV::RANK_IN_POOL, POOL_WORLD); + this->pw_wfc->initmpi(GlobalV::NPROC_IN_POOL, GlobalV::RANK_IN_POOL, POOL_WORLD); #endif - this->pw_wfc->initgrids(inp.ref_cell_factor * ucell.lat0, - ucell.latvec, - this->pw_rho->nx, - this->pw_rho->ny, - this->pw_rho->nz); - this->pw_wfc->initparameters(false, inp.ecutwfc, this->kv.nks, this->kv.kvec_d.data()); + + this->pw_wfc->initgrids(inp.ref_cell_factor * ucell.lat0, + ucell.latvec, + this->pw_rho->nx, + this->pw_rho->ny, + this->pw_rho->nz); + this->pw_wfc->initparameters(false, inp.ecutwfc, this->kv.nks, this->kv.kvec_d.data()); + #ifdef __MPI - if (INPUT.pw_seed > 0) - MPI_Allreduce(MPI_IN_PLACE, &this->pw_wfc->ggecut, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); - // qianrui add 2021-8-13 to make different kpar parameters can get the same results + if (INPUT.pw_seed > 0) + { + MPI_Allreduce(MPI_IN_PLACE, &this->pw_wfc->ggecut, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); + } + // qianrui add 2021-8-13 to make different kpar parameters can get the same results #endif - this->pw_wfc->ft.fft_mode = inp.fft_mode; - this->pw_wfc->setuptransform(); - for (int ik = 0; ik < this->kv.nks; ++ik) - this->kv.ngk[ik] = this->pw_wfc->npwk[ik]; - this->pw_wfc->collect_local_pw(inp.erf_ecut, inp.erf_height, inp.erf_sigma); - this->print_wfcfft(inp, GlobalV::ofs_running); - //} - // initialize the real-space uniform grid for FFT and parallel - // distribution of plane waves - GlobalC::Pgrid.init(this->pw_rhod->nx, - this->pw_rhod->ny, - this->pw_rhod->nz, - this->pw_rhod->nplane, - this->pw_rhod->nrxx, - pw_big->nbz, - pw_big->bz); // mohan add 2010-07-22, update 2011-05-04 - - // Calculate Structure factor - this->sf.setup_structure_factor(&GlobalC::ucell, this->pw_rhod); - - // Initialize charge extrapolation - CE.Init_CE(GlobalC::ucell.nat); + + this->pw_wfc->ft.fft_mode = inp.fft_mode; + + this->pw_wfc->setuptransform(); + + for (int ik = 0; ik < this->kv.nks; ++ik) + { + this->kv.ngk[ik] = this->pw_wfc->npwk[ik]; + } + + this->pw_wfc->collect_local_pw(inp.erf_ecut, inp.erf_height, inp.erf_sigma); + + this->print_wfcfft(inp, GlobalV::ofs_running); + + //! initialize the real-space uniform grid for FFT and parallel + //! distribution of plane waves + GlobalC::Pgrid.init(this->pw_rhod->nx, + this->pw_rhod->ny, + this->pw_rhod->nz, + this->pw_rhod->nplane, + this->pw_rhod->nrxx, + pw_big->nbz, + pw_big->bz); // mohan add 2010-07-22, update 2011-05-04 + + // Calculate Structure factor + this->sf.setup_structure_factor(&ucell, this->pw_rhod); + + // Initialize charge extrapolation + CE.Init_CE(ucell.nat); #ifdef USE_PAW - if(GlobalV::use_paw) - { - GlobalC::paw_cell.set_libpaw_ecut(INPUT.ecutwfc/2.0,INPUT.ecutwfc/2.0); //in Hartree - GlobalC::paw_cell.set_libpaw_fft(this->pw_wfc->nx,this->pw_wfc->ny,this->pw_wfc->nz, - this->pw_wfc->nx,this->pw_wfc->ny,this->pw_wfc->nz, - this->pw_wfc->startz,this->pw_wfc->numz); + if(GlobalV::use_paw) + { + GlobalC::paw_cell.set_libpaw_ecut(INPUT.ecutwfc/2.0,INPUT.ecutwfc/2.0); //in Hartree + GlobalC::paw_cell.set_libpaw_fft(this->pw_wfc->nx,this->pw_wfc->ny,this->pw_wfc->nz, + this->pw_wfc->nx,this->pw_wfc->ny,this->pw_wfc->nz, + this->pw_wfc->startz,this->pw_wfc->numz); #ifdef __MPI - if(GlobalV::RANK_IN_POOL == 0) GlobalC::paw_cell.prepare_paw(); + if(GlobalV::RANK_IN_POOL == 0) + { + GlobalC::paw_cell.prepare_paw(); + } #else - GlobalC::paw_cell.prepare_paw(); + GlobalC::paw_cell.prepare_paw(); #endif - GlobalC::paw_cell.set_sij(); + GlobalC::paw_cell.set_sij(); - GlobalC::paw_cell.set_eigts( - this->pw_wfc->nx,this->pw_wfc->ny,this->pw_wfc->nz, - this->sf.eigts1.c,this->sf.eigts2.c,this->sf.eigts3.c); + GlobalC::paw_cell.set_eigts( + this->pw_wfc->nx,this->pw_wfc->ny,this->pw_wfc->nz, + this->sf.eigts1.c,this->sf.eigts2.c,this->sf.eigts3.c); - std::vector> rhoijp; - std::vector> rhoijselect; - std::vector nrhoijsel; + std::vector> rhoijp; + std::vector> rhoijselect; + std::vector nrhoijsel; #ifdef __MPI - if(GlobalV::RANK_IN_POOL == 0) - { - GlobalC::paw_cell.get_rhoijp(rhoijp, rhoijselect, nrhoijsel); - - for(int iat = 0; iat < GlobalC::ucell.nat; iat ++) - { - GlobalC::paw_cell.set_rhoij(iat,nrhoijsel[iat],rhoijselect[iat].size(),rhoijselect[iat].data(),rhoijp[iat].data()); - } - } + if(GlobalV::RANK_IN_POOL == 0) + { + GlobalC::paw_cell.get_rhoijp(rhoijp, rhoijselect, nrhoijsel); + + for(int iat = 0; iat < ucell.nat; iat ++) + { + GlobalC::paw_cell.set_rhoij(iat,nrhoijsel[iat],rhoijselect[iat].size(),rhoijselect[iat].data(),rhoijp[iat].data()); + } + } #else - GlobalC::paw_cell.get_rhoijp(rhoijp, rhoijselect, nrhoijsel); + GlobalC::paw_cell.get_rhoijp(rhoijp, rhoijselect, nrhoijsel); - for(int iat = 0; iat < GlobalC::ucell.nat; iat ++) - { - GlobalC::paw_cell.set_rhoij(iat,nrhoijsel[iat],rhoijselect[iat].size(),rhoijselect[iat].data(),rhoijp[iat].data()); - } + for(int iat = 0; iat < ucell.nat; iat ++) + { + GlobalC::paw_cell.set_rhoij(iat,nrhoijsel[iat],rhoijselect[iat].size(),rhoijselect[iat].data(),rhoijp[iat].data()); + } #endif - } + } #endif - } - - template - void ESolver_KS::init_after_vc(Input& inp, UnitCell& ucell) - { - ModuleBase::TITLE("ESolver_KS", "init_after_vc"); - - ESolver_FP::init_after_vc(inp, ucell); - - if (GlobalV::md_prec_level == 2) - { - // initialize the real-space uniform grid for FFT and parallel - // distribution of plane waves - GlobalC::Pgrid.init(this->pw_rhod->nx, - this->pw_rhod->ny, - this->pw_rhod->nz, - this->pw_rhod->nplane, - this->pw_rhod->nrxx, - pw_big->nbz, - pw_big->bz); // mohan add 2010-07-22, update 2011-05-04 - - // Calculate Structure factor - this->sf.setup_structure_factor(&ucell, this->pw_rhod); - } - } - - template - void ESolver_KS::hamilt2density(const int istep, const int iter, const double ethr) - { - ModuleBase::timer::tick(this->classname, "hamilt2density"); - //Temporarily, before HSolver is constructed, it should be overrided by - //LCAO, PW, SDFT and TDDFT. - //After HSolver is constructed, LCAO, PW, SDFT should delete their own - //hamilt2density() and use: - //this->phsol->solve(this->phamilt, this->pes, this->wf, ETHR); - ModuleBase::timer::tick(this->classname, "hamilt2density"); - } - - template - void ESolver_KS::print_wfcfft(Input& inp, std::ofstream &ofs) - { - ofs << "\n\n\n\n"; - ofs << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; - ofs << " | |" << std::endl; - ofs << " | Setup plane waves of wave functions: |" << std::endl; - ofs << " | Use the energy cutoff and the lattice vectors to generate the |" << std::endl; - ofs << " | dimensions of FFT grid. The number of FFT grid on each processor |" << std::endl; - ofs << " | is 'nrxx'. The number of plane wave basis in reciprocal space is |" << std::endl; - ofs << " | different for charege/potential and wave functions. We also set |" << std::endl; - ofs << " | the 'sticks' for the parallel of FFT. The number of plane wave of |" << std::endl; - ofs << " | each k-point is 'npwk[ik]' in each processor |" << std::endl; - ofs << " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << std::endl; - ofs << "\n\n\n\n"; - ofs << "\n SETUP PLANE WAVES FOR WAVE FUNCTIONS" << std::endl; - double ecut = INPUT.ecutwfc; - if(std::abs(ecut-this->pw_wfc->gk_ecut * this->pw_wfc->tpiba2) > 1e-6) - { - ecut = this->pw_wfc->gk_ecut * this->pw_wfc->tpiba2; - ofs<<"Energy cutoff for wavefunc is incompatible with nx, ny, nz and it will be reduced!"<pw_wfc->nx,this->pw_wfc->ny,this->pw_wfc->nz); - ModuleBase::GlobalFunc::OUT(ofs,"number of plane waves",this->pw_wfc->npwtot); - ModuleBase::GlobalFunc::OUT(ofs,"number of sticks", this->pw_wfc->nstot); - - ofs << "\n PARALLEL PW FOR WAVE FUNCTIONS" << std::endl; - ofs <<" "<< std::setw(8) << "PROC"<< std::setw(15) << "COLUMNS(POT)"<< std::setw(15) << "PW" << std::endl; - for (int i = 0; i < GlobalV::NPROC_IN_POOL ; ++i) - { - ofs <<" "<pw_wfc->nst_per[i] << std::setw(15) << this->pw_wfc->npw_per[i] << std::endl; - } - ofs << " --------------- sum -------------------" << std::endl; - ofs << " " << std::setw(8) << GlobalV::NPROC_IN_POOL << std::setw(15) << this->pw_wfc->nstot << std::setw(15) << this->pw_wfc->npwtot << std::endl; - ModuleBase::GlobalFunc::DONE(ofs, "INIT PLANEWAVE"); - } - - template - void ESolver_KS::Run(const int istep, UnitCell& ucell) - { - if (!(GlobalV::CALCULATION == "scf" || GlobalV::CALCULATION == "md" - || GlobalV::CALCULATION == "relax" || GlobalV::CALCULATION == "cell-relax")) - { - this->othercalculation(istep); - } - else - { - ModuleBase::timer::tick(this->classname, "Run"); - - this->beforescf(istep); //Something else to do before the iter loop - ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT SCF"); - if(this->maxniter > 0) this->printhead(); //print the headline on the screen. - - bool firstscf = true; - this->conv_elec = false; - this->niter = this->maxniter; - for (int iter = 1; iter <= this->maxniter; ++iter) - { - writehead(GlobalV::ofs_running, istep, iter); +} + + +template +void ESolver_KS::init_after_vc(Input& inp, UnitCell& ucell) +{ + ModuleBase::TITLE("ESolver_KS", "init_after_vc"); + + ESolver_FP::init_after_vc(inp, ucell); + + if (GlobalV::md_prec_level == 2) + { + // initialize the real-space uniform grid for FFT and parallel + // distribution of plane waves + GlobalC::Pgrid.init(this->pw_rhod->nx, + this->pw_rhod->ny, + this->pw_rhod->nz, + this->pw_rhod->nplane, + this->pw_rhod->nrxx, + pw_big->nbz, + pw_big->bz); // mohan add 2010-07-22, update 2011-05-04 + + // Calculate Structure factor + this->sf.setup_structure_factor(&ucell, this->pw_rhod); + } +} + + +template +void ESolver_KS::hamilt2density(const int istep, const int iter, const double ethr) +{ + ModuleBase::timer::tick(this->classname, "hamilt2density"); + //Temporarily, before HSolver is constructed, it should be overrided by + //LCAO, PW, SDFT and TDDFT. + //After HSolver is constructed, LCAO, PW, SDFT should delete their own + //hamilt2density() and use: + //this->phsol->solve(this->phamilt, this->pes, this->wf, ETHR); + ModuleBase::timer::tick(this->classname, "hamilt2density"); +} + + +template +void ESolver_KS::print_wfcfft(Input& inp, std::ofstream &ofs) +{ + ofs << "\n\n\n\n"; + ofs << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl; + ofs << " | |" << std::endl; + ofs << " | Setup plane waves of wave functions: |" << std::endl; + ofs << " | Use the energy cutoff and the lattice vectors to generate the |" << std::endl; + ofs << " | dimensions of FFT grid. The number of FFT grid on each processor |" << std::endl; + ofs << " | is 'nrxx'. The number of plane wave basis in reciprocal space is |" << std::endl; + ofs << " | different for charege/potential and wave functions. We also set |" << std::endl; + ofs << " | the 'sticks' for the parallel of FFT. The number of plane wave of |" << std::endl; + ofs << " | each k-point is 'npwk[ik]' in each processor |" << std::endl; + ofs << " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << std::endl; + ofs << "\n\n\n\n"; + ofs << "\n SETUP PLANE WAVES FOR WAVE FUNCTIONS" << std::endl; + double ecut = INPUT.ecutwfc; + if(std::abs(ecut-this->pw_wfc->gk_ecut * this->pw_wfc->tpiba2) > 1e-6) + { + ecut = this->pw_wfc->gk_ecut * this->pw_wfc->tpiba2; + ofs<<"Energy cutoff for wavefunc is incompatible with nx, ny, nz and it will be reduced!"<pw_wfc->nx,this->pw_wfc->ny,this->pw_wfc->nz); + ModuleBase::GlobalFunc::OUT(ofs,"number of plane waves",this->pw_wfc->npwtot); + ModuleBase::GlobalFunc::OUT(ofs,"number of sticks", this->pw_wfc->nstot); + + ofs << "\n PARALLEL PW FOR WAVE FUNCTIONS" << std::endl; + ofs <<" "<< std::setw(8) << "PROC"<< std::setw(15) << "COLUMNS(POT)"<< std::setw(15) << "PW" << std::endl; + + for (int i = 0; i < GlobalV::NPROC_IN_POOL ; ++i) + { + ofs <<" "<pw_wfc->nst_per[i] + << std::setw(15) + << this->pw_wfc->npw_per[i] << std::endl; + } + + ofs << " --------------- sum -------------------" << std::endl; + ofs << " " << std::setw(8) + << GlobalV::NPROC_IN_POOL + << std::setw(15) << this->pw_wfc->nstot + << std::setw(15) << this->pw_wfc->npwtot << std::endl; + ModuleBase::GlobalFunc::DONE(ofs, "INIT PLANEWAVE"); +} + + +template +void ESolver_KS::run(const int istep, UnitCell& ucell) +{ + if (!(GlobalV::CALCULATION == "scf" + || GlobalV::CALCULATION == "md" + || GlobalV::CALCULATION == "relax" + || GlobalV::CALCULATION == "cell-relax")) + { + this->others(istep); + } + else + { + ModuleBase::timer::tick(this->classname, "run"); + + this->before_scf(istep); //Something else to do before the iter loop + + ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT SCF"); + + if(this->maxniter > 0) + { + this->print_head(); //print the headline on the screen. + } + + bool firstscf = true; + this->conv_elec = false; + this->niter = this->maxniter; + for (int iter = 1; iter <= this->maxniter; ++iter) + { + this->write_head(GlobalV::ofs_running, istep, iter); #ifdef __MPI - auto iterstart = MPI_Wtime(); + auto iterstart = MPI_Wtime(); #else - auto iterstart = std::chrono::system_clock::now(); + auto iterstart = std::chrono::system_clock::now(); #endif - double diag_ethr = this->phsol->set_diagethr(istep, iter, drho); - eachiterinit(istep, iter); - this->hamilt2density(istep, iter, diag_ethr); - - // It may be changed when more clever parallel algorithm is put forward. - //When parallel algorithm for bands are adopted. Density will only be treated in the first group. - //(Different ranks should have abtained the same, but small differences always exist in practice.) - //Maybe in the future, density and wavefunctions should use different parallel algorithms, in which - //they do not occupy all processors, for example wavefunctions uses 20 processors while density uses 10. - if(GlobalV::MY_STOGROUP == 0) - { - // double drho = this->estate.caldr2(); - // EState should be used after it is constructed. - - drho = p_chgmix->get_drho(pelec->charge, GlobalV::nelec); - double hsolver_error = 0.0; - if (firstscf) - { - firstscf = false; - hsolver_error = this->phsol->cal_hsolerror(); - // The error of HSolver is larger than drho, so a more precise HSolver should be excuconv_elected. - if (hsolver_error > drho) - { - diag_ethr = this->phsol->reset_diagethr(GlobalV::ofs_running, hsolver_error, drho); - this->hamilt2density(istep, iter, diag_ethr); - drho = p_chgmix->get_drho(pelec->charge, GlobalV::nelec); - hsolver_error = this->phsol->cal_hsolerror(); - } - } - // mixing will restart at this->p_chgmix->mixing_restart steps - if (drho <= GlobalV::MIXING_RESTART && GlobalV::MIXING_RESTART > 0.0 && this->p_chgmix->mixing_restart > iter) - { - this->p_chgmix->mixing_restart = iter + 1; - } - // drho will be 0 at this->p_chgmix->mixing_restart step, which is not ground state - this->conv_elec = (drho < this->scf_thr && !(iter==this->p_chgmix->mixing_restart && GlobalV::MIXING_RESTART > 0.0)); - - // If drho < hsolver_error in the first iter or drho < scf_thr, we do not change rho. - if (drho < hsolver_error || this->conv_elec) - { - if (drho < hsolver_error) GlobalV::ofs_warning << " drho < hsolver_error, keep charge density unchanged." << std::endl; - } - else - { - //----------charge mixing--------------- - // mixing will restart after this->p_chgmix->mixing_restart steps - if (GlobalV::MIXING_RESTART > 0 && iter == this->p_chgmix->mixing_restart - 1) - { - // do not mix charge density - } - else - { - p_chgmix->mix_rho(pelec->charge); // update chr->rho by mixing - } - if (GlobalV::SCF_THR_TYPE == 2) pelec->charge->renormalize_rho(); // renormalize rho in R-space would induce a error in K-space - //----------charge mixing done----------- - } - } + double diag_ethr = this->phsol->set_diagethr(istep, iter, drho); + + this->iter_init(istep, iter); + + this->hamilt2density(istep, iter, diag_ethr); + + // It may be changed when more clever parallel algorithm is put forward. + //When parallel algorithm for bands are adopted. Density will only be treated in the first group. + //(Different ranks should have abtained the same, but small differences always exist in practice.) + //Maybe in the future, density and wavefunctions should use different parallel algorithms, in which + //they do not occupy all processors, for example wavefunctions uses 20 processors while density uses 10. + if(GlobalV::MY_STOGROUP == 0) + { + // double drho = this->estate.caldr2(); + // EState should be used after it is constructed. + + drho = p_chgmix->get_drho(pelec->charge, GlobalV::nelec); + double hsolver_error = 0.0; + if (firstscf) + { + firstscf = false; + hsolver_error = this->phsol->cal_hsolerror(); + // The error of HSolver is larger than drho, + // so a more precise HSolver should be excuconv_elected. + if (hsolver_error > drho) + { + diag_ethr = this->phsol->reset_diagethr(GlobalV::ofs_running, hsolver_error, drho); + this->hamilt2density(istep, iter, diag_ethr); + drho = p_chgmix->get_drho(pelec->charge, GlobalV::nelec); + hsolver_error = this->phsol->cal_hsolerror(); + } + } + // mixing will restart at this->p_chgmix->mixing_restart steps + if (drho <= GlobalV::MIXING_RESTART + && GlobalV::MIXING_RESTART > 0.0 + && this->p_chgmix->mixing_restart > iter) + { + this->p_chgmix->mixing_restart = iter + 1; + } + + // drho will be 0 at this->p_chgmix->mixing_restart step, which is not ground state + this->conv_elec = (drho < this->scf_thr + && !(iter==this->p_chgmix->mixing_restart + && GlobalV::MIXING_RESTART > 0.0)); + + // If drho < hsolver_error in the first iter or drho < scf_thr, we do not change rho. + if (drho < hsolver_error || this->conv_elec) + { + if (drho < hsolver_error) + { + GlobalV::ofs_warning << " drho < hsolver_error, keep charge density unchanged." << std::endl; + } + } + else + { + //----------charge mixing--------------- + // mixing will restart after this->p_chgmix->mixing_restart steps + if (GlobalV::MIXING_RESTART > 0 + && iter == this->p_chgmix->mixing_restart - 1) + { + // do not mix charge density + } + else + { + p_chgmix->mix_rho(pelec->charge); // update chr->rho by mixing + } + if (GlobalV::SCF_THR_TYPE == 2) + { + pelec->charge->renormalize_rho(); // renormalize rho in R-space would induce a error in K-space + } + //----------charge mixing done----------- + } + } #ifdef __MPI - MPI_Bcast(&drho, 1, MPI_DOUBLE , 0, PARAPW_WORLD); - MPI_Bcast(&this->conv_elec, 1, MPI_DOUBLE , 0, PARAPW_WORLD); - MPI_Bcast(pelec->charge->rho[0], this->pw_rhod->nrxx, MPI_DOUBLE, 0, PARAPW_WORLD); + MPI_Bcast(&drho, 1, MPI_DOUBLE , 0, PARAPW_WORLD); + MPI_Bcast(&this->conv_elec, 1, MPI_DOUBLE , 0, PARAPW_WORLD); + MPI_Bcast(pelec->charge->rho[0], this->pw_rhod->nrxx, MPI_DOUBLE, 0, PARAPW_WORLD); #endif - // Hamilt should be used after it is constructed. - // this->phamilt->update(conv_elec); - updatepot(istep, iter); - eachiterfinish(iter); + // Hamilt should be used after it is constructed. + // this->phamilt->update(conv_elec); + this->update_pot(istep, iter); + this->iter_finish(iter); #ifdef __MPI - double duration = (double)(MPI_Wtime() - iterstart); + double duration = (double)(MPI_Wtime() - iterstart); #else - double duration = (std::chrono::duration_cast(std::chrono::system_clock::now() - iterstart)).count() / static_cast(1e6); + double duration = + (std::chrono::duration_cast(std::chrono::system_clock::now() + - iterstart)).count() / static_cast(1e6); #endif - /* - SCF print: G1 -3.435545e+03 0.000000e+00 3.607e-01 2.862e-01 - */ - printiter(iter, drho, duration, diag_ethr); - if (this->conv_elec) - { - this->niter = iter; - bool stop = this->do_after_converge(iter); - if(stop) break; - } - // notice for restart - if (GlobalV::MIXING_RESTART > 0 && iter == this->p_chgmix->mixing_restart - 1) - { - std::cout<<"SCF restart after this step!"<classname, "Run"); - } - // add nkstot,nkstot_ibz to output json - #ifdef __RAPIDJSON - int Jnkstot = this->pelec->klist->nkstot; - int Jnkstot_ibz = this->pelec->klist->nkstot_ibz; - Json::add_nkstot(Jnkstot,Jnkstot_ibz); - #endif //__RAPIDJSON - return; - }; - - template - void ESolver_KS::printhead() - { - std::cout << " " << std::setw(7) << "ITER"; - if (GlobalV::NSPIN == 2) - { - std::cout << std::setw(10) << "TMAG"; - std::cout << std::setw(10) << "AMAG"; - } - std::cout << std::setw(15) << "ETOT(eV)"; - std::cout << std::setw(15) << "EDIFF(eV)"; - std::cout << std::setw(11) << "DRHO"; - std::cout << std::setw(11) << "TIME(s)" << std::endl; - } - - template - void ESolver_KS::printiter(const int iter, const double drho, const double duration, const double ethr) - { - this->pelec->print_etot(this->conv_elec, iter, drho, duration, INPUT.printe, ethr); - } - - template - void ESolver_KS::writehead(std::ofstream& ofs_running, const int istep, const int iter) - { - ofs_running - << "\n " - << this->basisname - << " ALGORITHM --------------- ION=" << std::setw(4) << istep + 1 - << " ELEC=" << std::setw(4) << iter - << "--------------------------------\n"; - } - - template - int ESolver_KS::getniter() - { - return this->niter; - } - - template - ModuleIO::Output_Rho ESolver_KS::create_Output_Rho(int is, int iter, const std::string& prefix) - { - int precision = 3; - std::string tag = "CHG"; - return ModuleIO::Output_Rho(this->pw_big, - this->pw_rhod, - is, - GlobalV::NSPIN, - pelec->charge->rho_save[is], - iter, - this->pelec->eferm.get_efval(is), - &(GlobalC::ucell), - GlobalV::global_out_dir, - precision, - tag, - prefix); - } - - template - ModuleIO::Output_Rho ESolver_KS::create_Output_Kin(int is, int iter, const std::string& prefix) - { - int precision = 11; - std::string tag = "TAU"; - return ModuleIO::Output_Rho(this->pw_big, - this->pw_rhod, - is, - GlobalV::NSPIN, - pelec->charge->kin_r_save[is], - iter, - this->pelec->eferm.get_efval(is), - &(GlobalC::ucell), - GlobalV::global_out_dir, - precision, - tag, - prefix); - } - - template - ModuleIO::Output_Potential ESolver_KS::create_Output_Potential(int iter, const std::string& prefix) - { - int precision = 3; - std::string tag = "POT"; - return ModuleIO::Output_Potential(this->pw_big, - this->pw_rhod, - GlobalV::NSPIN, - iter, - GlobalV::out_pot, - this->pelec->pot->get_effective_v(), - this->pelec->pot->get_fixed_v(), - &(GlobalC::ucell), - pelec->charge, - precision, - GlobalV::global_out_dir, - tag, - prefix); - } + double dkin = 0.0; // for meta-GGA + if (XC_Functional::get_func_type() == 3 || XC_Functional::get_func_type() == 5) + { + dkin = p_chgmix->get_dkin(pelec->charge, GlobalV::nelec); + } + this->print_iter(iter, drho, dkin, duration, diag_ethr); + +#ifdef __RAPIDJSON + //add Json of scf mag + Json::add_output_scf_mag( + GlobalC::ucell.magnet.tot_magnetization, GlobalC::ucell.magnet.abs_magnetization, + this->pelec->f_en.etot * ModuleBase::Ry_to_eV, + this->pelec->f_en.etot_delta * ModuleBase::Ry_to_eV, + drho, + duration + ); +#endif //__RAPIDJSON + + if (this->conv_elec) + { + this->niter = iter; + bool stop = this->do_after_converge(iter); + if(stop) + { + break; + } + } + + // notice for restart + if (GlobalV::MIXING_RESTART > 0 + && iter == this->p_chgmix->mixing_restart - 1 + && iter != GlobalV::SCF_NMAX) + { + std::cout<<"SCF restart after this step!"<pelec->eferm.ef * ModuleBase::Ry_to_eV, + this->pelec->f_en.etot * ModuleBase::Ry_to_eV, + this->conv_elec + ); +#endif //__RAPIDJSON + + this->after_scf(istep); + + ModuleBase::timer::tick(this->classname, "run"); + } + +#ifdef __RAPIDJSON + // add nkstot,nkstot_ibz to output json + int Jnkstot = this->pelec->klist->nkstot; + int Jnkstot_ibz = this->pelec->klist->nkstot_ibz; + Json::add_nkstot(Jnkstot,Jnkstot_ibz); +#endif //__RAPIDJSON + return; +}; + + +template +void ESolver_KS::print_head(void) +{ + std::cout << " " << std::setw(7) << "ITER"; + + if (GlobalV::NSPIN == 2) + { + std::cout << std::setw(10) << "TMAG"; + std::cout << std::setw(10) << "AMAG"; + } + + std::cout << std::setw(15) << "ETOT(eV)"; + std::cout << std::setw(15) << "EDIFF(eV)"; + std::cout << std::setw(11) << "DRHO"; + + if (XC_Functional::get_func_type() == 3 || XC_Functional::get_func_type() == 5) + { + std::cout << std::setw(11) << "DKIN"; + } + + std::cout << std::setw(11) << "TIME(s)" << std::endl; +} + + +template +void ESolver_KS::print_iter( + const int iter, + const double drho, + const double dkin, + const double duration, + const double ethr) +{ + this->pelec->print_etot(this->conv_elec, iter, drho, dkin, duration, INPUT.printe, ethr); +} + + +template +void ESolver_KS::write_head(std::ofstream& ofs_running, const int istep, const int iter) +{ + ofs_running + << "\n " + << this->basisname + << " ALGORITHM --------------- ION=" << std::setw(4) << istep + 1 + << " ELEC=" << std::setw(4) << iter + << "--------------------------------\n"; +} +template +int ESolver_KS::getniter() +{ + return this->niter; +} + + +template +ModuleIO::Output_Rho ESolver_KS::create_Output_Rho( + int is, + int iter, + const std::string& prefix) +{ + const int precision = 3; + std::string tag = "CHG"; + return ModuleIO::Output_Rho(this->pw_big, + this->pw_rhod, + is, + GlobalV::NSPIN, + pelec->charge->rho_save[is], + iter, + this->pelec->eferm.get_efval(is), + &(GlobalC::ucell), + GlobalV::global_out_dir, + precision, + tag, + prefix); +} + +template +ModuleIO::Output_Rho ESolver_KS::create_Output_Kin(int is, int iter, const std::string& prefix) +{ + const int precision = 11; + std::string tag = "TAU"; + return ModuleIO::Output_Rho(this->pw_big, + this->pw_rhod, + is, + GlobalV::NSPIN, + pelec->charge->kin_r_save[is], + iter, + this->pelec->eferm.get_efval(is), + &(GlobalC::ucell), + GlobalV::global_out_dir, + precision, + tag, + prefix); +} + + +template +ModuleIO::Output_Potential ESolver_KS::create_Output_Potential(int iter, const std::string& prefix) +{ + const int precision = 3; + std::string tag = "POT"; + return ModuleIO::Output_Potential(this->pw_big, + this->pw_rhod, + GlobalV::NSPIN, + iter, + GlobalV::out_pot, + this->pelec->pot->get_effective_v(), + this->pelec->pot->get_fixed_v(), + &(GlobalC::ucell), + pelec->charge, + precision, + GlobalV::global_out_dir, + tag, + prefix); +} + + +//! This is for mixed-precision pw/LCAO basis sets. template class ESolver_KS, psi::DEVICE_CPU>; template class ESolver_KS, psi::DEVICE_CPU>; + +//! This is for GPU codes. #if ((defined __CUDA) || (defined __ROCM)) template class ESolver_KS, psi::DEVICE_GPU>; template class ESolver_KS, psi::DEVICE_GPU>; #endif + +//! This is for LCAO basis set. #ifdef __LCAO template class ESolver_KS; #endif -} \ No newline at end of file +} diff --git a/source/module_esolver/esolver_ks.h b/source/module_esolver/esolver_ks.h index ef8e57f2fa..63f79a60d8 100644 --- a/source/module_esolver/esolver_ks.h +++ b/source/module_esolver/esolver_ks.h @@ -20,85 +20,121 @@ namespace ModuleESolver { - template - class ESolver_KS : public ESolver_FP - { - public: - ESolver_KS(); - virtual ~ESolver_KS(); - // HSolver* phsol; - double scf_thr; // scf threshold - double drho; // the difference between rho_in (before HSolver) and rho_out (After HSolver) - int maxniter; // maximum iter steps for scf - int niter; // iter steps actually used in scf - bool conv_elec; // If electron density is converged in scf. - int out_freq_elec;// frequency for output - virtual void Init(Input& inp, UnitCell& cell) override; - - virtual void init_after_vc(Input& inp, UnitCell& cell) override; // liuyu add 2023-03-09 - - virtual void Run(const int istep, UnitCell& cell) override; - - // calculate electron density from a specific Hamiltonian - virtual void hamilt2density(const int istep, const int iter, const double ethr); - - // calculate electron states from a specific Hamiltonian - virtual void hamilt2estates(const double ethr){}; - - // get current step of Ionic simulation - virtual int getniter() override; - - protected: - // Something to do before SCF iterations. - virtual void beforescf(int istep) {}; - // Something to do before hamilt2density function in each iter loop. - virtual void eachiterinit(const int istep, const int iter) {}; - // Something to do after hamilt2density function in each iter loop. - virtual void eachiterfinish(const int iter) {}; - // Something to do after SCF iterations when SCF is converged or comes to the max iter step. - virtual void afterscf(const int istep) {}; - // It should be replaced by a function in Hamilt Class - virtual void updatepot(const int istep, const int iter) {}; - // choose strategy when charge density convergence achieved - virtual bool do_after_converge(int& iter){return true;} - - //TOOLS: - protected: - // Print the headline on the screen: - // ITER ETOT(eV) EDIFF(eV) DRHO TIME(s) - void printhead(); - // Print inforamtion in each iter - // G1 -3.435545e+03 0.000000e+00 3.607e-01 2.862e-01 - void printiter(const int iter, const double drho, const double duration, const double ethr); - // Write the headline in the running_log file - // "PW/LCAO" ALGORITHM --------------- ION= 1 ELEC= 1-------------------------------- - void writehead(std::ofstream& ofs_running, const int istep, const int iter); - - /// @brief create a new ModuleIO::Output_Rho object to output charge density - ModuleIO::Output_Rho create_Output_Rho(int is, int iter, const std::string& prefix="None"); - - /// @brief create a new ModuleIO::Output_Rho object to print kinetic energy density - ModuleIO::Output_Rho create_Output_Kin(int is, int iter, const std::string& prefix = "None"); - - /// @brief create a new ModuleIO::Output_Potential object to print potential - ModuleIO::Output_Potential create_Output_Potential(int iter, const std::string& prefix = "None"); - // TODO: control single precision at input files - - hsolver::HSolver* phsol = nullptr; - hamilt::Hamilt* p_hamilt = nullptr; - ModulePW::PW_Basis_K* pw_wfc = nullptr; - Charge_Mixing* p_chgmix = nullptr; - wavefunc wf; - Charge_Extra CE; - - // wavefunction coefficients - psi::Psi* psi = nullptr; - - protected: - std::string basisname; //PW or LCAO - protected: - void print_wfcfft(Input& inp, std::ofstream &ofs); - - }; -} +template +class ESolver_KS : public ESolver_FP +{ + public: + + //! Constructor + ESolver_KS(); + + //! Deconstructor + virtual ~ESolver_KS(); + + double scf_thr; // scf threshold + + double drho; // the difference between rho_in (before HSolver) and rho_out (After HSolver) + + int maxniter; // maximum iter steps for scf + + int niter; // iter steps actually used in scf + + bool conv_elec; // If electron density is converged in scf. + + int out_freq_elec;// frequency for output + + virtual void init(Input& inp, UnitCell& cell) override; + + virtual void init_after_vc(Input& inp, UnitCell& cell) override; // liuyu add 2023-03-09 + + virtual void run(const int istep, UnitCell& cell) override; + + // calculate electron density from a specific Hamiltonian + virtual void hamilt2density(const int istep, const int iter, const double ethr); + + // calculate electron states from a specific Hamiltonian + virtual void hamilt2estates(const double ethr){}; + + // get current step of Ionic simulation + virtual int getniter() override; + + protected: + //! Something to do before SCF iterations. + virtual void before_scf(int istep) {}; + + //! Something to do before hamilt2density function in each iter loop. + virtual void iter_init(const int istep, const int iter) {}; + + //! Something to do after hamilt2density function in each iter loop. + virtual void iter_finish(const int iter) {}; + + //! Something to do after SCF iterations when SCF is converged or comes to the max iter step. + virtual void after_scf(const int istep) {}; + + //! It should be replaced by a function in Hamilt Class + virtual void update_pot(const int istep, const int iter) {}; + + //! choose strategy when charge density convergence achieved + virtual bool do_after_converge(int& iter){return true;} + + protected: + + // Print the headline on the screen: + // ITER ETOT(eV) EDIFF(eV) DRHO TIME(s) + void print_head(); + + // Print inforamtion in each iter + // G1 -3.435545e+03 0.000000e+00 3.607e-01 2.862e-01 + // for metaGGA + // ITER ETOT(eV) EDIFF(eV) DRHO DKIN TIME(s) + // G1 -3.435545e+03 0.000000e+00 3.607e-01 3.522e-01 2.862e-01 + void print_iter( + const int iter, + const double drho, + const double dkin, + const double duration, + const double ethr); + + + // Write the headline in the running_log file + // "PW/LCAO" ALGORITHM --------------- ION= 1 ELEC= 1-------------------------------- + void write_head( + std::ofstream& ofs_running, + const int istep, + const int iter); + + /// @brief create a new ModuleIO::Output_Rho object to output charge density + ModuleIO::Output_Rho create_Output_Rho(int is, int iter, const std::string& prefix="None"); + + /// @brief create a new ModuleIO::Output_Rho object to print kinetic energy density + ModuleIO::Output_Rho create_Output_Kin(int is, int iter, const std::string& prefix = "None"); + + /// @brief create a new ModuleIO::Output_Potential object to print potential + ModuleIO::Output_Potential create_Output_Potential(int iter, const std::string& prefix = "None"); + + //! Solve Hamitonian + hsolver::HSolver* phsol = nullptr; + + //! Hamiltonian + hamilt::Hamilt* p_hamilt = nullptr; + + ModulePW::PW_Basis_K* pw_wfc = nullptr; + + Charge_Mixing* p_chgmix = nullptr; + + wavefunc wf; + + Charge_Extra CE; + + // wavefunction coefficients + psi::Psi* psi = nullptr; + + protected: + + std::string basisname; //PW or LCAO + + void print_wfcfft(Input& inp, std::ofstream &ofs); +}; + +} // end of namespace #endif diff --git a/source/module_esolver/esolver_ks_lcao.cpp b/source/module_esolver/esolver_ks_lcao.cpp index 0d942bcdd1..d5c7a9ae0e 100644 --- a/source/module_esolver/esolver_ks_lcao.cpp +++ b/source/module_esolver/esolver_ks_lcao.cpp @@ -1,4 +1,5 @@ #include "esolver_ks_lcao.h" +#include "module_base/tool_title.h" #include "module_base/global_variable.h" #include "module_io/dos_nao.h" @@ -17,10 +18,10 @@ #include "module_elecstate/module_charge/symmetry_rho.h" #include "module_elecstate/occupy.h" #include "module_hamilt_lcao/module_dftu/dftu.h" +#include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_new.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_io/print_info.h" #ifdef __EXX -// #include "module_rpa/rpa.h" #include "module_ri/RPA_LRI.h" #endif @@ -43,39 +44,45 @@ namespace ModuleESolver { - template - ESolver_KS_LCAO::ESolver_KS_LCAO() + + +template +ESolver_KS_LCAO::ESolver_KS_LCAO() { - this->classname = "ESolver_KS_LCAO"; - this->basisname = "LCAO"; + this->classname = "ESolver_KS_LCAO"; + this->basisname = "LCAO"; #ifdef __EXX - if (GlobalC::exx_info.info_ri.real_number) - { - this->exx_lri_double = std::make_shared>(GlobalC::exx_info.info_ri); - this->exd = std::make_shared>(this->exx_lri_double); - this->LM.Hexxd = &this->exd->get_Hexxs(); - } - else - { - this->exx_lri_complex = std::make_shared>>(GlobalC::exx_info.info_ri); - this->exc = std::make_shared>>(this->exx_lri_complex); - this->LM.Hexxc = &this->exc->get_Hexxs(); - } + if (GlobalC::exx_info.info_ri.real_number) + { + this->exx_lri_double = std::make_shared>(GlobalC::exx_info.info_ri); + this->exd = std::make_shared>(this->exx_lri_double); + this->LM.Hexxd = &this->exd->get_Hexxs(); + } + else + { + this->exx_lri_complex = std::make_shared>>(GlobalC::exx_info.info_ri); + this->exc = std::make_shared>>(this->exx_lri_complex); + this->LM.Hexxc = &this->exc->get_Hexxs(); + } #endif - } +} - template - ESolver_KS_LCAO::~ESolver_KS_LCAO() + +template +ESolver_KS_LCAO::~ESolver_KS_LCAO() { #ifndef USE_NEW_TWO_CENTER - this->orb_con.clear_after_ions(GlobalC::UOT, GlobalC::ORB, GlobalV::deepks_setorb, GlobalC::ucell.infoNL.nproj); + this->orb_con.clear_after_ions(GlobalC::UOT, GlobalC::ORB, GlobalV::deepks_setorb, GlobalC::ucell.infoNL.nproj); #endif } - template - void ESolver_KS_LCAO::Init(Input& inp, UnitCell& ucell) + +template +void ESolver_KS_LCAO::init(Input& inp, UnitCell& ucell) { - ModuleBase::TITLE("ESolver_KS_LCAO", "Init"); + ModuleBase::TITLE("ESolver_KS_LCAO", "init"); + ModuleBase::timer::tick("ESolver_KS_LCAO", "init"); + // if we are only calculating S, then there is no need // to prepare for potentials and so on @@ -97,38 +104,45 @@ namespace ModuleESolver } else { - ESolver_KS::Init(inp, ucell); + ESolver_KS::init(inp, ucell); } // end ifnot get_S // init ElecState // autoset nbands in ElecState, it should before basis_init (for Psi 2d divid) if (this->pelec == nullptr) - this->pelec = new elecstate::ElecStateLCAO(&(this->chr), + { + this->pelec = new elecstate::ElecStateLCAO( + &(this->chr), &(this->kv), this->kv.nks, &(this->LOC), + &(this->GG), // mohan add 2024-04-01 + &(this->GK), // mohan add 2024-04-01 &(this->UHM), &(this->LOWF), this->pw_rho, this->pw_big); + } //------------------init Basis_lcao---------------------- // Init Basis should be put outside of Ensolver. // * reading the localized orbitals/projectors // * construct the interpolation tables. - this->Init_Basis_lcao(this->orb_con, inp, ucell); + this->init_basis_lcao(this->orb_con, inp, ucell); //------------------init Basis_lcao---------------------- - // pass Hamilt-pointer to Operator + //! pass Hamilt-pointer to Operator this->UHM.genH.LM = this->UHM.LM = &this->LM; - // pass basis-pointer to EState and Psi + + //! pass basis-pointer to EState and Psi this->LOC.ParaV = this->LOWF.ParaV = this->LM.ParaV = &(this->orb_con.ParaV); - // init DensityMatrix + //! initialize DensityMatrix dynamic_cast*>(this->pelec)->init_DM(&this->kv, this->LM.ParaV, GlobalV::NSPIN); if (GlobalV::CALCULATION == "get_S") { + ModuleBase::timer::tick("ESolver_KS_LCAO", "init"); return; } @@ -140,9 +154,9 @@ namespace ModuleESolver #ifdef __EXX // PLEASE simplify the Exx_Global interface - // mohan add 2021-03-25 - // Peize Lin 2016-12-03 - if (GlobalV::CALCULATION == "scf" || GlobalV::CALCULATION == "relax" || GlobalV::CALCULATION == "cell-relax" + if (GlobalV::CALCULATION == "scf" + || GlobalV::CALCULATION == "relax" + || GlobalV::CALCULATION == "cell-relax" || GlobalV::CALCULATION == "md") { if (GlobalC::exx_info.info_global.cal_exx) @@ -150,7 +164,9 @@ namespace ModuleESolver /* In the special "two-level" calculation case, first scf iteration only calculate the functional without exact exchange. but in "nscf" calculation, there is no need of "two-level" method. */ - if (ucell.atoms[0].ncpp.xc_func == "HF" || ucell.atoms[0].ncpp.xc_func == "PBE0" || ucell.atoms[0].ncpp.xc_func == "HSE") + if (ucell.atoms[0].ncpp.xc_func == "HF" + || ucell.atoms[0].ncpp.xc_func == "PBE0" + || ucell.atoms[0].ncpp.xc_func == "HSE") { XC_Functional::set_xc_type("pbe"); } @@ -161,9 +177,13 @@ namespace ModuleESolver // GlobalC::exx_lcao.init(); if (GlobalC::exx_info.info_ri.real_number) + { this->exx_lri_double->init(MPI_COMM_WORLD, this->kv); + } else + { this->exx_lri_complex->init(MPI_COMM_WORLD, this->kv); + } } } #endif @@ -216,27 +236,36 @@ namespace ModuleESolver if (GlobalV::ocp) { this->pelec->fixed_weights(GlobalV::ocp_kb); - } + } + + ModuleBase::timer::tick("ESolver_KS_LCAO", "init"); + return; } - template - void ESolver_KS_LCAO::init_after_vc(Input& inp, UnitCell& ucell) + +template +void ESolver_KS_LCAO::init_after_vc(Input& inp, UnitCell& ucell) { - ESolver_KS::init_after_vc(inp, ucell); + ModuleBase::TITLE("ESolver_KS_LCAO", "init_after_vc"); + ModuleBase::timer::tick("ESolver_KS_LCAO", "init_after_vc"); - if (GlobalV::md_prec_level == 2) - { - delete this->pelec; - this->pelec = new elecstate::ElecStateLCAO(&(this->chr), - &(this->kv), - this->kv.nks, - &(this->LOC), - &(this->UHM), - &(this->LOWF), - this->pw_rho, - this->pw_big); - dynamic_cast*>(this->pelec)->init_DM(&this->kv, this->LM.ParaV, GlobalV::NSPIN); + ESolver_KS::init_after_vc(inp, ucell); + if (GlobalV::md_prec_level == 2) + { + delete this->pelec; + this->pelec = new elecstate::ElecStateLCAO(&(this->chr), + &(this->kv), + this->kv.nks, + &(this->LOC), + &(this->GG), // mohan add 2024-04-01 + &(this->GK), // mohan add 2024-04-01 + &(this->UHM), + &(this->LOWF), + this->pw_rho, + this->pw_big); + + dynamic_cast*>(this->pelec)->init_DM(&this->kv, this->LM.ParaV, GlobalV::NSPIN); GlobalC::ppcell.init_vloc(GlobalC::ppcell.vloc, this->pw_rho); @@ -254,56 +283,88 @@ namespace ModuleESolver &(this->pelec->f_en.etxc), &(this->pelec->f_en.vtxc)); } - } + } + + ModuleBase::timer::tick("ESolver_KS_LCAO", "init_after_vc"); + return; } - template - double ESolver_KS_LCAO::cal_Energy() + +template +double ESolver_KS_LCAO::cal_energy() { + ModuleBase::TITLE("ESolver_KS_LCAO", "cal_energy"); + return this->pelec->f_en.etot; } - template - void ESolver_KS_LCAO::cal_Force(ModuleBase::matrix& force) + + +template +void ESolver_KS_LCAO::cal_force(ModuleBase::matrix& force) { - Force_Stress_LCAO FSL(this->RA, GlobalC::ucell.nat); - FSL.getForceStress(GlobalV::CAL_FORCE, - GlobalV::CAL_STRESS, - GlobalV::TEST_FORCE, - GlobalV::TEST_STRESS, - this->LOC, - this->pelec, - this->psi, - this->UHM, - force, - this->scs, - this->sf, - this->kv, - this->pw_rho, + ModuleBase::TITLE("ESolver_KS_LCAO", "cal_force"); + ModuleBase::timer::tick("ESolver_KS_LCAO", "cal_force"); + + Force_Stress_LCAO fsl(this->RA, GlobalC::ucell.nat); + + fsl.getForceStress( + GlobalV::CAL_FORCE, + GlobalV::CAL_STRESS, + GlobalV::TEST_FORCE, + GlobalV::TEST_STRESS, + this->LOC, + this->orb_con.ParaV, + this->LM, + this->pelec, + this->psi, + this->UHM, + this->GG, // mohan add 2024-04-01 + this->GK, // mohan add 2024-04-01 + force, + this->scs, + this->sf, + this->kv, + this->pw_rho, #ifdef __EXX - * this->exx_lri_double, - * this->exx_lri_complex, + * this->exx_lri_double, + * this->exx_lri_complex, #endif - & GlobalC::ucell.symm); - // delete RA after cal_Force - this->RA.delete_grid(); - this->have_force = true; + & GlobalC::ucell.symm); + + // delete RA after cal_force + + this->RA.delete_grid(); + + this->have_force = true; + + ModuleBase::timer::tick("ESolver_KS_LCAO", "cal_force"); } - template - void ESolver_KS_LCAO::cal_Stress(ModuleBase::matrix& stress) + +template +void ESolver_KS_LCAO::cal_stress(ModuleBase::matrix& stress) { + ModuleBase::TITLE("ESolver_KS_LCAO", "cal_stress"); + ModuleBase::timer::tick("ESolver_KS_LCAO", "cal_stress"); + if (!this->have_force) { ModuleBase::matrix fcs; - this->cal_Force(fcs); + this->cal_force(fcs); } stress = this->scs; // copy the stress this->have_force = false; + + ModuleBase::timer::tick("ESolver_KS_LCAO", "cal_stress"); } - template - void ESolver_KS_LCAO::postprocess() + +template +void ESolver_KS_LCAO::post_process(void) { + ModuleBase::TITLE("ESolver_KS_LCAO", "post_process"); + ModuleBase::timer::tick("ESolver_KS_LCAO", "post_process"); + GlobalV::ofs_running << "\n\n --------------------------------------------" << std::endl; GlobalV::ofs_running << std::setprecision(16); GlobalV::ofs_running << " !FINAL_ETOT_IS " << this->pelec->f_en.etot * ModuleBase::Ry_to_eV << " eV" << std::endl; @@ -324,12 +385,14 @@ namespace ModuleESolver GlobalV::ofs_running << "\n\n\n\n"; } // qianrui modify 2020-10-18 - if (GlobalV::CALCULATION == "scf" || GlobalV::CALCULATION == "md" || GlobalV::CALCULATION == "relax") + if (GlobalV::CALCULATION == "scf" + || GlobalV::CALCULATION == "md" + || GlobalV::CALCULATION == "relax") { ModuleIO::write_istate_info(this->pelec->ekb, this->pelec->wg, this->kv, &(GlobalC::Pkpoints)); } - int nspin0 = (GlobalV::NSPIN == 2) ? 2 : 1; + const int nspin0 = (GlobalV::NSPIN == 2) ? 2 : 1; if (INPUT.out_band[0]) // pengfei 2014-10-13 { @@ -373,26 +436,33 @@ namespace ModuleESolver if (INPUT.out_dos) { - ModuleIO::out_dos_nao( - this->psi, - this->UHM, - this->pelec->ekb, - this->pelec->wg, - INPUT.dos_edelta_ev, - INPUT.dos_scale, - INPUT.dos_sigma, - *(this->pelec->klist), - GlobalC::Pkpoints, - GlobalC::ucell, - this->pelec->eferm, - GlobalV::NBANDS, - this->p_hamilt); - } + ModuleIO::out_dos_nao( + this->psi, + this->UHM, + this->pelec->ekb, + this->pelec->wg, + INPUT.dos_edelta_ev, + INPUT.dos_scale, + INPUT.dos_sigma, + *(this->pelec->klist), + GlobalC::Pkpoints, + GlobalC::ucell, + this->pelec->eferm, + GlobalV::NBANDS, + this->p_hamilt); + } + ModuleBase::timer::tick("ESolver_KS_LCAO", "post_process"); } - template - void ESolver_KS_LCAO::Init_Basis_lcao(ORB_control& orb_con, Input& inp, UnitCell& ucell) + +template +void ESolver_KS_LCAO::init_basis_lcao( + ORB_control& orb_con, + Input& inp, + UnitCell& ucell) { + ModuleBase::TITLE("ESolver_KS_LCAO", "init_basis_lcao"); + // autoset NB2D first if (GlobalV::NB2D == 0) { @@ -429,24 +499,9 @@ namespace ModuleESolver two_center_bundle.reset(new TwoCenterBundle); two_center_bundle->build_orb(ucell.ntype, ucell.orbital_fn); two_center_bundle->build_alpha(GlobalV::deepks_setorb, &ucell.descriptor_file); + two_center_bundle->build_orb_onsite(ucell.ntype, GlobalV::onsite_radius); // currently deepks only use one descriptor file, so cast bool to int is fine - //this->orb_con.read_orb_first(GlobalV::ofs_running, - // GlobalC::ORB, - // ucell.ntype, - // GlobalV::global_orbital_dir, - // ucell.orbital_fn, - // ucell.descriptor_file, - // ucell.lmax, - // inp.lcao_ecut, - // inp.lcao_dk, - // inp.lcao_dr, - // inp.lcao_rmax, - // GlobalV::deepks_setorb, - // inp.out_mat_r, - // GlobalV::CAL_FORCE, - // GlobalV::MY_RANK); - // TODO Due to the omnipresence of GlobalC::ORB, we still have to rely // on the old interface for now. two_center_bundle->to_LCAO_Orbitals(GlobalC::ORB, @@ -486,18 +541,24 @@ namespace ModuleESolver this->orb_con.setup_2d_division(GlobalV::ofs_running, GlobalV::ofs_warning); this->orb_con.ParaV.set_atomic_trace(GlobalC::ucell.get_iat2iwt(), GlobalC::ucell.nat, GlobalV::NLOCAL); } + + return; } - template - void ESolver_KS_LCAO::eachiterinit(const int istep, const int iter) + +template +void ESolver_KS_LCAO::iter_init(const int istep, const int iter) { + ModuleBase::TITLE("ESolver_KS_LCAO", "iter_init"); + if (iter == 1) { this->p_chgmix->init_mixing(); // init mixing - this->p_chgmix->mixing_restart = GlobalV::SCF_NMAX; + this->p_chgmix->mixing_restart = GlobalV::SCF_NMAX + 1; } // for mixing restart - if (iter == this->p_chgmix->mixing_restart && GlobalV::MIXING_RESTART > 0.0) + if (iter == this->p_chgmix->mixing_restart + && GlobalV::MIXING_RESTART > 0.0) { this->p_chgmix->init_mixing(); if (GlobalV::MIXING_DMR) // for mixing_dmr @@ -516,8 +577,9 @@ namespace ModuleESolver // mohan move it outside 2011-01-13 // first need to calculate the weight according to // electrons number. - - if (istep == 0 && this->wf.init_wfc == "file" && this->LOWF.error == 0) + if (istep == 0 + && this->wf.init_wfc == "file" + && this->LOWF.error == 0) { if (iter == 1) { @@ -553,8 +615,14 @@ namespace ModuleESolver // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (GlobalV::NSPIN == 4) + { GlobalC::ucell.cal_ux(); + } + + //! update the potentials by using new electron charge density this->pelec->pot->update_from_charge(this->pelec->charge, &GlobalC::ucell); + + //! compute the correction energy for metals this->pelec->f_en.descf = this->pelec->cal_delta_escf(); } } @@ -562,19 +630,36 @@ namespace ModuleESolver #ifdef __EXX // calculate exact-exchange if (GlobalC::exx_info.info_ri.real_number) + { this->exd->exx_eachiterinit(*dynamic_cast*>(this->pelec)->get_DM(), iter); + } else + { this->exc->exx_eachiterinit(*dynamic_cast*>(this->pelec)->get_DM(), iter); + } #endif if (GlobalV::dft_plus_u) { - GlobalC::dftu.cal_slater_UJ(this->pelec->charge->rho, this->pw_rho->nrxx); // Calculate U and J if Yukawa potential is used + if(istep == 0 && iter == 1) + { + hamilt::DFTUNew>::dm_in_dftu = nullptr; + } + else + { + hamilt::DFTUNew>::dm_in_dftu = + dynamic_cast*>(this->pelec) + ->get_DM(); + } + // Calculate U and J if Yukawa potential is used + GlobalC::dftu.cal_slater_UJ(this->pelec->charge->rho, this->pw_rho->nrxx); } + #ifdef __DEEPKS // the density matrixes of DeePKS have been updated in each iter GlobalC::ld.set_hr_cal(true); + // HR in HamiltLCAO should be recalculate if(GlobalV::deepks_scf) { @@ -587,7 +672,7 @@ namespace ModuleESolver // update Gint_K if (!GlobalV::GAMMA_ONLY_LOCAL) { - this->UHM.GK.renew(); + this->GK.renew(); } // update real space Hamiltonian this->p_hamilt->refresh(); @@ -601,9 +686,12 @@ namespace ModuleESolver } } - template - void ESolver_KS_LCAO::hamilt2density(int istep, int iter, double ethr) + +template +void ESolver_KS_LCAO::hamilt2density(int istep, int iter, double ethr) { + ModuleBase::TITLE("ESolver_KS_LCAO", "hamilt2density"); + // save input rho this->pelec->charge->save_rho_before_sum_band(); // save density matrix for mixing @@ -648,21 +736,30 @@ namespace ModuleESolver #ifdef __EXX if (GlobalC::exx_info.info_ri.real_number) - this->exd->exx_hamilt2density(*this->pelec, *this->LOWF.ParaV); + { + this->exd->exx_hamilt2density(*this->pelec, *this->LOWF.ParaV, iter); + } else - this->exc->exx_hamilt2density(*this->pelec, *this->LOWF.ParaV); + { + this->exc->exx_hamilt2density(*this->pelec, *this->LOWF.ParaV, iter); + } #endif // if DFT+U calculation is needed, this function will calculate // the local occupation number matrix and energy correction if (GlobalV::dft_plus_u) { - if (GlobalC::dftu.omc != 2) + // only old DFT+U method should calculated energy correction in esolver, new DFT+U method will calculate energy in calculating Hamiltonian + if(GlobalV::dft_plus_u == 2) { - const std::vector>& tmp_dm = dynamic_cast*>(this->pelec)->get_DM()->get_DMK_vector(); - this->dftu_cal_occup_m(iter, tmp_dm); + if (GlobalC::dftu.omc != 2) + { + const std::vector>& tmp_dm = + dynamic_cast*>(this->pelec)->get_DM()->get_DMK_vector(); + this->dftu_cal_occup_m(iter, tmp_dm); + } + GlobalC::dftu.cal_energy_correction(istep); } - GlobalC::dftu.cal_energy_correction(istep); GlobalC::dftu.output(); } @@ -670,7 +767,8 @@ namespace ModuleESolver if (GlobalV::deepks_scf) { const Parallel_Orbitals* pv = this->LOWF.ParaV; - const std::vector>& dm = dynamic_cast*>(this->pelec)->get_DM()->get_DMK_vector(); + const std::vector>& dm = + dynamic_cast*>(this->pelec)->get_DM()->get_DMK_vector(); this->dpks_cal_e_delta_band(dm); } #endif @@ -701,15 +799,18 @@ namespace ModuleESolver this->pelec->f_en.deband = this->pelec->cal_delta_eband(); } - template - void ESolver_KS_LCAO::updatepot(const int istep, const int iter) + +template +void ESolver_KS_LCAO::update_pot(const int istep, const int iter) { + ModuleBase::TITLE("ESolver_KS_LCAO", "update_pot"); + // print Hamiltonian and Overlap matrix if (this->conv_elec) { if (!GlobalV::GAMMA_ONLY_LOCAL && hsolver::HSolverLCAO::out_mat_hs[0]) { - this->UHM.GK.renew(true); + this->GK.renew(true); } for (int ik = 0; ik < this->kv.nks; ++ik) { @@ -755,7 +856,9 @@ namespace ModuleESolver if (this->conv_elec) { if (elecstate::ElecStateLCAO::out_wfc_lcao) + { elecstate::ElecStateLCAO::out_wfc_flag = elecstate::ElecStateLCAO::out_wfc_lcao; + } for (int ik = 0; ik < this->kv.nks; ik++) { @@ -766,7 +869,9 @@ namespace ModuleESolver } } if (elecstate::ElecStateLCAO::out_wfc_lcao) + { elecstate::ElecStateLCAO::out_wfc_flag = 0; + } } // (9) Calculate new potential according to new Charge Density. @@ -780,7 +885,9 @@ namespace ModuleESolver if (!this->conv_elec) { if (GlobalV::NSPIN == 4) + { GlobalC::ucell.cal_ux(); + } this->pelec->pot->update_from_charge(this->pelec->charge, &GlobalC::ucell); this->pelec->f_en.descf = this->pelec->cal_delta_escf(); } @@ -790,9 +897,12 @@ namespace ModuleESolver } } - template - void ESolver_KS_LCAO::eachiterfinish(int iter) + +template +void ESolver_KS_LCAO::iter_finish(int iter) { + ModuleBase::TITLE("ESolver_KS_LCAO", "iter_finish"); + // mix density matrix if (GlobalV::MIXING_RESTART > 0 && iter >= this->p_chgmix->mixing_restart && GlobalV::MIXING_DMR ) { @@ -809,10 +919,31 @@ namespace ModuleESolver { for (int is = 0; is < GlobalV::NSPIN; ++is) { - GlobalC::restart.save_disk(*this->UHM.LM, "charge", is, this->pelec->charge->nrxx, this->pelec->charge->rho); + GlobalC::restart.save_disk("charge", is, this->pelec->charge->nrxx, this->pelec->charge->rho[is]); } } +#ifdef __EXX + int two_level_step = GlobalC::exx_info.info_ri.real_number ? this->exd->two_level_step : this->exc->two_level_step; + if (GlobalC::restart.info_save.save_H && two_level_step > 0 && + (!GlobalC::exx_info.info_global.separate_loop || iter == 1)) // to avoid saving the same value repeatedly + { + std::vector Hexxk_save(this->LOWF.ParaV->get_local_size()); + for (int ik = 0;ik < this->kv.nks;++ik) + { + ModuleBase::GlobalFunc::ZEROS(Hexxk_save.data(), Hexxk_save.size()); + + hamilt::OperatorEXX> opexx_save(&this->LM, nullptr, &Hexxk_save, this->kv); + + opexx_save.contributeHk(ik); + GlobalC::restart.save_disk("Hexx", ik, this->LOWF.ParaV->get_local_size(), Hexxk_save.data()); + } + if (GlobalV::MY_RANK == 0) + { + GlobalC::restart.save_disk("Eexx", 0, 1, &this->pelec->f_en.exx); + } + } +#endif //----------------------------------- // output charge density for tmp //----------------------------------- @@ -846,9 +977,12 @@ namespace ModuleESolver this->pelec->cal_energies(2); } - template - void ESolver_KS_LCAO::afterscf(const int istep) + +template +void ESolver_KS_LCAO::after_scf(const int istep) { + ModuleBase::TITLE("ESolver_KS_LCAO", "after_scf"); + // save charge difference into files for charge extrapolation if (GlobalV::CALCULATION != "scf") { @@ -888,18 +1022,39 @@ namespace ModuleESolver bool out_exc = true; // tmp, add parameter! if (GlobalV::out_mat_xc) - ModuleIO::write_Vxc(GlobalV::NSPIN, GlobalV::NLOCAL, GlobalV::DRANK, - *this->psi, GlobalC::ucell, this->sf, *this->pw_rho, *this->pw_rhod, GlobalC::ppcell.vloc, - *this->pelec->charge, this->UHM, this->LM, this->LOC, this->kv, this->pelec->wg, GlobalC::GridD); + { + ModuleIO::write_Vxc( + GlobalV::NSPIN, + GlobalV::NLOCAL, + GlobalV::DRANK, + *this->psi, + GlobalC::ucell, + this->sf, + *this->pw_rho, + *this->pw_rhod, + GlobalC::ppcell.vloc, + *this->pelec->charge, + this->GG, + this->GK, + this->LM, + this->LOC, + this->kv, + this->pelec->wg, + GlobalC::GridD); + } #ifdef __EXX if (GlobalC::exx_info.info_global.cal_exx) // Peize Lin add if 2022.11.14 { const std::string file_name_exx = GlobalV::global_out_dir + "HexxR_" + std::to_string(GlobalV::MY_RANK); if (GlobalC::exx_info.info_ri.real_number) + { this->exd->write_Hexxs(file_name_exx); + } else + { this->exc->write_Hexxs(file_name_exx); + } } #endif @@ -928,6 +1083,7 @@ namespace ModuleESolver this->LOWF.ParaV, *(this->psi), dynamic_cast*>(this->pelec)->get_DM()); + ModuleBase::timer::tick("ESolver_KS_LCAO", "out_deepks_labels"); #endif @@ -955,6 +1111,7 @@ namespace ModuleESolver } // qifeng add 2019/9/10, jiyy modify 2023/2/27, liuyu move here 2023-04-18 } + // spin constrain calculations, added by Tianqi Zhao. if (GlobalV::sc_mag_switch) { SpinConstrain& sc = SpinConstrain::getScInstance(); @@ -965,30 +1122,61 @@ namespace ModuleESolver { RA.delete_grid(); } + + // quasi-orbitals, added by Yike Huang. if(GlobalV::qo_switch) { - toQO tqo(GlobalV::qo_basis, GlobalV::qo_strategy); - tqo.initialize(&GlobalC::ucell, this->kv.kvec_d); + toQO tqo(GlobalV::qo_basis, GlobalV::qo_strategy, GlobalV::qo_thr, GlobalV::qo_screening_coeff); + tqo.initialize(GlobalV::global_out_dir, + GlobalV::global_pseudo_dir, + GlobalV::global_orbital_dir, + &GlobalC::ucell, this->kv.kvec_d, + GlobalV::ofs_running, + GlobalV::MY_RANK, GlobalV::NPROC); tqo.calculate(); } } - template - bool ESolver_KS_LCAO::do_after_converge(int& iter) + +template +bool ESolver_KS_LCAO::do_after_converge(int& iter) { + ModuleBase::TITLE("ESolver_KS_LCAO","do_after_converge"); + #ifdef __EXX if (GlobalC::exx_info.info_ri.real_number) - return this->exd->exx_after_converge(*this->p_hamilt, this->LM, *dynamic_cast*>(this->pelec)->get_DM(), this->kv, iter); - else - return this->exc->exx_after_converge(*this->p_hamilt, this->LM, *dynamic_cast*>(this->pelec)->get_DM(), this->kv, iter); + { + return this->exd->exx_after_converge( + *this->p_hamilt, + this->LM, + *dynamic_cast*>(this->pelec)->get_DM(), + this->kv, + iter); + } + else + { + return this->exc->exx_after_converge(*this->p_hamilt, + this->LM, + *dynamic_cast*>(this->pelec)->get_DM(), + this->kv, + iter); + } #endif // __EXX + + if(GlobalV::dft_plus_u) + { + // use the converged occupation matrix for next MD/Relax SCF calculation + GlobalC::dftu.initialed_locale = true; + } + return true; } - template - ModuleIO::Output_DM ESolver_KS_LCAO::create_Output_DM(int is, int iter) + +template +ModuleIO::Output_DM ESolver_KS_LCAO::create_Output_DM(int is, int iter) { - int precision = 3; + const int precision = 3; return ModuleIO::Output_DM(this->GridT, is, @@ -1002,32 +1190,37 @@ namespace ModuleESolver GlobalV::GAMMA_ONLY_LOCAL); } - template - ModuleIO::Output_DM1 ESolver_KS_LCAO::create_Output_DM1(int istep) + +template +ModuleIO::Output_DM1 ESolver_KS_LCAO::create_Output_DM1(int istep) { const elecstate::DensityMatrix,double>* DM = dynamic_cast>*>(this->pelec)->get_DM(); return ModuleIO::Output_DM1(GlobalV::NSPIN, istep, this->LOC, this->RA, this->kv, DM); } - template - ModuleIO::Output_Mat_Sparse ESolver_KS_LCAO::create_Output_Mat_Sparse(int istep) + +template +ModuleIO::Output_Mat_Sparse ESolver_KS_LCAO::create_Output_Mat_Sparse(int istep) { - return ModuleIO::Output_Mat_Sparse(hsolver::HSolverLCAO::out_mat_hsR, - hsolver::HSolverLCAO::out_mat_dh, - hsolver::HSolverLCAO::out_mat_t, - INPUT.out_mat_r, - istep, - this->pelec->pot->get_effective_v(), - *this->LOWF.ParaV, - this->UHM, - this->LM, - this->kv, - this->p_hamilt); + return ModuleIO::Output_Mat_Sparse( + hsolver::HSolverLCAO::out_mat_hsR, + hsolver::HSolverLCAO::out_mat_dh, + hsolver::HSolverLCAO::out_mat_t, + INPUT.out_mat_r, + istep, + this->pelec->pot->get_effective_v(), + *this->LOWF.ParaV, + this->UHM, + this->GK, // mohan add 2024-04-01 + this->LM, + this->kv, + this->p_hamilt); } - template - bool ESolver_KS_LCAO::md_skip_out(std::string calculation, int istep, int interval) + +template +bool ESolver_KS_LCAO::md_skip_out(std::string calculation, int istep, int interval) { if (calculation == "md") { @@ -1036,9 +1229,11 @@ namespace ModuleESolver return true; } } - return false; - } - template class ESolver_KS_LCAO; - template class ESolver_KS_LCAO, double>; - template class ESolver_KS_LCAO, std::complex>; + return false; +} + + +template class ESolver_KS_LCAO; +template class ESolver_KS_LCAO, double>; +template class ESolver_KS_LCAO, std::complex>; } // namespace ModuleESolver diff --git a/source/module_esolver/esolver_ks_lcao.h b/source/module_esolver/esolver_ks_lcao.h index a6e2a20baa..c8c81ab203 100644 --- a/source/module_esolver/esolver_ks_lcao.h +++ b/source/module_esolver/esolver_ks_lcao.h @@ -6,6 +6,10 @@ #include "module_hamilt_lcao/hamilt_lcaodft/local_orbital_charge.h" #include "module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.h" +// for grid integration +#include "module_hamilt_lcao/module_gint/gint_gamma.h" +#include "module_hamilt_lcao/module_gint/gint_k.h" + #include "module_basis/module_ao/ORB_control.h" #ifdef __EXX #include "module_ri/Mix_DMk_2D.h" @@ -16,6 +20,7 @@ #include "module_io/output_mat_sparse.h" #include "module_basis/module_nao/two_center_bundle.h" #include + namespace ModuleESolver { template @@ -25,32 +30,64 @@ namespace ModuleESolver ESolver_KS_LCAO(); ~ESolver_KS_LCAO(); - void Init(Input& inp, UnitCell& cell) override; + void init(Input& inp, UnitCell& cell) override; + void init_after_vc(Input& inp, UnitCell& cell) override; - double cal_Energy() override; - void cal_Force(ModuleBase::matrix& force) override; - void cal_Stress(ModuleBase::matrix& stress) override; - void postprocess() override; + double cal_energy() override; + + void cal_force(ModuleBase::matrix &force) override; + + void cal_stress(ModuleBase::matrix &stress) override; + + void post_process() override; + void nscf() override; + void get_S(); protected: - virtual void beforescf(const int istep) override; - virtual void eachiterinit(const int istep, const int iter) override; + + virtual void before_scf(const int istep) override; + + virtual void iter_init(const int istep, const int iter) override; + virtual void hamilt2density(const int istep, const int iter, const double ethr) override; - virtual void updatepot(const int istep, const int iter) override; - virtual void eachiterfinish(const int iter) override; - virtual void afterscf(const int istep) override; + + virtual void update_pot(const int istep, const int iter) override; + + virtual void iter_finish(const int iter) override; + + virtual void after_scf(const int istep) override; + virtual bool do_after_converge(int& iter) override; - virtual void othercalculation(const int istep)override; + virtual void others(const int istep)override; + + // we will get rid of this class soon, don't use it, mohan 2024-03-28 ORB_control orb_con; //Basis_LCAO + + // we will get rid of this class soon, don't use it, mohan 2024-03-28 Record_adj RA; + + // we will get rid of this class soon, don't use it, mohan 2024-03-28 Local_Orbital_wfc LOWF; + + // we will get rid of this class soon, don't use it, mohan 2024-03-28 Local_Orbital_Charge LOC; + + // we will get rid of this class soon, don't use it, mohan 2024-03-28 LCAO_Hamilt UHM; + + // used for k-dependent grid integration. + Gint_k GK; + + // used for gamma only algorithms. + Gint_Gamma GG; + + // we will get rid of this class soon, don't use it, mohan 2024-03-28 LCAO_Matrix LM; + Grid_Technique GridT; std::unique_ptr two_center_bundle; @@ -62,7 +99,7 @@ namespace ModuleESolver ModuleBase::matrix scs; bool have_force = false; - void Init_Basis_lcao(ORB_control& orb_con, Input& inp, UnitCell& ucell); + void init_basis_lcao(ORB_control& orb_con, Input& inp, UnitCell& ucell); //--------------common for all calculation, not only scf------------- // set matrix and grid integral @@ -97,8 +134,5 @@ namespace ModuleESolver #endif }; - - - } #endif diff --git a/source/module_esolver/esolver_ks_lcao_elec.cpp b/source/module_esolver/esolver_ks_lcao_elec.cpp index 6c6ee8ad8f..290feed8b3 100644 --- a/source/module_esolver/esolver_ks_lcao_elec.cpp +++ b/source/module_esolver/esolver_ks_lcao_elec.cpp @@ -101,8 +101,8 @@ void ESolver_KS_LCAO::beforesolver(const int istep) // init psi if (this->psi == nullptr) { - int nsk; - int ncol; + int nsk=0; + int ncol=0; if (GlobalV::GAMMA_ONLY_LOCAL) { nsk = GlobalV::NSPIN; @@ -126,7 +126,12 @@ void ESolver_KS_LCAO::beforesolver(const int istep) } // prepare grid in Gint - this->UHM.grid_prepare(this->GridT, *this->pw_rho, *this->pw_big); + this->UHM.grid_prepare( + this->GridT, + this->GG, + this->GK, + *this->pw_rho, + *this->pw_big); // init Hamiltonian if (this->p_hamilt != nullptr) @@ -137,14 +142,19 @@ void ESolver_KS_LCAO::beforesolver(const int istep) if (this->p_hamilt == nullptr) { elecstate::DensityMatrix* DM = dynamic_cast*>(this->pelec)->get_DM(); - this->p_hamilt = new hamilt::HamiltLCAO(GlobalV::GAMMA_ONLY_LOCAL ? &(this->UHM.GG) : nullptr, - GlobalV::GAMMA_ONLY_LOCAL ? nullptr : &(this->UHM.GK), - &(this->UHM.genH), - &(this->LM), - &(this->LOC), - this->pelec->pot, - this->kv, - DM); + this->p_hamilt = new hamilt::HamiltLCAO(GlobalV::GAMMA_ONLY_LOCAL ? &(this->GG) : nullptr, + GlobalV::GAMMA_ONLY_LOCAL ? nullptr : &(this->GK), + &(this->UHM.genH), + &(this->LM), + &(this->LOC), + this->pelec->pot, + this->kv, +#ifdef __EXX + DM, + GlobalC::exx_info.info_ri.real_number ? &this->exd->two_level_step : &this->exc->two_level_step); +#else + DM); +#endif } // init density kernel and wave functions. this->LOC.allocate_dm_wfc(this->GridT, this->pelec, this->LOWF, this->psi, this->kv, istep); @@ -174,6 +184,9 @@ void ESolver_KS_LCAO::beforesolver(const int istep) this->GridT.nnrg, this->GridT.trace_lo, #endif + GlobalV::GAMMA_ONLY_LOCAL, + GlobalV::NLOCAL, + GlobalV::NSPIN, is, ssd.str(), this->LOC.DM, @@ -186,7 +199,7 @@ void ESolver_KS_LCAO::beforesolver(const int istep) if (GlobalV::GAMMA_ONLY_LOCAL) { Gint_inout inout(this->LOC.DM, this->pelec->charge->rho, Gint_Tools::job_type::rho); - this->UHM.GG.cal_gint(&inout); + this->GG.cal_gint(&inout); if (XC_Functional::get_func_type() == 3 || XC_Functional::get_func_type() == 5) { for (int is = 0; is < GlobalV::NSPIN; is++) @@ -194,13 +207,13 @@ void ESolver_KS_LCAO::beforesolver(const int istep) ModuleBase::GlobalFunc::ZEROS(this->pelec->charge->kin_r[0], this->pw_rho->nrxx); } Gint_inout inout1(this->LOC.DM, this->pelec->charge->kin_r, Gint_Tools::job_type::tau); - this->UHM.GG.cal_gint(&inout1); + this->GG.cal_gint(&inout1); } } else { Gint_inout inout(this->LOC.DM_R, this->pelec->charge->rho, Gint_Tools::job_type::rho); - this->UHM.GK.cal_gint(&inout); + this->GK.cal_gint(&inout); if (XC_Functional::get_func_type() == 3 || XC_Functional::get_func_type() == 5) { for (int is = 0; is < GlobalV::NSPIN; is++) @@ -208,7 +221,7 @@ void ESolver_KS_LCAO::beforesolver(const int istep) ModuleBase::GlobalFunc::ZEROS(this->pelec->charge->kin_r[0], this->pw_rho->nrxx); } Gint_inout inout1(this->LOC.DM_R, this->pelec->charge->kin_r, Gint_Tools::job_type::tau); - this->UHM.GK.cal_gint(&inout1); + this->GK.cal_gint(&inout1); } } @@ -256,16 +269,19 @@ void ESolver_KS_LCAO::beforesolver(const int istep) //========================================================= // cal_ux should be called before init_scf because // the direction of ux is used in noncoline_rho - //========================================================= - if(GlobalV::NSPIN == 4 && GlobalV::DOMAG) GlobalC::ucell.cal_ux(); - ModuleBase::timer::tick("ESolver_KS_LCAO", "beforesolver"); + //========================================================= + if(GlobalV::NSPIN == 4 && GlobalV::DOMAG) + { + GlobalC::ucell.cal_ux(); + } + ModuleBase::timer::tick("ESolver_KS_LCAO", "beforesolver"); } template -void ESolver_KS_LCAO::beforescf(int istep) +void ESolver_KS_LCAO::before_scf(int istep) { - ModuleBase::TITLE("ESolver_KS_LCAO", "beforescf"); - ModuleBase::timer::tick("ESolver_KS_LCAO", "beforescf"); + ModuleBase::TITLE("ESolver_KS_LCAO", "before_scf"); + ModuleBase::timer::tick("ESolver_KS_LCAO", "before_scf"); if (GlobalC::ucell.cell_parameter_updated) { @@ -293,6 +309,14 @@ void ESolver_KS_LCAO::beforescf(int istep) } this->beforesolver(istep); + // Peize Lin add 2016-12-03 +#ifdef __EXX // set xc type before the first cal of xc in pelec->init_scf + if (GlobalC::exx_info.info_ri.real_number) + this->exd->exx_beforescf(this->kv, *this->p_chgmix); + else + this->exc->exx_beforescf(this->kv, *this->p_chgmix); +#endif // __EXX + this->pelec->init_scf(istep, this->sf.strucFac); // initalize DMR // DMR should be same size with Hamiltonian(R) @@ -307,13 +331,6 @@ void ESolver_KS_LCAO::beforescf(int istep) { srho.begin(is, *(this->pelec->charge), this->pw_rho, GlobalC::Pgrid, GlobalC::ucell.symm); } -// Peize Lin add 2016-12-03 -#ifdef __EXX - if (GlobalC::exx_info.info_ri.real_number) - this->exd->exx_beforescf(this->kv, *this->p_chgmix); - else - this->exc->exx_beforescf(this->kv, *this->p_chgmix); -#endif // __EXX // 1. calculate ewald energy. // mohan update 2021-02-25 if (!GlobalV::test_skip_ewald) @@ -323,15 +340,15 @@ void ESolver_KS_LCAO::beforescf(int istep) this->p_hamilt->non_first_scf = istep; - ModuleBase::timer::tick("ESolver_KS_LCAO", "beforescf"); + ModuleBase::timer::tick("ESolver_KS_LCAO", "before_scf"); return; } template -void ESolver_KS_LCAO::othercalculation(const int istep) +void ESolver_KS_LCAO::others(const int istep) { - ModuleBase::TITLE("ESolver_KS_LCAO", "othercalculation"); - ModuleBase::timer::tick("ESolver_KS_LCAO", "othercalculation"); + ModuleBase::TITLE("ESolver_KS_LCAO", "others"); + ModuleBase::timer::tick("ESolver_KS_LCAO", "others"); if (GlobalV::CALCULATION == "get_S") { this->get_S(); @@ -377,7 +394,7 @@ void ESolver_KS_LCAO::othercalculation(const int istep) else if (GlobalV::CALCULATION == "get_pchg") { IState_Charge ISC(this->psi, this->LOC); - ISC.begin(this->UHM.GG, + ISC.begin(this->GG, this->pelec, this->pw_rho, this->pw_big, @@ -399,27 +416,39 @@ void ESolver_KS_LCAO::othercalculation(const int istep) this->pw_wfc, this->pw_big, this->LOWF, - this->UHM.GG, + this->GG, INPUT.out_wfc_pw, this->wf.out_wfc_r, - this->kv); + this->kv, + GlobalV::nelec, + GlobalV::NBANDS_ISTATE, + GlobalV::NBANDS, + GlobalV::NSPIN, + GlobalV::NLOCAL, + GlobalV::global_out_dir); else IEP.begin(this->psi, this->pw_rho, this->pw_wfc, this->pw_big, this->LOWF, - this->UHM.GK, + this->GK, INPUT.out_wfc_pw, this->wf.out_wfc_r, - this->kv); + this->kv, + GlobalV::nelec, + GlobalV::NBANDS_ISTATE, + GlobalV::NBANDS, + GlobalV::NSPIN, + GlobalV::NLOCAL, + GlobalV::global_out_dir); } else { - ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::othercalculation", "CALCULATION type not supported"); + ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::others", "CALCULATION type not supported"); } - ModuleBase::timer::tick("ESolver_KS_LCAO", "othercalculation"); + ModuleBase::timer::tick("ESolver_KS_LCAO", "others"); return; } template <> diff --git a/source/module_esolver/esolver_ks_lcao_tddft.cpp b/source/module_esolver/esolver_ks_lcao_tddft.cpp index 48e9f6e28e..182242eb6a 100644 --- a/source/module_esolver/esolver_ks_lcao_tddft.cpp +++ b/source/module_esolver/esolver_ks_lcao_tddft.cpp @@ -38,6 +38,8 @@ ESolver_KS_LCAO_TDDFT::ESolver_KS_LCAO_TDDFT() classname = "ESolver_KS_LCAO_TDDFT"; basisname = "LCAO"; } + + ESolver_KS_LCAO_TDDFT::~ESolver_KS_LCAO_TDDFT() { // this->orb_con.clear_after_ions(GlobalC::UOT, GlobalC::ORB, GlobalV::deepks_setorb, GlobalC::ucell.infoNL.nproj); @@ -60,9 +62,9 @@ ESolver_KS_LCAO_TDDFT::~ESolver_KS_LCAO_TDDFT() } } -void ESolver_KS_LCAO_TDDFT::Init(Input& inp, UnitCell& ucell) +void ESolver_KS_LCAO_TDDFT::init(Input& inp, UnitCell& ucell) { - ESolver_KS::Init(inp, ucell); + ESolver_KS::init(inp, ucell); // Initialize the FFT. // this function belongs to cell LOOP @@ -77,8 +79,8 @@ void ESolver_KS_LCAO_TDDFT::Init(Input& inp, UnitCell& ucell) this->pelec = new elecstate::ElecStateLCAO_TDDFT(&(this->chr), &(kv), kv.nks, - &(this->LOC), - &(this->UHM), + &(this->LOC), + &(this->GK), // mohan add 2024-04-01 &(this->LOWF), this->pw_rho, pw_big); @@ -88,7 +90,7 @@ void ESolver_KS_LCAO_TDDFT::Init(Input& inp, UnitCell& ucell) // Init Basis should be put outside of Ensolver. // * reading the localized orbitals/projectors // * construct the interpolation tables. - this->Init_Basis_lcao(this->orb_con, inp, ucell); + this->init_basis_lcao(this->orb_con, inp, ucell); //------------------init Basis_lcao---------------------- //------------------init Hamilt_lcao---------------------- @@ -124,10 +126,14 @@ void ESolver_KS_LCAO_TDDFT::Init(Input& inp, UnitCell& ucell) &(sf), &(pelec->f_en.etxc), &(pelec->f_en.vtxc)); + this->pelec_td = dynamic_cast(this->pelec); } -void ESolver_KS_LCAO_TDDFT::hamilt2density(int istep, int iter, double ethr) +void ESolver_KS_LCAO_TDDFT::hamilt2density( + int istep, + int iter, + double ethr) { pelec->charge->save_rho_before_sum_band(); @@ -178,8 +184,12 @@ void ESolver_KS_LCAO_TDDFT::hamilt2density(int istep, int iter, double ethr) this->pelec->f_en.demet = 0.0; if (this->psi != nullptr) { - this->phsol->solve(this->p_hamilt, this->psi[0], this->pelec_td, GlobalV::KS_SOLVER); - } + this->phsol->solve( + this->p_hamilt, + this->psi[0], + this->pelec_td, + GlobalV::KS_SOLVER); + } } else { @@ -201,8 +211,13 @@ void ESolver_KS_LCAO_TDDFT::hamilt2density(int istep, int iter, double ethr) for (int ib = 0; ib < GlobalV::NBANDS; ib++) { std::setprecision(6); - GlobalV::ofs_running << ik + 1 << " " << ib + 1 << " " << this->pelec_td->wg(ik, ib) << std::endl; - } + GlobalV::ofs_running << ik + 1 + << " " + << ib + 1 + << " " + << this->pelec_td->wg(ik, ib) + << std::endl; + } } GlobalV::ofs_running << std::endl; GlobalV::ofs_running @@ -224,8 +239,12 @@ void ESolver_KS_LCAO_TDDFT::hamilt2density(int istep, int iter, double ethr) Symmetry_rho srho; for (int is = 0; is < GlobalV::NSPIN; is++) { - srho.begin(is, *(pelec->charge), pw_rho, GlobalC::Pgrid, GlobalC::ucell.symm); - } + srho.begin(is, + *(pelec->charge), + pw_rho, + GlobalC::Pgrid, + GlobalC::ucell.symm); + } } // (6) compute magnetization, only for spin==2 @@ -238,14 +257,14 @@ void ESolver_KS_LCAO_TDDFT::hamilt2density(int istep, int iter, double ethr) this->pelec->f_en.deband = this->pelec->cal_delta_eband(); } -void ESolver_KS_LCAO_TDDFT::updatepot(const int istep, const int iter) +void ESolver_KS_LCAO_TDDFT::update_pot(const int istep, const int iter) { // print Hamiltonian and Overlap matrix if (this->conv_elec) { if (!GlobalV::GAMMA_ONLY_LOCAL) { - this->UHM.GK.renew(true); + this->GK.renew(true); } for (int ik = 0; ik < kv.nks; ++ik) { @@ -261,12 +280,29 @@ void ESolver_KS_LCAO_TDDFT::updatepot(const int istep, const int iter) this->p_hamilt->matrix(h_mat, s_mat); if (hsolver::HSolverLCAO>::out_mat_hs[0]) { - ModuleIO::save_mat(istep, h_mat.p, GlobalV::NLOCAL, bit, - hsolver::HSolverLCAO>::out_mat_hs[1], - 1, GlobalV::out_app_flag, "H", "data-" + std::to_string(ik), *this->LOWF.ParaV, GlobalV::DRANK); - ModuleIO::save_mat(istep, h_mat.p, GlobalV::NLOCAL, bit, - hsolver::HSolverLCAO>::out_mat_hs[1], - 1, GlobalV::out_app_flag, "S", "data-" + std::to_string(ik), *this->LOWF.ParaV, GlobalV::DRANK); + ModuleIO::save_mat(istep, + h_mat.p, + GlobalV::NLOCAL, + bit, + hsolver::HSolverLCAO>::out_mat_hs[1], + 1, + GlobalV::out_app_flag, + "H", + "data-" + std::to_string(ik), + *this->LOWF.ParaV, + GlobalV::DRANK); + + ModuleIO::save_mat(istep, + h_mat.p, + GlobalV::NLOCAL, + bit, + hsolver::HSolverLCAO>::out_mat_hs[1], + 1, + GlobalV::out_app_flag, + "S", + "data-" + std::to_string(ik), + *this->LOWF.ParaV, + GlobalV::DRANK); } } } @@ -293,9 +329,11 @@ void ESolver_KS_LCAO_TDDFT::updatepot(const int istep, const int iter) // Calculate new potential according to new Charge Density if (!this->conv_elec) { - if (GlobalV::NSPIN == 4) - GlobalC::ucell.cal_ux(); - this->pelec->pot->update_from_charge(this->pelec->charge, &GlobalC::ucell); + if (GlobalV::NSPIN == 4) + { + GlobalC::ucell.cal_ux(); + } + this->pelec->pot->update_from_charge(this->pelec->charge, &GlobalC::ucell); this->pelec->f_en.descf = this->pelec->cal_delta_escf(); } else @@ -306,17 +344,19 @@ void ESolver_KS_LCAO_TDDFT::updatepot(const int istep, const int iter) // store wfc and Hk laststep if (istep >= (wf.init_wfc == "file" ? 0 : 1) && this->conv_elec) { - if (this->psi_laststep == nullptr) + if (this->psi_laststep == nullptr) + { #ifdef __MPI - this->psi_laststep = new psi::Psi>(kv.nks, - this->LOWF.ParaV->ncol_bands, - this->LOWF.ParaV->nrow, - nullptr); + this->psi_laststep = new psi::Psi>(kv.nks, + this->LOWF.ParaV->ncol_bands, + this->LOWF.ParaV->nrow, + nullptr); #else - this->psi_laststep = new psi::Psi>(kv.nks, GlobalV::NBANDS, GlobalV::NLOCAL, nullptr); + this->psi_laststep = new psi::Psi>(kv.nks, GlobalV::NBANDS, GlobalV::NLOCAL, nullptr); #endif + } - if (td_htype == 1) + if (td_htype == 1) { if (this->Hk_laststep == nullptr) { @@ -343,8 +383,10 @@ void ESolver_KS_LCAO_TDDFT::updatepot(const int istep, const int iter) this->psi->fix_k(ik); this->psi_laststep->fix_k(ik); int size0 = psi->get_nbands() * psi->get_nbasis(); - for (int index = 0; index < size0; ++index) - psi_laststep[0].get_pointer()[index] = psi[0].get_pointer()[index]; + for (int index = 0; index < size0; ++index) + { + psi_laststep[0].get_pointer()[index] = psi[0].get_pointer()[index]; + } // store Hamiltonian if (td_htype == 1) @@ -358,8 +400,9 @@ void ESolver_KS_LCAO_TDDFT::updatepot(const int istep, const int iter) } // calculate energy density matrix for tddft - if (istep >= (wf.init_wfc == "file" ? 0 : 2) && module_tddft::Evolve_elec::td_edm == 0) - { + if (istep >= (wf.init_wfc == "file" ? 0 : 2) + && module_tddft::Evolve_elec::td_edm == 0) + { this->cal_edm_tddft(); } } @@ -374,6 +417,7 @@ void ESolver_KS_LCAO_TDDFT::updatepot(const int istep, const int iter) GlobalV::ofs_running << "ik iband Eii (eV)" << std::endl; GlobalV::ofs_running << std::setprecision(6); GlobalV::ofs_running << std::setiosflags(std::ios::showpoint); + for (int ik = 0; ik < kv.nks; ik++) { for (int ib = 0; ib < GlobalV::NBANDS; ib++) @@ -389,7 +433,8 @@ void ESolver_KS_LCAO_TDDFT::updatepot(const int istep, const int iter) } } -void ESolver_KS_LCAO_TDDFT::afterscf(const int istep) + +void ESolver_KS_LCAO_TDDFT::after_scf(const int istep) { for (int is = 0; is < GlobalV::NSPIN; is++) { @@ -402,7 +447,8 @@ void ESolver_KS_LCAO_TDDFT::afterscf(const int istep) } if(module_tddft::Evolve_elec::out_current == 1) { - elecstate::DensityMatrix, double>* tmp_DM = dynamic_cast>*>(this->pelec)->get_DM(); + elecstate::DensityMatrix, double>* tmp_DM = + dynamic_cast>*>(this->pelec)->get_DM(); ModuleIO::write_current(istep, this->psi, pelec, @@ -411,52 +457,74 @@ void ESolver_KS_LCAO_TDDFT::afterscf(const int istep) this->RA, this->UHM); } - ESolver_KS_LCAO, double>::afterscf(istep); + ESolver_KS_LCAO, double>::after_scf(istep); } + // use the original formula (Hamiltonian matrix) to calculate energy density matrix -void ESolver_KS_LCAO_TDDFT::cal_edm_tddft() +void ESolver_KS_LCAO_TDDFT::cal_edm_tddft(void) { + // mohan add 2024-03-27 + const int nlocal = GlobalV::NLOCAL; + assert(nlocal>=0); + //this->LOC.edm_k_tddft.resize(kv.nks); dynamic_cast>*>(this->pelec)->get_DM()->EDMK.resize(kv.nks); for (int ik = 0; ik < kv.nks; ++ik) { - std::complex* tmp_dmk = dynamic_cast>*>(this->pelec)->get_DM()->get_DMK_pointer(ik); - ModuleBase::ComplexMatrix& tmp_edmk = dynamic_cast>*>(this->pelec)->get_DM()->EDMK[ik]; - const Parallel_Orbitals* tmp_pv = dynamic_cast>*>(this->pelec)->get_DM()->get_paraV_pointer(); + std::complex* tmp_dmk = + dynamic_cast>*>(this->pelec)->get_DM()->get_DMK_pointer(ik); + + ModuleBase::ComplexMatrix& tmp_edmk = + dynamic_cast>*>(this->pelec)->get_DM()->EDMK[ik]; + + const Parallel_Orbitals* tmp_pv = + dynamic_cast>*>(this->pelec)->get_DM()->get_paraV_pointer(); + #ifdef __MPI + + // mohan add 2024-03-27 + //! be careful, the type of nloc is 'long' + //! whether the long type is safe, needs more discussion + const long nloc = this->LOC.ParaV->nloc; + //this->LOC.edm_k_tddft[ik].create(this->LOC.ParaV->ncol, this->LOC.ParaV->nrow); tmp_edmk.create(this->LOC.ParaV->ncol, this->LOC.ParaV->nrow); - complex* Htmp = new complex[this->LOC.ParaV->nloc]; - complex* Sinv = new complex[this->LOC.ParaV->nloc]; - complex* tmp1 = new complex[this->LOC.ParaV->nloc]; - complex* tmp2 = new complex[this->LOC.ParaV->nloc]; - complex* tmp3 = new complex[this->LOC.ParaV->nloc]; - complex* tmp4 = new complex[this->LOC.ParaV->nloc]; - ModuleBase::GlobalFunc::ZEROS(Htmp, this->LOC.ParaV->nloc); - ModuleBase::GlobalFunc::ZEROS(Sinv, this->LOC.ParaV->nloc); - ModuleBase::GlobalFunc::ZEROS(tmp1, this->LOC.ParaV->nloc); - ModuleBase::GlobalFunc::ZEROS(tmp2, this->LOC.ParaV->nloc); - ModuleBase::GlobalFunc::ZEROS(tmp3, this->LOC.ParaV->nloc); - ModuleBase::GlobalFunc::ZEROS(tmp4, this->LOC.ParaV->nloc); + complex* Htmp = new complex[nloc]; + complex* Sinv = new complex[nloc]; + complex* tmp1 = new complex[nloc]; + complex* tmp2 = new complex[nloc]; + complex* tmp3 = new complex[nloc]; + complex* tmp4 = new complex[nloc]; + + ModuleBase::GlobalFunc::ZEROS(Htmp, nloc); + ModuleBase::GlobalFunc::ZEROS(Sinv, nloc); + ModuleBase::GlobalFunc::ZEROS(tmp1, nloc); + ModuleBase::GlobalFunc::ZEROS(tmp2, nloc); + ModuleBase::GlobalFunc::ZEROS(tmp3, nloc); + ModuleBase::GlobalFunc::ZEROS(tmp4, nloc); + const int inc = 1; int nrow = this->LOC.ParaV->nrow; int ncol = this->LOC.ParaV->ncol; - hamilt::MatrixBlock> h_mat, s_mat; + + hamilt::MatrixBlock> h_mat; + hamilt::MatrixBlock> s_mat; + p_hamilt->matrix(h_mat, s_mat); - zcopy_(&this->LOC.ParaV->nloc, h_mat.p, &inc, Htmp, &inc); - zcopy_(&this->LOC.ParaV->nloc, s_mat.p, &inc, Sinv, &inc); + zcopy_(&nloc, h_mat.p, &inc, Htmp, &inc); + zcopy_(&nloc, s_mat.p, &inc, Sinv, &inc); - int* ipiv = new int[this->LOC.ParaV->nloc]; + int* ipiv = new int[nloc]; int info; const int one_int = 1; - pzgetrf_(&GlobalV::NLOCAL, &GlobalV::NLOCAL, Sinv, &one_int, &one_int, this->LOC.ParaV->desc, ipiv, &info); + pzgetrf_(&nlocal, &nlocal, Sinv, &one_int, &one_int, this->LOC.ParaV->desc, ipiv, &info); int LWORK = -1, liWORK = -1; std::vector> WORK(1, 0); std::vector iWORK(1, 0); - pzgetri_(&GlobalV::NLOCAL, + pzgetri_(&nlocal, Sinv, &one_int, &one_int, @@ -473,7 +541,7 @@ void ESolver_KS_LCAO_TDDFT::cal_edm_tddft() liWORK = iWORK[0]; iWORK.resize(liWORK, 0); - pzgetri_(&GlobalV::NLOCAL, + pzgetri_(&nlocal, Sinv, &one_int, &one_int, @@ -490,9 +558,9 @@ void ESolver_KS_LCAO_TDDFT::cal_edm_tddft() const complex half_float = {0.5, 0.0}; pzgemm_(&N_char, &N_char, - &GlobalV::NLOCAL, - &GlobalV::NLOCAL, - &GlobalV::NLOCAL, + &nlocal, + &nlocal, + &nlocal, &one_float, tmp_dmk, &one_int, @@ -510,9 +578,9 @@ void ESolver_KS_LCAO_TDDFT::cal_edm_tddft() pzgemm_(&N_char, &N_char, - &GlobalV::NLOCAL, - &GlobalV::NLOCAL, - &GlobalV::NLOCAL, + &nlocal, + &nlocal, + &nlocal, &one_float, tmp1, &one_int, @@ -530,9 +598,9 @@ void ESolver_KS_LCAO_TDDFT::cal_edm_tddft() pzgemm_(&N_char, &N_char, - &GlobalV::NLOCAL, - &GlobalV::NLOCAL, - &GlobalV::NLOCAL, + &nlocal, + &nlocal, + &nlocal, &one_float, Sinv, &one_int, @@ -550,9 +618,9 @@ void ESolver_KS_LCAO_TDDFT::cal_edm_tddft() pzgemm_(&N_char, &N_char, - &GlobalV::NLOCAL, - &GlobalV::NLOCAL, - &GlobalV::NLOCAL, + &nlocal, + &nlocal, + &nlocal, &one_float, tmp3, &one_int, @@ -569,8 +637,8 @@ void ESolver_KS_LCAO_TDDFT::cal_edm_tddft() this->LOC.ParaV->desc); pzgeadd_(&N_char, - &GlobalV::NLOCAL, - &GlobalV::NLOCAL, + &nlocal, + &nlocal, &half_float, tmp2, &one_int, @@ -581,8 +649,8 @@ void ESolver_KS_LCAO_TDDFT::cal_edm_tddft() &one_int, &one_int, this->LOC.ParaV->desc); - zcopy_(&this->LOC.ParaV->nloc, tmp4, &inc, tmp_edmk.c, &inc); - //zcopy_(&this->LOC.ParaV->nloc, tmp4, &inc, this->LOC.edm_k_tddft[ik].c, &inc); + zcopy_(&nloc, tmp4, &inc, tmp_edmk.c, &inc); + //zcopy_(&nloc, tmp4, &inc, this->LOC.edm_k_tddft[ik].c, &inc); delete[] Htmp; delete[] Sinv; delete[] tmp1; @@ -591,43 +659,48 @@ void ESolver_KS_LCAO_TDDFT::cal_edm_tddft() delete[] tmp4; delete[] ipiv; #else + // for serial version //this->LOC.edm_k_tddft[ik].create(this->LOC.ParaV->ncol, this->LOC.ParaV->nrow); tmp_edmk.create(this->LOC.ParaV->ncol, this->LOC.ParaV->nrow); - ModuleBase::ComplexMatrix Sinv(GlobalV::NLOCAL, GlobalV::NLOCAL); - ModuleBase::ComplexMatrix Htmp(GlobalV::NLOCAL, GlobalV::NLOCAL); - hamilt::MatrixBlock> h_mat, s_mat; + ModuleBase::ComplexMatrix Sinv(nlocal, nlocal); + ModuleBase::ComplexMatrix Htmp(nlocal, nlocal); + + hamilt::MatrixBlock> h_mat; + hamilt::MatrixBlock> s_mat; + p_hamilt->matrix(h_mat, s_mat); // cout<<"hmat "<* work = new std::complex[lwork]; + ModuleBase::GlobalFunc::ZEROS(work, lwork); - int LWORK = 3 * GlobalV::NLOCAL - 1; // tmp - std::complex* WORK = new std::complex[LWORK]; - ModuleBase::GlobalFunc::ZEROS(WORK, LWORK); - int IPIV[GlobalV::NLOCAL]; + int IPIV[nlocal]; - LapackConnector::zgetrf(GlobalV::NLOCAL, GlobalV::NLOCAL, Sinv, GlobalV::NLOCAL, IPIV, &INFO); - LapackConnector::zgetri(GlobalV::NLOCAL, Sinv, GlobalV::NLOCAL, IPIV, WORK, LWORK, &INFO); + LapackConnector::zgetrf(nlocal, nlocal, Sinv, nlocal, IPIV, &INFO); + LapackConnector::zgetri(nlocal, Sinv, nlocal, IPIV, work, lwork, &INFO); // I just use ModuleBase::ComplexMatrix temporarily, and will change it to complex* - ModuleBase::ComplexMatrix tmp_dmk_base(GlobalV::NLOCAL, GlobalV::NLOCAL); - for (int i = 0; i < GlobalV::NLOCAL; i++) + ModuleBase::ComplexMatrix tmp_dmk_base(nlocal, nlocal); + for (int i = 0; i < nlocal; i++) { - for (int j = 0; j < GlobalV::NLOCAL; j++) + for (int j = 0; j < nlocal; j++) { - tmp_dmk_base(i, j) = tmp_dmk[i * GlobalV::NLOCAL + j]; + tmp_dmk_base(i, j) = tmp_dmk[i * nlocal + j]; } } tmp_edmk = 0.5 * (Sinv * Htmp * tmp_dmk_base + tmp_dmk_base * Htmp * Sinv); - delete[] WORK; + delete[] work; #endif } return; } -} // namespace ModuleESolver \ No newline at end of file +} // namespace ModuleESolver diff --git a/source/module_esolver/esolver_ks_lcao_tddft.h b/source/module_esolver/esolver_ks_lcao_tddft.h index 090e804b54..8e1f4a2c89 100644 --- a/source/module_esolver/esolver_ks_lcao_tddft.h +++ b/source/module_esolver/esolver_ks_lcao_tddft.h @@ -14,24 +14,35 @@ namespace ModuleESolver { - class ESolver_KS_LCAO_TDDFT : public ESolver_KS_LCAO, double> +class ESolver_KS_LCAO_TDDFT : public ESolver_KS_LCAO, double> { public: + ESolver_KS_LCAO_TDDFT(); + ~ESolver_KS_LCAO_TDDFT(); - void Init(Input& inp, UnitCell& cell) override; + + void init(Input& inp, UnitCell& cell) override; psi::Psi>* psi_laststep = nullptr; + std::complex** Hk_laststep = nullptr; + std::complex** Sk_laststep = nullptr; + //same as pelec elecstate::ElecStateLCAO_TDDFT* pelec_td = nullptr; + int td_htype = 1; protected: + virtual void hamilt2density(const int istep, const int iter, const double ethr) override; - virtual void updatepot(const int istep, const int iter) override; - virtual void afterscf(const int istep) override; + + virtual void update_pot(const int istep, const int iter) override; + + virtual void after_scf(const int istep) override; + void cal_edm_tddft(); }; diff --git a/source/module_esolver/esolver_ks_pw.cpp b/source/module_esolver/esolver_ks_pw.cpp index c19e64b08e..8e1054f6b0 100644 --- a/source/module_esolver/esolver_ks_pw.cpp +++ b/source/module_esolver/esolver_ks_pw.cpp @@ -103,80 +103,125 @@ ESolver_KS_PW::~ESolver_KS_PW() { delete reinterpret_cast, Device>*>(this->__kspw_psi); } - if (this->psi_init != nullptr) - { - delete this->psi_init; - this->psi_init = nullptr; - } delete this->psi; } + + template void ESolver_KS_PW::Init_GlobalC(Input& inp, UnitCell& cell) { + // GlobalC is a historically left-over namespace, it is used to store global classes, + // including: + // pseudopot_cell_vnl: pseudopotential in cell, V non-local + // UnitCell: cell information with atomic properties + // Grid_Driver: + // Parallel_Grid: + // Parallel_Kpoints: + // Restart: + // Exx_Info: + // Exx_Lip: + + // GlobalC would be refactored out in the future. If there is better idea about how + // to organize information stored in classes above, please feel free to discuss with + // issue or pull request. + if (this->psi != nullptr) + { delete this->psi; - //====================================================== + } + // allocate memory for std::complex datatype psi - //====================================================== - /* - New psi initializer in ABACUS, Developer's note: - Because the calling relationship between ESolver_KS_PW and derived class is - complicated, up to upcoming of ABACUS 3.4, we only implement this new psi - initialization method for ksdft_pw, which means the routinely used dft theory. - For other theories like stochastic DFT, we still use the old method, in future - release we will implement the new method for all theories. - */ + // New psi initializer in ABACUS, Developer's note: + // Because the calling relationship between ESolver_KS_PW and derived class is + // complicated, up to upcoming of ABACUS 3.4, we only implement this new psi + // initialization method for ksdft_pw, which means the routinely used dft theory. + // For other theories like stochastic DFT, we still use the old method. + + // LCAOINPW also temporarily uses ESolver_KS_PW workflow, but in principle, it + // should have its own ESolver. ESolver class is for controlling workflow for each + // theory-basis combination, in the future it is also possible to seperate/decouple + // the basis (representation) with operator (hamiltonian) and solver (diagonalization). + // This feature requires feasible Linear Algebra library in-built in ABACUS, which + // is not ready yet. if (GlobalV::psi_initializer) // new method { + // psi_initializer drag initialization of pw wavefunction out of HSolver, make psi + // initialization decoupled with HSolver (diagonalization) procedure. + // However, due to EXX is hard to maintain, we still use the old method for EXX. + // LCAOINPW in version >= 3.5.0 uses this new method. this->psi = this->psi_init->allocate(); } else // old method { + // old method explicitly requires variables such as total number of kpoints, number + // of bands, number of G-vectors, and so on. Comparatively in new method, these + // variables are imported in function called initialize. this->psi = this->wf.allocate(this->kv.nkstot, this->kv.nks, this->kv.ngk.data(), this->pw_wfc->npwk_max); } - //======================= - // init pseudopotential - //======================= + // --------------------------------------------------------------------------------- + + //! init pseudopotential GlobalC::ppcell.init(GlobalC::ucell.ntype, &this->sf, this->pw_wfc); - //================================= - // initalize local pseudopotential - //================================= + //! initalize local pseudopotential GlobalC::ppcell.init_vloc(GlobalC::ppcell.vloc, this->pw_rhod); ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "LOCAL POTENTIAL"); - //====================================== - // Initalize non local pseudopotential - //====================================== + //! Initalize non-local pseudopotential GlobalC::ppcell.init_vnl(GlobalC::ucell, this->pw_rhod); ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "NON-LOCAL POTENTIAL"); + // --------------------------------------------------------------------------------- + // there is a strange bug that the following procedure must be placed here, otherwise + // the value of psi will finally (before diagonalization) be all-zero, still dont know + // why. if (!GlobalV::psi_initializer) { - //================================================== - // create GlobalC::ppcell.tab_at , for trial wave functions. - //================================================== + // however, init_at_1 does not actually initialize the psi, instead, it is a + // function to calculate a interpolate table saving overlap intergral or say + // Spherical Bessel Transform of atomic orbitals. this->wf.init_at_1(&this->sf); - //================================ - // Initial start wave functions - //================================ + // similarly, wfcinit not really initialize any wavefunction, instead, it initialize + // the mapping from ixy, the 1d flattened index of point on fft grid (x, y) plane, + // to the index of "stick", composed of grid points. this->wf.wfcinit(this->psi, this->pw_wfc); } + // --------------------------------------------------------------------------------- - this->kspw_psi = GlobalV::device_flag == "gpu" || GlobalV::precision_flag == "single" + + this->kspw_psi = GlobalV::device_flag == "gpu" + || GlobalV::precision_flag == "single" ? new psi::Psi(this->psi[0]) : reinterpret_cast*>(this->psi); + + // I would like to change the above sentence to the following, + // but I am not sure what the code is doing, so I leave it as a comment + // mohan by 2024-03-27 +/* + if (GlobalV::device_flag == "gpu" || GlobalV::precision_flag == "single") + { + // psi[0] means gamma_only? + this->kspw_psi = new psi::Psi(this->psi[0]); + } + else + { + this->kspw_psi = reinterpret_cast*>(this->psi); + } +*/ + if (GlobalV::precision_flag == "single") { ModuleBase::Memory::record("Psi_single", sizeof(T) * this->psi[0].size()); } + ModuleBase::GlobalFunc::DONE(GlobalV::ofs_running, "INIT BASIS"); } + template -void ESolver_KS_PW::Init(Input& inp, UnitCell& ucell) +void ESolver_KS_PW::init(Input& inp, UnitCell& ucell) { - ESolver_KS::Init(inp, ucell); + ESolver_KS::init(inp, ucell); // init HSolver if (this->phsol == nullptr) @@ -197,8 +242,10 @@ void ESolver_KS_PW::Init(Input& inp, UnitCell& ucell) this->pw_big); } - // Inititlize the charge density. + //! Inititlize the charge density. this->pelec->charge->allocate(GlobalV::NSPIN); + + //! set the cell volume variable in pelec this->pelec->omega = GlobalC::ucell.omega; // Initialize the potential. @@ -214,6 +261,10 @@ void ESolver_KS_PW::Init(Input& inp, UnitCell& ucell) } if (GlobalV::psi_initializer) { + // update 20240320 + // use std::unique_ptr to manage the lifetime of psi_initializer under + // restriction of C++11. Based on refactor of psi_initializer, the number + // of member functions decrease significantly. this->allocate_psi_init(); } // temporary @@ -225,6 +276,7 @@ void ESolver_KS_PW::Init(Input& inp, UnitCell& ucell) } } + template void ESolver_KS_PW::init_after_vc(Input& inp, UnitCell& ucell) { @@ -235,16 +287,34 @@ void ESolver_KS_PW::init_after_vc(Input& inp, UnitCell& ucell) if (GlobalV::md_prec_level == 2) { - this->pw_wfc->initgrids(ucell.lat0, ucell.latvec, this->pw_rho->nx, this->pw_rho->ny, this->pw_rho->nz); - this->pw_wfc->initparameters(false, inp.ecutwfc, this->kv.nks, this->kv.kvec_d.data()); + this->pw_wfc->initgrids( + ucell.lat0, + ucell.latvec, + this->pw_rho->nx, + this->pw_rho->ny, + this->pw_rho->nz); + + this->pw_wfc->initparameters( + false, + inp.ecutwfc, + this->kv.nks, + this->kv.kvec_d.data()); + #ifdef __MPI - if (INPUT.pw_seed > 0) - MPI_Allreduce(MPI_IN_PLACE, &this->pw_wfc->ggecut, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); - // qianrui add 2021-8-13 to make different kpar parameters can get the same results + if (INPUT.pw_seed > 0) + { + MPI_Allreduce(MPI_IN_PLACE, &this->pw_wfc->ggecut, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); + } + // qianrui add 2021-8-13 to make different kpar parameters can get the same results #endif + this->pw_wfc->setuptransform(); + for (int ik = 0; ik < this->kv.nks; ++ik) + { this->kv.ngk[ik] = this->pw_wfc->npwk[ik]; + } + this->pw_wfc->collect_local_pw(inp.erf_ecut, inp.erf_height, inp.erf_sigma); delete this->phsol; @@ -261,9 +331,12 @@ void ESolver_KS_PW::init_after_vc(Input& inp, UnitCell& ucell) this->pw_big); this->pelec->charge->allocate(GlobalV::NSPIN); + + //! setup cell volume this->pelec->omega = GlobalC::ucell.omega; delete this->pelec->pot; + this->pelec->pot = new elecstate::Potential(this->pw_rhod, this->pw_rho, &GlobalC::ucell, @@ -285,21 +358,24 @@ void ESolver_KS_PW::init_after_vc(Input& inp, UnitCell& ucell) this->pw_wfc->nx, this->pw_wfc->ny, this->pw_wfc->nz); + this->pw_wfc->initparameters(false, INPUT.ecutwfc, this->kv.nks, this->kv.kvec_d.data()); + this->pw_wfc->collect_local_pw(inp.erf_ecut, inp.erf_height, inp.erf_sigma); - if(GlobalV::psi_initializer) + + if(GlobalV::psi_initializer) // new initialization method, used in KSDFT and LCAO_IN_PW calculation { - if(GlobalV::init_wfc.substr(0, 3) == "nao") - { - this->psi_init->cal_ovlp_flzjlq(); // for nao, we recalculate the overlap matrix between flz and jlq - } - else if(GlobalV::init_wfc.substr(0, 6) == "atomic") - { - this->psi_init->cal_ovlp_pswfcjlq(); // for atomic, we recalculate the overlap matrix between pswfc and jlq - } + // re-tabulate because GlobalV::DQ may change due to the change of atomic positions and cell parameters + // for nao, we recalculate the overlap matrix between flz and jlq + // for atomic, we recalculate the overlap matrix between pswfc and jlq // for psig is not read-only, its value will be overwritten in initialize_psi(), dont need delete and reallocate - } - else + if((GlobalV::init_wfc.substr(0, 3) == "nao") + ||(GlobalV::init_wfc.substr(0, 6) == "atomic")) + { + this->psi_init->tabulate(); + } + } + else // old initialization method, used in EXX calculation { this->wf.init_after_vc(this->kv.nks); // reallocate wanf2, the planewave expansion of lcao this->wf.init_at_1(&this->sf); // re-calculate tab_at, the overlap matrix between atomic pswfc and jlq @@ -315,7 +391,10 @@ void ESolver_KS_PW::init_after_vc(Input& inp, UnitCell& ucell) this->pw_wfc->startz,this->pw_wfc->numz); #ifdef __MPI - if(GlobalV::RANK_IN_POOL == 0) GlobalC::paw_cell.prepare_paw(); + if(GlobalV::RANK_IN_POOL == 0) + { + GlobalC::paw_cell.prepare_paw(); + } #else GlobalC::paw_cell.prepare_paw(); #endif @@ -331,7 +410,11 @@ void ESolver_KS_PW::init_after_vc(Input& inp, UnitCell& ucell) for(int iat = 0; iat < GlobalC::ucell.nat; iat ++) { - GlobalC::paw_cell.set_rhoij(iat,nrhoijsel[iat],rhoijselect[iat].size(),rhoijselect[iat].data(),rhoijp[iat].data()); + GlobalC::paw_cell.set_rhoij(iat, + nrhoijsel[iat], + rhoijselect[iat].size(), + rhoijselect[iat].data(), + rhoijp[iat].data()); } } #else @@ -339,8 +422,12 @@ void ESolver_KS_PW::init_after_vc(Input& inp, UnitCell& ucell) for(int iat = 0; iat < GlobalC::ucell.nat; iat ++) { - GlobalC::paw_cell.set_rhoij(iat,nrhoijsel[iat],rhoijselect[iat].size(),rhoijselect[iat].data(),rhoijp[iat].data()); - } + GlobalC::paw_cell.set_rhoij(iat, + nrhoijsel[iat], + rhoijselect[iat].size(), + rhoijselect[iat].data(), + rhoijp[iat].data()); + } #endif } #endif @@ -348,10 +435,11 @@ void ESolver_KS_PW::init_after_vc(Input& inp, UnitCell& ucell) ModuleBase::timer::tick("ESolver_KS_PW", "init_after_vc"); } + template -void ESolver_KS_PW::beforescf(int istep) +void ESolver_KS_PW::before_scf(int istep) { - ModuleBase::TITLE("ESolver_KS_PW", "beforescf"); + ModuleBase::TITLE("ESolver_KS_PW", "before_scf"); if (GlobalC::ucell.cell_parameter_updated) { @@ -377,10 +465,14 @@ void ESolver_KS_PW::beforescf(int istep) delete reinterpret_cast*>(this->p_hamilt); this->p_hamilt = nullptr; } + // allocate HamiltPW if (this->p_hamilt == nullptr) { - this->p_hamilt = new hamilt::HamiltPW(this->pelec->pot, this->pw_wfc, &this->kv); + this->p_hamilt = new hamilt::HamiltPW( + this->pelec->pot, + this->pw_wfc, + &this->kv); } //---------------------------------------------------------- @@ -395,64 +487,64 @@ void ESolver_KS_PW::beforescf(int istep) // calculate ewald energy if (!GlobalV::test_skip_ewald) { - this->pelec->f_en.ewald_energy = H_Ewald_pw::compute_ewald(GlobalC::ucell, this->pw_rhod, this->sf.strucFac); - } + this->pelec->f_en.ewald_energy = H_Ewald_pw::compute_ewald( + GlobalC::ucell, + this->pw_rhod, + this->sf.strucFac); + } - //========================================================= - // cal_ux should be called before init_scf because - // the direction of ux is used in noncoline_rho - //========================================================= - if(GlobalV::NSPIN == 4 && GlobalV::DOMAG) GlobalC::ucell.cal_ux(); + //! cal_ux should be called before init_scf because + //! the direction of ux is used in noncoline_rho + if(GlobalV::NSPIN == 4 && GlobalV::DOMAG) + { + GlobalC::ucell.cal_ux(); + } - //========================================================= - // calculate the total local pseudopotential in real space - //========================================================= + //! calculate the total local pseudopotential in real space this->pelec->init_scf(istep, this->sf.strucFac); - // Symmetry_rho should behind init_scf, because charge should be initialized first. - // liuyu comment: Symmetry_rho should be located between init_rho and v_of_rho? + + //! Symmetry_rho should behind init_scf, because charge should be initialized first. + //! liuyu comment: Symmetry_rho should be located between init_rho and v_of_rho? Symmetry_rho srho; for (int is = 0; is < GlobalV::NSPIN; is++) { - srho.begin(is, *(this->pelec->charge), this->pw_rhod, GlobalC::Pgrid, GlobalC::ucell.symm); - } - + srho.begin(is, + *(this->pelec->charge), + this->pw_rhod, + GlobalC::Pgrid, + GlobalC::ucell.symm); + } // liuyu move here 2023-10-09 // D in uspp need vloc, thus behind init_scf() // calculate the effective coefficient matrix for non-local pseudopotential projectors ModuleBase::matrix veff = this->pelec->pot->get_effective_v(); + GlobalC::ppcell.cal_effective_D(veff, this->pw_rhod, GlobalC::ucell); - /* - after init_rho (in pelec->init_scf), we have rho now. - before hamilt2density, we update Hk and initialize psi - */ + // after init_rho (in pelec->init_scf), we have rho now. + // before hamilt2density, we update Hk and initialize psi if(GlobalV::psi_initializer) { - /* - beforescf function will be called everytime before scf. However, once atomic coordinates changed, - structure factor will change, therefore all atomwise properties will change. So we need to reinitialize - psi every time before scf. But for random wavefunction, we dont, because random wavefunction is not - related to atomic coordinates. - - What the old strategy does is only to initialize for once... - */ - if(GlobalV::init_wfc == "random") - { - if(istep == 0) this->initialize_psi(); - } - else - { - this->initialize_psi(); - } + // before_scf function will be called everytime before scf. However, once atomic coordinates changed, + // structure factor will change, therefore all atomwise properties will change. So we need to reinitialize + // psi every time before scf. But for random wavefunction, we dont, because random wavefunction is not + // related to atomic coordinates. + // What the old strategy does is only to initialize for once... + if(((GlobalV::init_wfc == "random")&&(istep == 0)) + ||(GlobalV::init_wfc != "random")) + { + this->initialize_psi(); + } } } + template -void ESolver_KS_PW::othercalculation(const int istep) +void ESolver_KS_PW::others(const int istep) { - ModuleBase::TITLE("ESolver_KS_PW", "othercalculation"); - ModuleBase::timer::tick("ESolver_KS_PW", "othercalculation"); + ModuleBase::TITLE("ESolver_KS_PW", "others"); + ModuleBase::timer::tick("ESolver_KS_PW", "others"); if (GlobalV::CALCULATION == "test_memory") { Cal_Test::test_memory(this->pw_rho, @@ -482,20 +574,20 @@ void ESolver_KS_PW::othercalculation(const int istep) } else { - ModuleBase::WARNING_QUIT("ESolver_KS_LCAO::othercalculation", "CALCULATION type not supported"); + ModuleBase::WARNING_QUIT("ESolver_KS_PW::others", "CALCULATION type not supported"); } - ModuleBase::timer::tick("ESolver_KS_PW", "othercalculation"); + ModuleBase::timer::tick("ESolver_KS_PW", "others"); return; } template -void ESolver_KS_PW::eachiterinit(const int istep, const int iter) +void ESolver_KS_PW::iter_init(const int istep, const int iter) { if (iter == 1) { this->p_chgmix->init_mixing(); - this->p_chgmix->mixing_restart = GlobalV::SCF_NMAX; + this->p_chgmix->mixing_restart = GlobalV::SCF_NMAX + 1; } // for mixing restart if (iter == this->p_chgmix->mixing_restart && GlobalV::MIXING_RESTART > 0.0) @@ -514,144 +606,145 @@ void ESolver_KS_PW::eachiterinit(const int istep, const int iter) } } + template void ESolver_KS_PW::allocate_psi_init() { + // under restriction of C++11, std::unique_ptr can not be allocate via std::make_unique + // use new instead, but will cause asymmetric allocation and deallocation, in literal aspect ModuleBase::timer::tick("ESolver_KS_PW", "allocate_psi_init"); - if(this->psi_init != nullptr) - { - delete this->psi_init; - this->psi_init = nullptr; - } - if((GlobalV::init_wfc.substr(0, 6) == "atomic")&&(GlobalC::ucell.natomwfc == 0)) - { - GlobalV::init_wfc = "random"; - std::cout << " WARNING: atomic pseudowavefunction is required but there is NOT ANY, set to random automatically." << std::endl; - #ifdef __MPI - this->psi_init = new psi_initializer_random(&(this->sf), this->pw_wfc, &(GlobalC::ucell), &(GlobalC::Pkpoints), INPUT.pw_seed); - #else - this->psi_init = new psi_initializer_random(&(this->sf), this->pw_wfc, &(GlobalC::ucell), INPUT.pw_seed); - #endif - this->psi_init->initialize_only_once(); - } - else - { - if(GlobalV::init_wfc == "atomic") - { - #ifdef __MPI - this->psi_init = new psi_initializer_atomic(&(this->sf), this->pw_wfc, &(GlobalC::ucell), &(GlobalC::Pkpoints), INPUT.pw_seed); - #else - this->psi_init = new psi_initializer_atomic(&(this->sf), this->pw_wfc, &(GlobalC::ucell), INPUT.pw_seed); - #endif - this->psi_init->initialize_only_once(&(GlobalC::ppcell)); - this->psi_init->cal_ovlp_pswfcjlq(); - } - else if(GlobalV::init_wfc == "random") - { - #ifdef __MPI - this->psi_init = new psi_initializer_random(&(this->sf), this->pw_wfc, &(GlobalC::ucell), &(GlobalC::Pkpoints), INPUT.pw_seed); - #else - this->psi_init = new psi_initializer_random(&(this->sf), this->pw_wfc, &(GlobalC::ucell), INPUT.pw_seed); - #endif - this->psi_init->initialize_only_once(); - } - else if(GlobalV::init_wfc == "nao") - { - /* - if(GlobalV::NSPIN == 4) - { - ModuleBase::WARNING_QUIT("ESolver_KS_PW::allocate_psi_init", "for nao, soc this not safely implemented yet. To use it now, comment out this line."); - } - */ - #ifdef __MPI - this->psi_init = new psi_initializer_nao(&(this->sf), this->pw_wfc, &(GlobalC::ucell), &(GlobalC::Pkpoints), INPUT.pw_seed); - #else - this->psi_init = new psi_initializer_nao(&(this->sf), this->pw_wfc, &(GlobalC::ucell), INPUT.pw_seed); - #endif - this->psi_init->set_orbital_files(GlobalC::ucell.orbital_fn); - this->psi_init->initialize_only_once(); - this->psi_init->cal_ovlp_flzjlq(); - } - else if(GlobalV::init_wfc == "atomic+random") - { - #ifdef __MPI - this->psi_init = new psi_initializer_atomic_random(&(this->sf), this->pw_wfc, &(GlobalC::ucell), &(GlobalC::Pkpoints), INPUT.pw_seed); - #else - this->psi_init = new psi_initializer_atomic_random(&(this->sf), this->pw_wfc, &(GlobalC::ucell), INPUT.pw_seed); - #endif - this->psi_init->initialize_only_once(&(GlobalC::ppcell)); - this->psi_init->cal_ovlp_pswfcjlq(); - } - else if(GlobalV::init_wfc == "nao+random") - { - /* - if(GlobalV::NSPIN == 4) - { - ModuleBase::WARNING_QUIT("ESolver_KS_PW::allocate_psi_init", "for nao, soc this not safely implemented yet. To use it now, comment out this line."); - } - */ - #ifdef __MPI - this->psi_init = new psi_initializer_nao_random(&(this->sf), this->pw_wfc, &(GlobalC::ucell), &(GlobalC::Pkpoints), INPUT.pw_seed); - #else - this->psi_init = new psi_initializer_nao_random(&(this->sf), this->pw_wfc, &(GlobalC::ucell), INPUT.pw_seed); - #endif - this->psi_init->set_orbital_files(GlobalC::ucell.orbital_fn); - this->psi_init->initialize_only_once(); - this->psi_init->cal_ovlp_flzjlq(); - } - else ModuleBase::WARNING_QUIT("ESolver_KS_PW::allocate_psi_init", "for new psi initializer, init_wfc type not supported"); - } + if((GlobalV::init_wfc.substr(0, 6) == "atomic")&&(GlobalC::ucell.natomwfc == 0)) + { + this->psi_init = std::unique_ptr>( + new psi_initializer_random()); + } + else if(GlobalV::init_wfc == "atomic") + { + this->psi_init = std::unique_ptr>( + new psi_initializer_atomic()); + } + else if(GlobalV::init_wfc == "random") + { + this->psi_init = std::unique_ptr>( + new psi_initializer_random()); + } + else if(GlobalV::init_wfc == "nao") + { + this->psi_init = std::unique_ptr>( + new psi_initializer_nao()); + } + else if(GlobalV::init_wfc == "atomic+random") + { + this->psi_init = std::unique_ptr>( + new psi_initializer_atomic_random()); + } + else if(GlobalV::init_wfc == "nao+random") + { + this->psi_init = std::unique_ptr>( + new psi_initializer_nao_random()); + } + else + { + ModuleBase::WARNING_QUIT("ESolver_KS_PW::allocate_psi_init", + "for new psi initializer, init_wfc type not supported"); + } + + //! function polymorphism is moved from constructor to function initialize. + //! Two slightly different implementation are for MPI and serial case, respectively. +#ifdef __MPI + this->psi_init->initialize( + &this->sf, + this->pw_wfc, + &GlobalC::ucell, + &GlobalC::Pkpoints, + 1, + &GlobalC::ppcell, + GlobalV::MY_RANK); +#else + this->psi_init->initialize( + &this->sf, + this->pw_wfc, + &GlobalC::ucell, + 1, + &GlobalC::ppcell); +#endif + + // always new->initialize->tabulate->allocate->proj_ao_onkG + this->psi_init->tabulate(); ModuleBase::timer::tick("ESolver_KS_PW", "allocate_psi_init"); + } -/* - Although ESolver_KS_PW supports template, but in this function it has no relationship with - heterogeneous calculation, so all templates function are specialized to double -*/ + + + +//! Although ESolver_KS_PW supports template, but in this function it has no relationship with +//! heterogeneous calculation, so all templates function are specialized to double template -void ESolver_KS_PW::initialize_psi() +void ESolver_KS_PW::initialize_psi(void) { ModuleBase::timer::tick("ESolver_KS_PW", "initialize_psi"); if (GlobalV::psi_initializer) { for (int ik = 0; ik < this->pw_wfc->nks; ik++) { + //! Fix the wavefunction to initialize at given kpoint this->psi->fix_k(ik); + + //! Update Hamiltonian from other kpoint to the given one this->p_hamilt->updateHk(ik); - psi::Psi* psig = this->psi_init->cal_psig(ik); - std::vector etatom(psig->get_nbands(), 0.0); - /* - if ((this->psi_init->get_method().substr(0, 3) == "nao")) - { - // there is undefined behavior! the old code is not tested and not reliable: wavefunc.cpp - hsolver::DiagoIterAssist>::diagH_subspace( - phamilt_cg, - *(psig), *(psig), etatom.data() - ); - } - */ + + //! Project atomic orbitals on |k+G> planewave basis, where k is wavevector of kpoint + //! and G is wavevector of the peroiodic part of the Bloch function + this->psi_init->proj_ao_onkG(ik); + + //! psi_initializer manages memory of psig with shared pointer, + //! its access to use is shared here via weak pointer + //! therefore once the psi_initializer is destructed, psig will be destructed, too + //! this way, we can avoid memory leak and undefined behavior + std::weak_ptr> psig = this->psi_init->share_psig(); + + if(psig.expired()) + { + ModuleBase::WARNING_QUIT("ESolver_KS_PW::initialize_psi", "psig lifetime is expired"); + } + + //! to use psig, we need to lock it to get a shared pointer version, + //! then switch kpoint of psig to the given one + auto psig_ = psig.lock(); + psig_->fix_k(ik); + + std::vector etatom(psig_->get_nbands(), 0.0); + // then adjust dimension from psig to psi - if (this->psi_init->get_method() != "random") + // either by matrix-multiplication or by copying-discarding + if (this->psi_init->method() != "random") { + // lcao_in_pw and pw share the same esolver. In the future, we will have different esolver if ( - ( - (GlobalV::KS_SOLVER == "cg") - ||(GlobalV::KS_SOLVER == "lapack") - )&& - (GlobalV::BASIS_TYPE == "pw") // presently lcao_in_pw and pw share the same esolver. In the future, we will have different esolver + ((GlobalV::KS_SOLVER == "cg")||(GlobalV::KS_SOLVER == "lapack")) + &&(GlobalV::BASIS_TYPE == "pw") ) { + // the following function is only run serially, to be improved hsolver::DiagoIterAssist::diagH_subspace_init( this->p_hamilt, - psig->get_pointer(), psig->get_nbands(), psig->get_nbasis(), - *(this->kspw_psi), etatom.data() - ); + psig_->get_pointer(), + psig_->get_nbands(), + psig_->get_nbasis(), + *(this->kspw_psi), + etatom.data() + ); continue; } - else if ( - (GlobalV::KS_SOLVER == "lapack") && (GlobalV::BASIS_TYPE == "lcao_in_pw") - ) - { - if(ik == 0) GlobalV::ofs_running << " START WAVEFUNCTION: LCAO_IN_PW, psi initialization skipped " << std::endl; + else if ((GlobalV::KS_SOLVER == "lapack") + && (GlobalV::BASIS_TYPE == "lcao_in_pw")) + { + if(ik == 0) + { + GlobalV::ofs_running + << " START WAVEFUNCTION: LCAO_IN_PW, psi initialization skipped " + << std::endl; + } continue; } // else the case is davidson @@ -660,33 +753,43 @@ void ESolver_KS_PW::initialize_psi() { if (GlobalV::KS_SOLVER == "cg") { - hsolver::DiagoIterAssist::diagH_subspace( - this->p_hamilt, - *(psig), *(this->kspw_psi), etatom.data() - ); + hsolver::DiagoIterAssist::diagH_subspace( + this->p_hamilt, + *(psig_), + *(this->kspw_psi), + etatom.data() + ); continue; } // else the case is davidson } - // for davidson, we just copy the wavefunction (partially) + + // for the Davidson method, we just copy the wavefunction (partially) for (int iband = 0; iband < this->kspw_psi->get_nbands(); iband++) { for (int ibasis = 0; ibasis < this->kspw_psi->get_nbasis(); ibasis++) { - (*(this->kspw_psi))(iband, ibasis) = (*psig)(iband, ibasis); + (*(this->kspw_psi))(iband, ibasis) = (*psig_)(iband, ibasis); } } - } + }// end k-point loop + this->psi_init->set_initialized(true); - } + + } // end GlobalV::psi_initializer ModuleBase::timer::tick("ESolver_KS_PW", "initialize_psi"); } + // Temporary, it should be replaced by hsolver later. template -void ESolver_KS_PW::hamilt2density(const int istep, const int iter, const double ethr) +void ESolver_KS_PW::hamilt2density( + const int istep, + const int iter, + const double ethr) { ModuleBase::timer::tick("ESolver_KS_PW", "hamilt2density"); + if (this->phsol != nullptr) { // reset energy @@ -695,62 +798,66 @@ void ESolver_KS_PW::hamilt2density(const int istep, const int iter, c // choose if psi should be diag in subspace // be careful that istep start from 0 and iter start from 1 // if (iter == 1) - if ((istep == 0 || istep == 1) && iter == 1) - { - hsolver::DiagoIterAssist::need_subspace = false; - } - else - { - hsolver::DiagoIterAssist::need_subspace = true; - } - + hsolver::DiagoIterAssist::need_subspace = ((istep == 0 || istep == 1) && iter == 1)? false : true; hsolver::DiagoIterAssist::SCF_ITER = iter; hsolver::DiagoIterAssist::PW_DIAG_THR = ethr; hsolver::DiagoIterAssist::PW_DIAG_NMAX = GlobalV::PW_DIAG_NMAX; - /* - after init_rho (in pelec->init_scf), we have rho now. - before hamilt2density, we update Hk and initialize psi - */ + // after init_rho (in pelec->init_scf), we have rho now. + // before hamilt2density, we update Hk and initialize psi if(GlobalV::psi_initializer) { - /* - beforescf function will be called everytime before scf. However, once atomic coordinates changed, - structure factor will change, therefore all atomwise properties will change. So we need to reinitialize - psi every time before scf. But for random wavefunction, we dont, because random wavefunction is not - related to atomic coordinates. - - What the old strategy does is only to initialize for once... we also initialize only once here because - this can save a lot of time. But if cell and ion change significantly, re-initialization psi will be - more efficient. Or an extrapolation strategy can be used. - */ - - if((istep == 0)&&(iter == 1)&&!(this->psi_init->get_initialized())) this->initialize_psi(); + // before_scf function will be called everytime before scf. However, once atomic coordinates changed, + // structure factor will change, therefore all atomwise properties will change. So we need to reinitialize + // psi every time before scf. But for random wavefunction, we dont, because random wavefunction is not + // related to atomic coordinates. + + // What the old strategy does is only to initialize for once... we also initialize only once here because + // this can save a lot of time. But if cell and ion change significantly, re-initialization psi will be + // more efficient. Or an extrapolation strategy can be used. + if((istep == 0)&&(iter == 1) + &&!(this->psi_init->initialized())) + { + this->initialize_psi(); + } } if(GlobalV::BASIS_TYPE != "lcao_in_pw") { - this->phsol->solve(this->p_hamilt, this->kspw_psi[0], this->pelec, GlobalV::KS_SOLVER); + // from HSolverPW + this->phsol->solve(this->p_hamilt, // hamilt::Hamilt* pHamilt, + this->kspw_psi[0], // psi::Psi& psi, + this->pelec, // elecstate::ElecState* pelec, + GlobalV::KS_SOLVER); // const std::string method_in, } else { - /* - It is not a good choice to overload another solve function here, this will spoil the concept of - multiple inheritance and polymorphism. But for now, we just do it in this way. - In the future, there will be a series of class ESolver_KS_LCAO_PW, HSolver_LCAO_PW and so on. - */ - this->phsol->solve(this->p_hamilt, this->kspw_psi[0], this->pelec, this->psi_init->psig[0]); + // It is not a good choice to overload another solve function here, this will spoil the concept of + // multiple inheritance and polymorphism. But for now, we just do it in this way. + // In the future, there will be a series of class ESolver_KS_LCAO_PW, HSolver_LCAO_PW and so on. + std::weak_ptr> psig = this->psi_init->share_psig(); + + if(psig.expired()) + { + ModuleBase::WARNING_QUIT("ESolver_KS_PW::hamilt2density", "psig lifetime is expired"); + } + + // from HSolverPW + this->phsol->solve(this->p_hamilt, // hamilt::Hamilt* pHamilt, + this->kspw_psi[0], // psi::Psi& psi, + this->pelec, // elecstate::ElecState* pelec, + psig.lock().get()[0]); // psi::Psi& transform, } if (GlobalV::out_bandgap) { - if (!GlobalV::TWO_EFERMI) - { - this->pelec->cal_bandgap(); - } - else - { - this->pelec->cal_bandgap_updw(); - } - } + if (!GlobalV::TWO_EFERMI) + { + this->pelec->cal_bandgap(); + } + else + { + this->pelec->cal_bandgap_updw(); + } + } } else { @@ -762,39 +869,48 @@ void ESolver_KS_PW::hamilt2density(const int istep, const int iter, c this->pelec->set_exx(GlobalC::exx_lip.get_exx_energy()); // Peize Lin add 2019-03-09 #endif #endif + // calculate the delta_harris energy // according to new charge density. // mohan add 2009-01-23 this->pelec->cal_energies(1); + Symmetry_rho srho; for (int is = 0; is < GlobalV::NSPIN; is++) - { - srho.begin(is, *(this->pelec->charge), this->pw_rhod, GlobalC::Pgrid, GlobalC::ucell.symm); - } + { + srho.begin(is, + *(this->pelec->charge), + this->pw_rhod, + GlobalC::Pgrid, + GlobalC::ucell.symm); + } // compute magnetization, only for LSDA(spin==2) GlobalC::ucell.magnet.compute_magnetization(this->pelec->charge->nrxx, this->pelec->charge->nxyz, this->pelec->charge->rho, this->pelec->nelec_spin.data()); + // deband is calculated from "output" charge density calculated // in sum_band // need 'rho(out)' and 'vr (v_h(in) and v_xc(in))' - this->pelec->f_en.deband = this->pelec->cal_delta_eband(); - // if (LOCAL_BASIS) xiaohui modify 2013-09-02 + ModuleBase::timer::tick("ESolver_KS_PW", "hamilt2density"); } + // Temporary, it should be rewritten with Hamilt class. template -void ESolver_KS_PW::updatepot(const int istep, const int iter) +void ESolver_KS_PW::update_pot(const int istep, const int iter) { if (!this->conv_elec) { - if (GlobalV::NSPIN == 4) - GlobalC::ucell.cal_ux(); - this->pelec->pot->update_from_charge(this->pelec->charge, &GlobalC::ucell); + if (GlobalV::NSPIN == 4) + { + GlobalC::ucell.cal_ux(); + } + this->pelec->pot->update_from_charge(this->pelec->charge, &GlobalC::ucell); this->pelec->f_en.descf = this->pelec->cal_delta_escf(); } else @@ -803,8 +919,9 @@ void ESolver_KS_PW::updatepot(const int istep, const int iter) } } + template -void ESolver_KS_PW::eachiterfinish(const int iter) +void ESolver_KS_PW::iter_finish(const int iter) { // liuyu 2023-10-24 // D in uspp need vloc, thus needs update when veff updated @@ -815,8 +932,8 @@ void ESolver_KS_PW::eachiterfinish(const int iter) GlobalC::ppcell.cal_effective_D(veff, this->pw_rhod, GlobalC::ucell); } - // print_eigenvalue(GlobalV::ofs_running); this->pelec->cal_energies(2); + // We output it for restarting the scf. bool print = false; if (this->out_freq_elec && iter % this->out_freq_elec == 0) @@ -850,8 +967,9 @@ void ESolver_KS_PW::eachiterfinish(const int iter) } } + template -void ESolver_KS_PW::afterscf(const int istep) +void ESolver_KS_PW::after_scf(const int istep) { this->create_Output_Potential(istep).write(); @@ -879,20 +997,23 @@ void ESolver_KS_PW::afterscf(const int istep) } } - if (this->wf.out_wfc_pw == 1 || this->wf.out_wfc_pw == 2) - { + if (this->wf.out_wfc_pw == 1 + || this->wf.out_wfc_pw == 2) + { std::stringstream ssw; ssw << GlobalV::global_out_dir << "WAVEFUNC"; ModuleIO::write_wfc_pw(ssw.str(), this->psi[0], this->kv, this->pw_wfc); } ModuleIO::output_convergence_after_scf(this->conv_elec, this->pelec->f_en.etot); + ModuleIO::output_efermi(this->conv_elec, this->pelec->eferm.ef); if (GlobalV::OUT_LEVEL != "m") { this->pelec->print_eigenvalue(GlobalV::ofs_running); } + if (this->device == psi::GpuDevice) { castmem_2d_d2h_op()(this->psi[0].get_device(), @@ -955,53 +1076,71 @@ void ESolver_KS_PW::afterscf(const int istep) } } + template -double ESolver_KS_PW::cal_Energy() +double ESolver_KS_PW::cal_energy() { return this->pelec->f_en.etot; } + template -void ESolver_KS_PW::cal_Force(ModuleBase::matrix& force) +void ESolver_KS_PW::cal_force(ModuleBase::matrix& force) { Forces ff(GlobalC::ucell.nat); - if (this->__kspw_psi != nullptr) - this->__kspw_psi = nullptr; - if (this->__kspw_psi == nullptr) + if (this->__kspw_psi != nullptr) + { + this->__kspw_psi = nullptr; + } + + if (this->__kspw_psi == nullptr) { this->__kspw_psi = GlobalV::precision_flag == "single" ? new psi::Psi, Device>(this->kspw_psi[0]) : reinterpret_cast, Device>*>(this->kspw_psi); } - ff.cal_force(force, *this->pelec, this->pw_rhod, &GlobalC::ucell.symm, &this->sf, &this->kv, this->pw_wfc, this->__kspw_psi); + + //! Calculate forces + ff.cal_force(force, + *this->pelec, + this->pw_rhod, + &GlobalC::ucell.symm, + &this->sf, + &this->kv, + this->pw_wfc, + this->__kspw_psi); } + template -void ESolver_KS_PW::cal_Stress(ModuleBase::matrix& stress) +void ESolver_KS_PW::cal_stress(ModuleBase::matrix& stress) { Stress_PW ss(this->pelec); if (this->__kspw_psi != nullptr) + { this->__kspw_psi = nullptr; + } + if (this->__kspw_psi == nullptr) { - this->__kspw_psi = GlobalV::precision_flag == "single" - ? new psi::Psi, Device>(this->kspw_psi[0]) - : reinterpret_cast, Device>*>(this->kspw_psi); - } - ss.cal_stress(stress, - GlobalC::ucell, - this->pw_rhod, - &GlobalC::ucell.symm, - &this->sf, - &this->kv, - this->pw_wfc, - this->psi, - this->__kspw_psi); - - // external stress - double unit_transform = 0.0; - unit_transform = ModuleBase::RYDBERG_SI / pow(ModuleBase::BOHR_RADIUS_SI, 3) * 1.0e-8; - double external_stress[3] = {GlobalV::PRESS1, GlobalV::PRESS2, GlobalV::PRESS3}; + this->__kspw_psi = GlobalV::precision_flag == "single" + ? new psi::Psi, Device>(this->kspw_psi[0]) + : reinterpret_cast, Device>*>(this->kspw_psi); + } + ss.cal_stress(stress, + GlobalC::ucell, + this->pw_rhod, + &GlobalC::ucell.symm, + &this->sf, + &this->kv, + this->pw_wfc, + this->psi, + this->__kspw_psi); + + // external stress + double unit_transform = 0.0; + unit_transform = ModuleBase::RYDBERG_SI / pow(ModuleBase::BOHR_RADIUS_SI, 3) * 1.0e-8; + double external_stress[3] = {GlobalV::PRESS1, GlobalV::PRESS2, GlobalV::PRESS3}; for (int i = 0; i < 3; i++) { stress(i, i) -= external_stress[i] / unit_transform; @@ -1009,8 +1148,9 @@ void ESolver_KS_PW::cal_Stress(ModuleBase::matrix& stress) GlobalV::PRESSURE = (stress(0, 0) + stress(1, 1) + stress(2, 2)) / 3; } + template -void ESolver_KS_PW::postprocess() +void ESolver_KS_PW::post_process(void) { GlobalV::ofs_running << "\n\n --------------------------------------------" << std::endl; @@ -1027,17 +1167,21 @@ void ESolver_KS_PW::postprocess() GlobalV::ofs_running << " | DOS (density of states) and bands will be output here. |" << std::endl; GlobalV::ofs_running << " | If atomic orbitals are used, Mulliken charge analysis can be done. |" << std::endl; GlobalV::ofs_running << " | Also the .bxsf file containing fermi surface information can be |" << std::endl; - GlobalV::ofs_running << " | done here. |" << std::endl; - GlobalV::ofs_running << " | |" << std::endl; - GlobalV::ofs_running << " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << std::endl; - GlobalV::ofs_running << "\n\n\n\n"; - } - int nspin0 = 1; - if (GlobalV::NSPIN == 2) - nspin0 = 2; - // print occupation in istate.info - ModuleIO::write_istate_info(this->pelec->ekb, this->pelec->wg, this->kv, &(GlobalC::Pkpoints)); - // compute density of states + GlobalV::ofs_running << " | done here. |" << std::endl; + GlobalV::ofs_running << " | |" << std::endl; + GlobalV::ofs_running << " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << std::endl; + GlobalV::ofs_running << "\n\n\n\n"; + } + + int nspin0 = 1; + if (GlobalV::NSPIN == 2) + { + nspin0 = 2; + } + //! print occupation in istate.info + ModuleIO::write_istate_info(this->pelec->ekb, this->pelec->wg, this->kv, &(GlobalC::Pkpoints)); + + //! compute density of states if (INPUT.out_dos) { ModuleIO::write_dos_pw(this->pelec->ekb, @@ -1052,14 +1196,19 @@ void ESolver_KS_PW::postprocess() GlobalV::ofs_running << " Fermi energy is " << this->pelec->eferm.ef << " Rydberg" << std::endl; } else if (nspin0 == 2) - { - GlobalV::ofs_running << " Fermi energy (spin = 1) is " << this->pelec->eferm.ef_up << " Rydberg" - << std::endl; - GlobalV::ofs_running << " Fermi energy (spin = 2) is " << this->pelec->eferm.ef_dw << " Rydberg" - << std::endl; - } + { + GlobalV::ofs_running << " Fermi energy (spin = 1) is " + << this->pelec->eferm.ef_up + << " Rydberg" + << std::endl; + GlobalV::ofs_running << " Fermi energy (spin = 2) is " + << this->pelec->eferm.ef_dw + << " Rydberg" + << std::endl; + } } + if (INPUT.out_band[0]) // pengfei 2014-10-13 { int nks = 0; @@ -1088,6 +1237,7 @@ void ESolver_KS_PW::postprocess() } } + if (GlobalV::BASIS_TYPE == "pw" && winput::out_spillage) // xiaohui add 2013-09-01 { // std::cout << "\n Output Spillage Information : " << std::endl; @@ -1121,7 +1271,7 @@ void ESolver_KS_PW::postprocess() */ #endif - // output overlap + // ! Print out overlap before spillage optimization to generate atomic orbitals if (winput::out_spillage <= 2) { if(INPUT.bessel_nao_rcuts.size() == 1) @@ -1133,19 +1283,35 @@ void ESolver_KS_PW::postprocess() { for(int i = 0; i < INPUT.bessel_nao_rcuts.size(); i++) { - if(GlobalV::MY_RANK == 0) {std::cout << "update value: bessel_nao_rcut <- " << std::fixed << INPUT.bessel_nao_rcuts[i] << " a.u." << std::endl;} - INPUT.bessel_nao_rcut = INPUT.bessel_nao_rcuts[i]; + if(GlobalV::MY_RANK == 0) + { + std::cout << "update value: bessel_nao_rcut <- " + << std::fixed + << INPUT.bessel_nao_rcuts[i] + << " a.u." + << std::endl; + } + INPUT.bessel_nao_rcut = INPUT.bessel_nao_rcuts[i]; /* SEVERE BUG - the memory management of numerical_basis class is NOT SAFE, data cleaning before overwriting is absent. - instance created from present implementation of numerical_basis SHOULD NOT BE USED FOR MORE THAN ONE TIME. + the memory management of numerical_basis class is NOT SAFE, + data cleaning before overwriting is absent. + instance created from present implementation of numerical_basis + SHOULD NOT BE USED FOR MORE THAN ONE TIME. will cause data unexpected overwriting, file truncation and data loss. Will be refactored in the future. */ Numerical_Basis numerical_basis; numerical_basis.output_overlap(this->psi[0], this->sf, this->kv, this->pw_wfc); - std::string old_fname_header = winput::spillage_outdir + "/" + "orb_matrix."; - std::string new_fname_header = winput::spillage_outdir + "/" + "orb_matrix_rcut" + std::to_string(int(INPUT.bessel_nao_rcut)) + "deriv"; + std::string old_fname_header = winput::spillage_outdir + + "/" + + "orb_matrix."; + std::string new_fname_header = winput::spillage_outdir + + "/" + + "orb_matrix_rcut" + + std::to_string(int(INPUT.bessel_nao_rcut)) + + "deriv"; + for(int derivative_order = 0; derivative_order <= 1; derivative_order++) { // rename generated files @@ -1159,15 +1325,28 @@ void ESolver_KS_PW::postprocess() } } + //! Print out wave functions in real space if (this->wf.out_wfc_r == 1) // Peize Lin add 2021.11.21 { - ModuleIO::write_psi_r_1(this->psi[0], this->pw_wfc, "wfc_realspace", true, this->kv); + ModuleIO::write_psi_r_1( + this->psi[0], + this->pw_wfc, + "wfc_realspace", + true, + this->kv); } + //! Use Kubo-Greenwood method to compute conductivities if (INPUT.cal_cond) { - this->KG(INPUT.cond_smear, INPUT.cond_fwhm, INPUT.cond_wcut, INPUT.cond_dw, INPUT.cond_dt, this->pelec->wg); - } + this->KG( + INPUT.cond_smear, + INPUT.cond_fwhm, + INPUT.cond_wcut, + INPUT.cond_dw, + INPUT.cond_dt, + this->pelec->wg); + } } template @@ -1186,65 +1365,92 @@ void ESolver_KS_PW::hamilt2estates(const double ethr) } template -void ESolver_KS_PW::nscf() +void ESolver_KS_PW::nscf(void) { ModuleBase::TITLE("ESolver_KS_PW", "nscf"); ModuleBase::timer::tick("ESolver_KS_PW", "nscf"); - this->beforescf(0); - //======================================== - // diagonalization of the KS hamiltonian - // ======================================= + // mohan add istep_tmp 2024-03-31 + const int istep_tmp = 0; + this->before_scf(istep_tmp); + + //! Setup the parameters for diagonalization double diag_ethr = GlobalV::PW_DIAG_THR; if (diag_ethr - 1e-2 > -1e-5) + { diag_ethr = std::max(1e-13, 0.1 * std::min(1e-2, GlobalV::SCF_THR / GlobalV::nelec)); + } GlobalV::ofs_running << " PW_DIAG_THR = " << diag_ethr << std::endl; + //! Diagonalize Hamiltonian this->hamilt2estates(diag_ethr); + + //! Calculate weights/Fermi energies this->pelec->calculate_weights(); + GlobalV::ofs_running << "\n End of Band Structure Calculation \n" << std::endl; + //! Print out band energies and weights for (int ik = 0; ik < this->kv.nks; ik++) { if (GlobalV::NSPIN == 2) { if (ik == 0) - GlobalV::ofs_running << " spin up :" << std::endl; - if (ik == (this->kv.nks / 2)) - GlobalV::ofs_running << " spin down :" << std::endl; + { + GlobalV::ofs_running << " spin up :" << std::endl; + } + if (ik == (this->kv.nks / 2)) + { + GlobalV::ofs_running << " spin down :" << std::endl; + } } - // out.printV3(GlobalV::ofs_running, this->kv.kvec_c[ik]); - GlobalV::ofs_running << " k-points" << ik + 1 << "(" << this->kv.nkstot << "): " << this->kv.kvec_c[ik].x << " " - << this->kv.kvec_c[ik].y << " " << this->kv.kvec_c[ik].z << std::endl; + GlobalV::ofs_running << " k-points" << ik + 1 + << "(" << this->kv.nkstot + << "): " << this->kv.kvec_c[ik].x + << " " + << this->kv.kvec_c[ik].y + << " " << this->kv.kvec_c[ik].z << std::endl; for (int ib = 0; ib < GlobalV::NBANDS; ib++) { - GlobalV::ofs_running << " spin" << this->kv.isk[ik] + 1 << "_final_band " << ib + 1 << " " - << this->pelec->ekb(ik, ib) * ModuleBase::Ry_to_eV << " " - << this->pelec->wg(ik, ib) * this->kv.nks << std::endl; - } + GlobalV::ofs_running << " spin" + << this->kv.isk[ik] + 1 + << "_final_band " + << ib + 1 << " " + << this->pelec->ekb(ik, ib) * ModuleBase::Ry_to_eV << " " + << this->pelec->wg(ik, ib) * this->kv.nks + << std::endl; + } GlobalV::ofs_running << std::endl; } + //! Print out band gaps if (GlobalV::out_bandgap) { if (!GlobalV::TWO_EFERMI) { this->pelec->cal_bandgap(); - GlobalV::ofs_running << " E_bandgap " << this->pelec->bandgap * ModuleBase::Ry_to_eV << " eV" << std::endl; - } + GlobalV::ofs_running << " E_bandgap " + << this->pelec->bandgap * ModuleBase::Ry_to_eV + << " eV" << std::endl; + } else { - this->pelec->cal_bandgap_updw(); - GlobalV::ofs_running << " E_bandgap_up " << this->pelec->bandgap_up * ModuleBase::Ry_to_eV << " eV" - << std::endl; - GlobalV::ofs_running << " E_bandgap_dw " << this->pelec->bandgap_dw * ModuleBase::Ry_to_eV << " eV" - << std::endl; - } - } - + this->pelec->cal_bandgap_updw(); + GlobalV::ofs_running << " E_bandgap_up " + << this->pelec->bandgap_up * ModuleBase::Ry_to_eV + << " eV" + << std::endl; + GlobalV::ofs_running << " E_bandgap_dw " + << this->pelec->bandgap_dw * ModuleBase::Ry_to_eV + << " eV" + << std::endl; + } + } + + //! Calculate Wannier functions // add by jingan in 2018.11.7 if (INPUT.towannier90) { @@ -1258,18 +1464,27 @@ void ESolver_KS_PW::nscf() INPUT.wannier_spin ); - myWannier.calculate(this->pelec->ekb, this->pw_wfc, this->pw_big, this->kv, this->psi); - } + myWannier.calculate( + this->pelec->ekb, + this->pw_wfc, + this->pw_big, + this->kv, + this->psi); + } - //======================================================= - // Do a Berry phase polarization calculation if required - //======================================================= - if (berryphase::berry_phase_flag && ModuleSymmetry::Symmetry::symm_flag != 1) + //! Calculate Berry phase polarization + if (berryphase::berry_phase_flag + && ModuleSymmetry::Symmetry::symm_flag != 1) { berryphase bp; - bp.Macroscopic_polarization(this->pw_wfc->npwk_max, this->psi, this->pw_rho, this->pw_wfc, this->kv); - } + bp.Macroscopic_polarization( + this->pw_wfc->npwk_max, + this->psi, + this->pw_rho, + this->pw_wfc, + this->kv); + } ModuleBase::timer::tick("ESolver_KS_PW", "nscf"); return; diff --git a/source/module_esolver/esolver_ks_pw.h b/source/module_esolver/esolver_ks_pw.h index 5d456ad695..41aab7892e 100644 --- a/source/module_esolver/esolver_ks_pw.h +++ b/source/module_esolver/esolver_ks_pw.h @@ -3,6 +3,7 @@ #include "./esolver_ks.h" #include "module_hamilt_pw/hamilt_pwdft/operator_pw/velocity_pw.h" #include "module_psi/psi_initializer.h" +#include #include // #include "Basis_PW.h" @@ -14,23 +15,36 @@ namespace ModuleESolver { - template - class ESolver_KS_PW : public ESolver_KS - { - private: - using Real = typename GetTypeReal::type; - public: +template +class ESolver_KS_PW : public ESolver_KS +{ + private: + + using Real = typename GetTypeReal::type; + + public: + ESolver_KS_PW(); + ~ESolver_KS_PW(); - void Init(Input& inp, UnitCell& cell) override; + + void init(Input& inp, UnitCell& cell) override; + void init_after_vc(Input& inp, UnitCell& cell) override; - double cal_Energy() override; - void cal_Force(ModuleBase::matrix& force) override; - void cal_Stress(ModuleBase::matrix& stress) override; + + double cal_energy() override; + + void cal_force(ModuleBase::matrix& force) override; + + void cal_stress(ModuleBase::matrix& stress) override; + virtual void hamilt2density(const int istep, const int iter, const double ethr) override; + virtual void hamilt2estates(const double ethr) override; + virtual void nscf() override; - void postprocess() override; + + void post_process() override; /** * @brief calculate Onsager coefficients Lmn(\omega) and conductivities with Kubo-Greenwood formula @@ -73,16 +87,23 @@ namespace ModuleESolver double* ct22); protected: - virtual void beforescf(const int istep) override; - virtual void eachiterinit(const int istep, const int iter) override; - virtual void updatepot(const int istep, const int iter) override; - virtual void eachiterfinish(const int iter) override; - virtual void afterscf(const int istep) override; - virtual void othercalculation(const int istep)override; + + virtual void before_scf(const int istep) override; + + virtual void iter_init(const int istep, const int iter) override; + + virtual void update_pot(const int istep, const int iter) override; + + virtual void iter_finish(const int iter) override; + + virtual void after_scf(const int istep) override; + + virtual void others(const int istep)override; //temporary, this will be removed in the future; //Init Global class void Init_GlobalC(Input& inp, UnitCell& cell); + /// @brief calculate conductivities from j-j correlation function void calcondw(const int nt, const double dt, @@ -93,18 +114,34 @@ namespace ModuleESolver double* ct11, double* ct12, double* ct22); + /// @brief allocate psi_init the new psi_initializer void allocate_psi_init(); + /// @brief initialize psi void initialize_psi(); + protected: - psi::Psi, psi::DEVICE_CPU>* psi = nullptr; //hide the psi in ESolver_KS for tmp use + + //! hide the psi in ESolver_KS for tmp use + psi::Psi, psi::DEVICE_CPU>* psi = nullptr; + private: - psi_initializer* psi_init = nullptr; + + // psi_initializer* psi_init = nullptr; + // change to use smart pointer to manage the memory, and avoid memory leak + // while the std::make_unique() is not supported till C++14, + // so use the new and std::unique_ptr to manage the memory, but this makes new-delete not symmetric + std::unique_ptr> psi_init; + Device * ctx = {}; + psi::AbacusDevice_t device = {}; + psi::Psi* kspw_psi = nullptr; + psi::Psi, Device>* __kspw_psi = nullptr; + using castmem_2d_d2h_op = psi::memory::cast_memory_op, T, psi::DEVICE_CPU, Device>; }; } // namespace ModuleESolver diff --git a/source/module_esolver/esolver_lj.cpp b/source/module_esolver/esolver_lj.cpp index f48ff290d8..0b5346a53f 100644 --- a/source/module_esolver/esolver_lj.cpp +++ b/source/module_esolver/esolver_lj.cpp @@ -7,7 +7,7 @@ namespace ModuleESolver { - void ESolver_LJ::Init(Input& inp, UnitCell& ucell) + void ESolver_LJ::init(Input& inp, UnitCell& ucell) { ucell_ = &ucell; lj_potential = 0; @@ -24,7 +24,7 @@ namespace ModuleESolver lj_sigma *= ModuleBase::ANGSTROM_AU; } - void ESolver_LJ::Run(const int istep, UnitCell& ucell) + void ESolver_LJ::run(const int istep, UnitCell& ucell) { Grid_Driver grid_neigh(GlobalV::test_deconstructor, GlobalV::test_grid_driver, GlobalV::test_grid); atom_arrange::search( @@ -93,18 +93,18 @@ namespace ModuleESolver #endif } - double ESolver_LJ::cal_Energy() + double ESolver_LJ::cal_energy() { return lj_potential; } - void ESolver_LJ::cal_Force(ModuleBase::matrix& force) + void ESolver_LJ::cal_force(ModuleBase::matrix& force) { force = lj_force; ModuleIO::print_force(GlobalV::ofs_running, *ucell_, "TOTAL-FORCE (eV/Angstrom)", force, false); } - void ESolver_LJ::cal_Stress(ModuleBase::matrix& stress) + void ESolver_LJ::cal_stress(ModuleBase::matrix& stress) { stress = lj_virial; @@ -119,7 +119,7 @@ namespace ModuleESolver ModuleIO::print_stress("TOTAL-STRESS", stress, true, false); } - void ESolver_LJ::postprocess() + void ESolver_LJ::post_process(void) { GlobalV::ofs_running << "\n\n --------------------------------------------" << std::endl; GlobalV::ofs_running << std::setprecision(16); diff --git a/source/module_esolver/esolver_lj.h b/source/module_esolver/esolver_lj.h index 9d04243e1c..6963e4b854 100644 --- a/source/module_esolver/esolver_lj.h +++ b/source/module_esolver/esolver_lj.h @@ -14,17 +14,25 @@ namespace ModuleESolver classname = "ESolver_LJ"; } - void Init(Input& inp, UnitCell& cell) override; - void Run(const int istep, UnitCell& cell) override; - double cal_Energy() override; - void cal_Force(ModuleBase::matrix& force) override; - void cal_Stress(ModuleBase::matrix& stress) override; - void postprocess() override; + void init(Input& inp, UnitCell& cell) override; + + void run(const int istep, UnitCell& cell) override; + + double cal_energy() override; + + void cal_force(ModuleBase::matrix& force) override; + + void cal_stress(ModuleBase::matrix& stress) override; + + void post_process() override; private: + double LJ_energy(const double d); + ModuleBase::Vector3 LJ_force(const double d, const ModuleBase::Vector3 dr); + void LJ_virial(const ModuleBase::Vector3& force, const ModuleBase::Vector3& dtau); diff --git a/source/module_esolver/esolver_of.cpp b/source/module_esolver/esolver_of.cpp index 53e1224e44..ccd6bc3b5b 100644 --- a/source/module_esolver/esolver_of.cpp +++ b/source/module_esolver/esolver_of.cpp @@ -57,9 +57,9 @@ ESolver_OF::~ESolver_OF() delete this->opt_cg_mag_; } -void ESolver_OF::Init(Input& inp, UnitCell& ucell) +void ESolver_OF::init(Input& inp, UnitCell& ucell) { - ESolver_FP::Init(inp, ucell); + ESolver_FP::init(inp, ucell); // save necessary parameters this->of_kinetic_ = inp.of_kinetic; @@ -217,9 +217,9 @@ void ESolver_OF::init_after_vc(Input& inp, UnitCell& ucell) } } -void ESolver_OF::Run(int istep, UnitCell& ucell) +void ESolver_OF::run(int istep, UnitCell& ucell) { - ModuleBase::timer::tick("ESolver_OF", "Run"); + ModuleBase::timer::tick("ESolver_OF", "run"); // get Ewald energy, initial rho and phi if necessary this->before_opt(istep, ucell); this->iter_ = 0; @@ -232,11 +232,13 @@ void ESolver_OF::Run(int istep, UnitCell& ucell) // calculate the energy of new rho and phi this->energy_llast_ = this->energy_last_; this->energy_last_ = this->energy_current_; - this->energy_current_ = this->cal_Energy(); + this->energy_current_ = this->cal_energy(); // check if the job is done - if (this->check_exit()) - break; + if (this->check_exit()) + { + break; + } // find the optimization direction and step lenghth theta according to the potential this->optimize(ucell); @@ -249,7 +251,7 @@ void ESolver_OF::Run(int istep, UnitCell& ucell) this->after_opt(istep, ucell); - ModuleBase::timer::tick("ESolver_OF", "Run"); + ModuleBase::timer::tick("ESolver_OF", "run"); } /** @@ -334,7 +336,10 @@ void ESolver_OF::update_potential(UnitCell& ucell) { // (1) get dL/dphi if (GlobalV::NSPIN == 4) + { ucell.cal_ux(); + } + this->pelec->pot->update_from_charge(pelec->charge, &ucell); // Hartree + XC + external this->kinetic_potential(pelec->charge->rho, this->pphi_, @@ -582,7 +587,7 @@ void ESolver_OF::after_opt(const int istep, UnitCell& ucell) /** * @brief Output the FINAL_ETOT */ -void ESolver_OF::postprocess() +void ESolver_OF::post_process() { GlobalV::ofs_running << "\n\n --------------------------------------------" << std::endl; @@ -597,7 +602,7 @@ void ESolver_OF::postprocess() * * @return total energy */ -double ESolver_OF::cal_Energy() +double ESolver_OF::cal_energy() { this->pelec->cal_energies(2); double kinetic_energy = this->kinetic_energy(); // kinetic energy @@ -621,7 +626,7 @@ double ESolver_OF::cal_Energy() * * @param [out] force */ -void ESolver_OF::cal_Force(ModuleBase::matrix& force) +void ESolver_OF::cal_force(ModuleBase::matrix& force) { Forces ff(GlobalC::ucell.nat); ff.cal_force(force, *pelec, this->pw_rho, &GlobalC::ucell.symm, &sf); @@ -632,7 +637,7 @@ void ESolver_OF::cal_Force(ModuleBase::matrix& force) * * @param [out] stress */ -void ESolver_OF::cal_Stress(ModuleBase::matrix& stress) +void ESolver_OF::cal_stress(ModuleBase::matrix& stress) { ModuleBase::matrix kinetic_stress_; kinetic_stress_.create(3, 3); @@ -641,4 +646,4 @@ void ESolver_OF::cal_Stress(ModuleBase::matrix& stress) OF_Stress_PW ss(this->pelec, this->pw_rho); ss.cal_stress(stress, kinetic_stress_, GlobalC::ucell, &GlobalC::ucell.symm, &sf, &kv); } -} // namespace ModuleESolver \ No newline at end of file +} // namespace ModuleESolver diff --git a/source/module_esolver/esolver_of.h b/source/module_esolver/esolver_of.h index ab847321be..42722b27b1 100644 --- a/source/module_esolver/esolver_of.h +++ b/source/module_esolver/esolver_of.h @@ -20,14 +20,19 @@ class ESolver_OF : public ESolver_FP ESolver_OF(); ~ESolver_OF(); - virtual void Init(Input& inp, UnitCell& ucell) override; + virtual void init(Input& inp, UnitCell& ucell) override; + virtual void init_after_vc(Input& inp, UnitCell& ucell) override; - virtual void Run(int istep, UnitCell& ucell) override; - virtual void postprocess() override; - virtual double cal_Energy() override; - virtual void cal_Force(ModuleBase::matrix& force) override; - virtual void cal_Stress(ModuleBase::matrix& stress) override; + virtual void run(int istep, UnitCell& ucell) override; + + virtual void post_process() override; + + virtual double cal_energy() override; + + virtual void cal_force(ModuleBase::matrix& force) override; + + virtual void cal_stress(ModuleBase::matrix& stress) override; virtual int getniter() override { @@ -135,4 +140,4 @@ class ESolver_OF : public ESolver_FP }; } // namespace ModuleESolver -#endif \ No newline at end of file +#endif diff --git a/source/module_esolver/esolver_of_interface.cpp b/source/module_esolver/esolver_of_interface.cpp index 97ca0d471e..090b01df2c 100644 --- a/source/module_esolver/esolver_of_interface.cpp +++ b/source/module_esolver/esolver_of_interface.cpp @@ -11,23 +11,36 @@ namespace ModuleESolver */ void ESolver_OF::init_kedf(Input& inp) { + //! Thomas-Fermi (TF) KEDF, TF+ KEDF, and Want-Teter (WT) KEDF if (this->of_kinetic_ == "tf" || this->of_kinetic_ == "tf+" || this->of_kinetic_ == "wt") { - if (this->tf_ == nullptr) - this->tf_ = new KEDF_TF(); + if (this->tf_ == nullptr) + { + this->tf_ = new KEDF_TF(); + } this->tf_->set_para(this->pw_rho->nrxx, this->dV_, inp.of_tf_weight); } - if (this->of_kinetic_ == "vw" || this->of_kinetic_ == "tf+" || this->of_kinetic_ == "wt" - || this->of_kinetic_ == "lkt") + + //! vW, TF+, WT, and LKT KEDFs + if (this->of_kinetic_ == "vw" + || this->of_kinetic_ == "tf+" + || this->of_kinetic_ == "wt" + || this->of_kinetic_ == "lkt") { - if (this->vw_ == nullptr) - this->vw_ = new KEDF_vW(); + if (this->vw_ == nullptr) + { + this->vw_ = new KEDF_vW(); + } this->vw_->set_para(this->dV_, inp.of_vw_weight); } + + //! Wang-Teter KEDF if (this->of_kinetic_ == "wt") { - if (this->wt_ == nullptr) - this->wt_ = new KEDF_WT(); + if (this->wt_ == nullptr) + { + this->wt_ = new KEDF_WT(); + } this->wt_->set_para(this->dV_, inp.of_wt_alpha, inp.of_wt_beta, @@ -40,10 +53,14 @@ void ESolver_OF::init_kedf(Input& inp) inp.of_kernel_file, this->pw_rho); } + + //! LKT KEDF if (this->of_kinetic_ == "lkt") { - if (this->lkt_ == nullptr) - this->lkt_ = new KEDF_LKT(); + if (this->lkt_ == nullptr) + { + this->lkt_ = new KEDF_LKT(); + } this->lkt_->set_para(this->dV_, inp.of_lkt_a); } } @@ -80,8 +97,10 @@ void ESolver_OF::kinetic_potential(double** prho, double** pphi, ModuleBase::mat } } - if (this->of_kinetic_ == "vw" || this->of_kinetic_ == "tf+" || this->of_kinetic_ == "wt" - || this->of_kinetic_ == "lkt") + if (this->of_kinetic_ == "vw" + || this->of_kinetic_ == "tf+" + || this->of_kinetic_ == "wt" + || this->of_kinetic_ == "lkt") { this->vw_->vw_potential(pphi, this->pw_rho, rpot); } @@ -95,21 +114,28 @@ void ESolver_OF::kinetic_potential(double** prho, double** pphi, ModuleBase::mat */ double ESolver_OF::kinetic_energy() { - double kinetic_energy = 0.; + double kinetic_energy = 0.0; - if (this->of_kinetic_ == "tf" || this->of_kinetic_ == "tf+" || this->of_kinetic_ == "wt") + if (this->of_kinetic_ == "tf" + || this->of_kinetic_ == "tf+" + || this->of_kinetic_ == "wt") { kinetic_energy += this->tf_->tf_energy; } - if (this->of_kinetic_ == "vw" || this->of_kinetic_ == "tf+" || this->of_kinetic_ == "wt" - || this->of_kinetic_ == "lkt") + + if (this->of_kinetic_ == "vw" + || this->of_kinetic_ == "tf+" + || this->of_kinetic_ == "wt" + || this->of_kinetic_ == "lkt") { kinetic_energy += this->vw_->vw_energy; } + if (this->of_kinetic_ == "wt") { kinetic_energy += this->wt_->wt_energy; } + if (this->of_kinetic_ == "lkt") { kinetic_energy += this->lkt_->lkt_energy; @@ -139,17 +165,20 @@ void ESolver_OF::kinetic_stress(ModuleBase::matrix& kinetic_stress_) this->tf_->get_stress(this->pelec->omega); kinetic_stress_ += this->tf_->stress; } + if (this->of_kinetic_ == "vw" || this->of_kinetic_ == "tf+" || this->of_kinetic_ == "wt" || this->of_kinetic_ == "lkt") { this->vw_->get_stress(this->pphi_, this->pw_rho); kinetic_stress_ += this->vw_->stress; } + if (this->of_kinetic_ == "wt") { this->wt_->get_stress(pelec->charge->rho, this->pw_rho, GlobalV::of_vw_weight); kinetic_stress_ += this->wt_->stress; } + if (this->of_kinetic_ == "lkt") { this->lkt_->get_stress(pelec->charge->rho, this->pw_rho); @@ -163,21 +192,27 @@ void ESolver_OF::kinetic_stress(ModuleBase::matrix& kinetic_stress_) */ void ESolver_OF::init_opt() { - if (this->opt_dcsrch_ == nullptr) - this->opt_dcsrch_ = new ModuleBase::Opt_DCsrch(); + if (this->opt_dcsrch_ == nullptr) + { + this->opt_dcsrch_ = new ModuleBase::Opt_DCsrch(); + } if (this->of_method_ == "tn") { - if (this->opt_tn_ == nullptr) - this->opt_tn_ = new ModuleBase::Opt_TN(); + if (this->opt_tn_ == nullptr) + { + this->opt_tn_ = new ModuleBase::Opt_TN(); + } this->opt_tn_->allocate(this->pw_rho->nrxx); this->opt_tn_->set_para(this->dV_); } else if (this->of_method_ == "cg1" || this->of_method_ == "cg2") { - if (this->opt_cg_ == nullptr) - this->opt_cg_ = new ModuleBase::Opt_CG(); - this->opt_cg_->allocate(this->pw_rho->nrxx); + if (this->opt_cg_ == nullptr) + { + this->opt_cg_ = new ModuleBase::Opt_CG(); + } + this->opt_cg_->allocate(this->pw_rho->nrxx); this->opt_cg_->set_para(this->dV_); this->opt_dcsrch_->set_paras(1e-4, 1e-2); } @@ -242,9 +277,10 @@ void ESolver_OF::get_direction() */ void ESolver_OF::get_step_length(double* dEdtheta, double** ptemp_phi, UnitCell& ucell) { - double temp_energy = 0.; // energy of temp_phi and temp_rho - double kinetic_energy = 0.; // kinetic energy - double pseudopot_energy = 0.; // electron-ion interaction energy + double temp_energy = 0.0; // energy of temp_phi and temp_rho + double kinetic_energy = 0.0; // kinetic energy + double pseudopot_energy = 0.0; // electron-ion interaction energy + if (GlobalV::NSPIN == 1) { int numDC = 0; // iteration number of line search @@ -412,4 +448,4 @@ void ESolver_OF::get_step_length(double* dEdtheta, double** ptemp_phi, UnitCell& ModuleBase::WARNING_QUIT("esolver_of", "Sorry, SPIN4 case is not supported by OFDFT for now."); } } -} // namespace ModuleESolver \ No newline at end of file +} // namespace ModuleESolver diff --git a/source/module_esolver/esolver_of_tool.cpp b/source/module_esolver/esolver_of_tool.cpp index 6eb398aaeb..df44a329c8 100644 --- a/source/module_esolver/esolver_of_tool.cpp +++ b/source/module_esolver/esolver_of_tool.cpp @@ -291,6 +291,7 @@ void ESolver_OF::adjust_direction() */ void ESolver_OF::check_direction(double* dEdtheta, double** ptemp_phi, UnitCell& ucell) { + assert(GlobalV::NSPIN>0); double* temp_theta = new double[GlobalV::NSPIN]; ModuleBase::GlobalFunc::ZEROS(temp_theta, GlobalV::NSPIN); @@ -508,4 +509,4 @@ void ESolver_OF::print_info() context.center_title(); GlobalV::ofs_running << context.str() << std::endl; } -} // namespace ModuleESolver \ No newline at end of file +} // namespace ModuleESolver diff --git a/source/module_esolver/esolver_sdft_pw.cpp b/source/module_esolver/esolver_sdft_pw.cpp index 8a05a7b2c8..342c513014 100644 --- a/source/module_esolver/esolver_sdft_pw.cpp +++ b/source/module_esolver/esolver_sdft_pw.cpp @@ -36,16 +36,17 @@ ESolver_SDFT_PW::~ESolver_SDFT_PW() { } -void ESolver_SDFT_PW::Init(Input& inp, UnitCell& ucell) +void ESolver_SDFT_PW::init(Input& inp, UnitCell& ucell) { this->nche_sto = inp.nche_sto; this->method_sto = inp.method_sto; - ESolver_KS::Init(inp, ucell); + + ESolver_KS::init(inp, ucell); this->pelec = new elecstate::ElecStatePW_SDFT(pw_wfc, &(chr), (K_Vectors*)(&(kv)), - &GlobalC::ucell, + &ucell, &(GlobalC::ppcell), this->pw_rhod, this->pw_rho, @@ -53,14 +54,14 @@ void ESolver_SDFT_PW::Init(Input& inp, UnitCell& ucell) // Inititlize the charge density. this->pelec->charge->allocate(GlobalV::NSPIN); - this->pelec->omega = GlobalC::ucell.omega; + this->pelec->omega = ucell.omega; // Initializee the potential. if (this->pelec->pot == nullptr) { this->pelec->pot = new elecstate::Potential(pw_rhod, pw_rho, - &GlobalC::ucell, + &ucell, &(GlobalC::ppcell.vloc), &(sf), &(this->pelec->f_en.etxc), @@ -89,32 +90,44 @@ void ESolver_SDFT_PW::Init(Input& inp, UnitCell& ucell) Init_Sto_Orbitals_Ecut(this->stowf, inp.seed_sto, kv, *pw_wfc, inp.initsto_ecut); } } - else - Init_Com_Orbitals(this->stowf); + else + { + Init_Com_Orbitals(this->stowf); + } + size_t size = stowf.chi0->size(); + this->stowf.shchi = new psi::Psi>(kv.nks, stowf.nchip_max, wf.npwx, kv.ngk.data()); + ModuleBase::Memory::record("SDFT::shchi", size * sizeof(std::complex)); + if (GlobalV::NBANDS > 0) { this->stowf.chiortho = new psi::Psi>(kv.nks, stowf.nchip_max, wf.npwx, kv.ngk.data()); ModuleBase::Memory::record("SDFT::chiortho", size * sizeof(std::complex)); } + this->phsol = new hsolver::HSolverPW_SDFT(&kv, pw_wfc, &wf, this->stowf, inp.method_sto); } -void ESolver_SDFT_PW::beforescf(const int istep) + +void ESolver_SDFT_PW::before_scf(const int istep) { - ESolver_KS_PW::beforescf(istep); - if (istep > 0 && INPUT.nbands_sto != 0 && INPUT.initsto_freq > 0 && istep % INPUT.initsto_freq == 0) - Update_Sto_Orbitals(this->stowf, INPUT.seed_sto); + ESolver_KS_PW::before_scf(istep); + if (istep > 0 && INPUT.nbands_sto != 0 && INPUT.initsto_freq > 0 && istep % INPUT.initsto_freq == 0) + { + Update_Sto_Orbitals(this->stowf, INPUT.seed_sto); + } } -void ESolver_SDFT_PW::eachiterfinish(int iter) +void ESolver_SDFT_PW::iter_finish(int iter) { // this->pelec->print_eigenvalue(GlobalV::ofs_running); this->pelec->cal_energies(2); } -void ESolver_SDFT_PW::afterscf(const int istep) + + +void ESolver_SDFT_PW::after_scf(const int istep) { // save charge difference into files for charge extrapolation if (GlobalV::CALCULATION != "scf") @@ -173,9 +186,21 @@ void ESolver_SDFT_PW::hamilt2density(int istep, int iter, double ethr) { hsolver::DiagoIterAssist>::need_subspace = true; } + hsolver::DiagoIterAssist>::PW_DIAG_THR = ethr; + hsolver::DiagoIterAssist>::PW_DIAG_NMAX = GlobalV::PW_DIAG_NMAX; - this->phsol->solve(this->p_hamilt, this->psi[0], this->pelec, pw_wfc, this->stowf, istep, iter, GlobalV::KS_SOLVER); + + this->phsol->solve( + this->p_hamilt, + this->psi[0], + this->pelec, + pw_wfc, + this->stowf, + istep, + iter, + GlobalV::KS_SOLVER); + if (GlobalV::MY_STOGROUP == 0) { Symmetry_rho srho; @@ -188,28 +213,54 @@ void ESolver_SDFT_PW::hamilt2density(int istep, int iter, double ethr) else { #ifdef __MPI - if (ModuleSymmetry::Symmetry::symm_flag == 1) - MPI_Barrier(MPI_COMM_WORLD); + if (ModuleSymmetry::Symmetry::symm_flag == 1) + { + MPI_Barrier(MPI_COMM_WORLD); + } #endif } } -double ESolver_SDFT_PW::cal_Energy() +double ESolver_SDFT_PW::cal_energy() { return this->pelec->f_en.etot; } -void ESolver_SDFT_PW::cal_Force(ModuleBase::matrix& force) + +void ESolver_SDFT_PW::cal_force(ModuleBase::matrix& force) { Sto_Forces ff(GlobalC::ucell.nat); - ff.cal_stoforce(force, *this->pelec, pw_rho, &GlobalC::ucell.symm, &sf, &kv, pw_wfc, this->psi, this->stowf); + + ff.cal_stoforce(force, + *this->pelec, + pw_rho, + &GlobalC::ucell.symm, + &sf, + &kv, + pw_wfc, + this->psi, + this->stowf); } -void ESolver_SDFT_PW::cal_Stress(ModuleBase::matrix& stress) + + +void ESolver_SDFT_PW::cal_stress(ModuleBase::matrix& stress) { Sto_Stress_PW ss; - ss.cal_stress(stress, *this->pelec, pw_rho, &GlobalC::ucell.symm, &sf, &kv, pw_wfc, this->psi, this->stowf, pelec->charge); + ss.cal_stress( + stress, + *this->pelec, + pw_rho, + &GlobalC::ucell.symm, + &sf, + &kv, + pw_wfc, + this->psi, + this->stowf, + pelec->charge); } -void ESolver_SDFT_PW::postprocess() + + +void ESolver_SDFT_PW::post_process(void) { GlobalV::ofs_running << "\n\n --------------------------------------------" << std::endl; @@ -219,9 +270,14 @@ void ESolver_SDFT_PW::postprocess() ModuleIO::write_istate_info(this->pelec->ekb, this->pelec->wg, kv, &(GlobalC::Pkpoints)); ((hsolver::HSolverPW_SDFT*)phsol)->stoiter.cleanchiallorder(); // release lots of memories + int nche_test = this->nche_sto; - if (INPUT.out_dos) - nche_test = std::max(nche_test, INPUT.dos_nche); + + if (INPUT.out_dos) + { + nche_test = std::max(nche_test, INPUT.dos_nche); + } + int cond_nche = 0; if (INPUT.cal_cond) { @@ -231,24 +287,41 @@ void ESolver_SDFT_PW::postprocess() { check_che(nche_test, INPUT.emin_sto, INPUT.emax_sto); } + if (INPUT.out_dos) { - double emax, emin; - if (INPUT.dos_setemax) - emax = INPUT.dos_emax_ev; - else - emax = ((hsolver::HSolverPW_SDFT*)phsol)->stoiter.stohchi.Emax * ModuleBase::Ry_to_eV; - if (INPUT.dos_setemin) - emin = INPUT.dos_emin_ev; - else - emin = ((hsolver::HSolverPW_SDFT*)phsol)->stoiter.stohchi.Emin * ModuleBase::Ry_to_eV; + double emax=0.0; + double emin=0.0; + if (INPUT.dos_setemax) + { + emax = INPUT.dos_emax_ev; + } + else + { + emax = ((hsolver::HSolverPW_SDFT*)phsol)->stoiter.stohchi.Emax * ModuleBase::Ry_to_eV; + } + if (INPUT.dos_setemin) + { + emin = INPUT.dos_emin_ev; + } + else + { + emin = ((hsolver::HSolverPW_SDFT*)phsol)->stoiter.stohchi.Emin * ModuleBase::Ry_to_eV; + } + if (!INPUT.dos_setemax && !INPUT.dos_setemin) { double delta = (emax - emin) * INPUT.dos_scale; emax = emax + delta / 2.0; emin = emin - delta / 2.0; } - this->caldos(INPUT.dos_nche, INPUT.dos_sigma, emin, emax, INPUT.dos_edelta_ev, INPUT.npart_sto); + this->caldos( + INPUT.dos_nche, + INPUT.dos_sigma, + emin, + emax, + INPUT.dos_edelta_ev, + INPUT.npart_sto); } // sKG cost memory, and it should be placed at the end of the program @@ -265,10 +338,11 @@ void ESolver_SDFT_PW::postprocess() } } -void ESolver_SDFT_PW::othercalculation(const int istep) + +void ESolver_SDFT_PW::others(const int istep) { - ModuleBase::TITLE("ESolver_SDFT_PW", "othercalculation"); - ModuleBase::timer::tick("ESolver_SDFT_PW", "othercalculation"); + ModuleBase::TITLE("ESolver_SDFT_PW", "others"); + ModuleBase::timer::tick("ESolver_SDFT_PW", "others"); if (GlobalV::CALCULATION == "nscf") { @@ -276,24 +350,33 @@ void ESolver_SDFT_PW::othercalculation(const int istep) } else { - ModuleBase::WARNING_QUIT("ESolver_SDFT_PW::othercalculation", "CALCULATION type not supported"); + ModuleBase::WARNING_QUIT("ESolver_SDFT_PW::others", "CALCULATION type not supported"); } - ModuleBase::timer::tick("ESolver_SDFT_PW", "othercalculation"); + ModuleBase::timer::tick("ESolver_SDFT_PW", "others"); return; } -void ESolver_SDFT_PW::nscf() + +void ESolver_SDFT_PW::nscf(void) { ModuleBase::TITLE("ESolver_SDFT_PW", "nscf"); ModuleBase::timer::tick("ESolver_SDFT_PW", "nscf"); + const int istep = 0; + const int iter = 1; + const double diag_thr = std::max(std::min(1e-5, 0.1 * GlobalV::SCF_THR / std::max(1.0, GlobalV::nelec)), 1e-12); + std::cout << " DIGA_THR : " << diag_thr << std::endl; - this->beforescf(istep); + + this->before_scf(istep); + this->hamilt2density(istep, iter, diag_thr); + this->pelec->cal_energies(2); + ModuleBase::timer::tick("ESolver_SDFT_PW", "nscf"); return; } -} // namespace ModuleESolver \ No newline at end of file +} // namespace ModuleESolver diff --git a/source/module_esolver/esolver_sdft_pw.h b/source/module_esolver/esolver_sdft_pw.h index 6b3698b3c6..cc9b2aa8b4 100644 --- a/source/module_esolver/esolver_sdft_pw.h +++ b/source/module_esolver/esolver_sdft_pw.h @@ -15,23 +15,33 @@ class ESolver_SDFT_PW : public ESolver_KS_PW> public: ESolver_SDFT_PW(); ~ESolver_SDFT_PW(); - void Init(Input& inp, UnitCell& cell) override; - double cal_Energy() override; - void cal_Force(ModuleBase::matrix& force) override; - void cal_Stress(ModuleBase::matrix& stress) override; + + void init(Input& inp, UnitCell& cell) override; + + double cal_energy() override; + + void cal_force(ModuleBase::matrix& force) override; + + void cal_stress(ModuleBase::matrix& stress) override; public: + Stochastic_WF stowf; protected: - virtual void beforescf(const int istep) override; - // virtual void eachiterinit(int iter) override; + virtual void before_scf(const int istep) override; + virtual void hamilt2density(const int istep, const int iter, const double ethr) override; + virtual void nscf() override; - virtual void othercalculation(const int istep) override; - virtual void eachiterfinish(const int iter) override; - virtual void afterscf(const int istep) override; - virtual void postprocess() override; + + virtual void others(const int istep) override; + + virtual void iter_finish(const int iter) override; + + virtual void after_scf(const int istep) override; + + virtual void post_process() override; public: /** @@ -133,4 +143,4 @@ extern const ModuleBase::matrix* veff; } -#endif \ No newline at end of file +#endif diff --git a/source/module_esolver/esolver_sdft_pw_tool.cpp b/source/module_esolver/esolver_sdft_pw_tool.cpp old mode 100755 new mode 100644 index a9d7508c7c..ef32bd5c12 --- a/source/module_esolver/esolver_sdft_pw_tool.cpp +++ b/source/module_esolver/esolver_sdft_pw_tool.cpp @@ -13,6 +13,7 @@ #define TWOSQRT2LN2 2.354820045030949 // FWHM = 2sqrt(2ln2) * \sigma #define FACTOR 1.839939223835727e7 + namespace ModuleESolver { struct parallel_distribution @@ -66,6 +67,8 @@ struct info_gatherv int* displs = nullptr; }; #endif + + void convert_psi(const psi::Psi>& psi_in, psi::Psi>& psi_out) { psi_in.fix_k(0); @@ -77,6 +80,7 @@ void convert_psi(const psi::Psi>& psi_in, psi::Psi>* gatherchi(psi::Psi>& chi, psi::Psi>& chi_all, const int& npwx, @@ -105,6 +109,7 @@ psi::Psi>* gatherchi(psi::Psi>& chi, return p_chi; } + void ESolver_SDFT_PW::check_che(const int nche_in, const double try_emin, const double try_emax) { //------------------------------ @@ -649,7 +654,7 @@ void ESolver_SDFT_PW::sKG(const int nche_KG, double gamma = fwhmin / 2.0 / ModuleBase::Ry_to_eV; double dt = dt_in; // unit in a.u., 1 a.u. = 4.837771834548454e-17 s const double expfactor = 18.42; // exp(-18.42) = 1e-8 - int nt; // set nt empirically + int nt=0; // set nt empirically if(smear_type == 1) { nt = ceil(sqrt(2 * expfactor) / sigma / dt); @@ -813,8 +818,10 @@ void ESolver_SDFT_PW::sKG(const int nche_KG, //----------------------------------------------------------- // ks conductivity //----------------------------------------------------------- - if (GlobalV::MY_STOGROUP == 0 && allbands_ks > 0) - jjcorr_ks(ik, nt, dt, dEcut, this->pelec->wg, velop, ct11, ct12, ct22); + if (GlobalV::MY_STOGROUP == 0 && allbands_ks > 0) + { + jjcorr_ks(ik, nt, dt, dEcut, this->pelec->wg, velop, ct11, ct12, ct22); + } //----------------------------------------------------------- // sto conductivity @@ -897,7 +904,9 @@ void ESolver_SDFT_PW::sKG(const int nche_KG, npw, npwx, perbands_sto); + che.calcoef_real(&stoiter.stofunc, &Sto_Func::nroot_mfd); + che.calfinalvec_real(&stohchi, &Stochastic_hchi::hchi_norm, stopsi->get_pointer(), @@ -1173,12 +1182,16 @@ void ESolver_SDFT_PW::sKG(const int nche_KG, / 2.0); double tmp12 = static_cast( ModuleBase::GlobalFunc::ddot_real(num_per, j1l.data() + st_per, j2r.data() + st_per, false)); + double tmp21 = static_cast( ModuleBase::GlobalFunc::ddot_real(num_per, j2l.data() + st_per, j1r.data() + st_per, false)); + ct12[it] -= 0.5 * (tmp12 + tmp21) * kv.wk[ik] / 2.0; + ct22[it] += static_cast( ModuleBase::GlobalFunc::ddot_real(num_per, j2l.data() + st_per, j2r.data() + st_per, false) * kv.wk[ik] / 2.0); + ModuleBase::timer::tick(this->classname, "ddot_real"); } std::cout << std::endl; @@ -1303,8 +1316,11 @@ void ESolver_SDFT_PW::caldos(const int nche_dos, } } } - if (stoiter.method == 2) - delete[] allorderchi; + + if (stoiter.method == 2) + { + delete[] allorderchi; + } std::ofstream ofsdos; int ndos = int((emax - emin) / de) + 1; @@ -1413,7 +1429,5 @@ void ESolver_SDFT_PW::caldos(const int nche_dos, namespace GlobalTemp { - -const ModuleBase::matrix* veff; - -} \ No newline at end of file + const ModuleBase::matrix* veff; +} diff --git a/source/module_esolver/test/esolver_dp_test.cpp b/source/module_esolver/test/esolver_dp_test.cpp index 8902c0e10a..8f9fe878a2 100644 --- a/source/module_esolver/test/esolver_dp_test.cpp +++ b/source/module_esolver/test/esolver_dp_test.cpp @@ -10,12 +10,12 @@ /** * - Tested Functions: - * - ESolver_DP::Init() - * - ESolver_DP::Run() - * - ESolver_DP::cal_Energy() - * - ESolver_DP::cal_Force() - * - ESolver_DP::cal_Stress() - * - ESolver_DP::postprocess() + * - ESolver_DP::init() + * - ESolver_DP::run() + * - ESolver_DP::cal_energy() + * - ESolver_DP::cal_force() + * - ESolver_DP::cal_stress() + * - ESolver_DP::post_process() * - ESolver_DP::type_map() */ namespace ModuleIO @@ -39,7 +39,7 @@ class ESolverDPTest : public ::testing::Test { // Initialize variables before each test esolver = new ModuleESolver::ESolver_DP("./support/case_1.pb"); - esolver->Init(inp, ucell); + esolver->init(inp, ucell); } void TearDown() override @@ -85,7 +85,7 @@ TEST_F(ESolverDPTest, InitCase2) esolver->dp_type[0] = 0; esolver->dp_type[1] = 0; esolver->dp_file = "./support/case_2.pb"; - esolver->Init(inp, ucell); + esolver->init(inp, ucell); // Check the initialized variables EXPECT_EQ(esolver->dp_type[0], 0); @@ -100,17 +100,17 @@ TEST_F(ESolverDPTest, RunWarningQuit) int istep = 0; testing::internal::CaptureStdout(); - EXPECT_EXIT(esolver->Run(istep, ucell), ::testing::ExitedWithCode(0), ""); + EXPECT_EXIT(esolver->run(istep, ucell), ::testing::ExitedWithCode(0), ""); std::string output = testing::internal::GetCapturedStdout(); EXPECT_THAT(output, testing::HasSubstr("Please recompile with -D__DPMD")); } -// Test the cal_Energy() funciton +// Test the cal_energy() funciton TEST_F(ESolverDPTest, CalEnergy) { double etot = 0.0; esolver->dp_potential = 9.8; - etot = esolver->cal_Energy(); + etot = esolver->cal_energy(); // Check the results EXPECT_DOUBLE_EQ(etot, 9.8); @@ -128,7 +128,7 @@ TEST_F(ESolverDPTest, CalForce) } } - esolver->cal_Force(force); + esolver->cal_force(force); // Check the results for (int i = 0; i < ucell.nat; ++i) @@ -152,7 +152,7 @@ TEST_F(ESolverDPTest, CalStress) } } - esolver->cal_Stress(stress); + esolver->cal_stress(stress); // Check the results for (int i = 0; i < 3; ++i) @@ -171,7 +171,7 @@ TEST_F(ESolverDPTest, Postprocess) // Check the results GlobalV::ofs_running.open("log"); - esolver->postprocess(); + esolver->post_process(); GlobalV::ofs_running.close(); std::string expected_output = "\n\n --------------------------------------------\n !FINAL_ETOT_IS 133.3358404 eV\n " @@ -230,4 +230,4 @@ TEST_F(ESolverDPTest, TypeMapWarningQuit) EXPECT_EXIT(esolver->type_map(ucell), ::testing::ExitedWithCode(0), ""); std::string output = testing::internal::GetCapturedStdout(); EXPECT_THAT(output, testing::HasSubstr("can not find the DP model")); -} \ No newline at end of file +} diff --git a/source/module_hamilt_general/module_xc/xc_functional_gradcorr.cpp b/source/module_hamilt_general/module_xc/xc_functional_gradcorr.cpp index 75acbbcfe4..4d373ef950 100644 --- a/source/module_hamilt_general/module_xc/xc_functional_gradcorr.cpp +++ b/source/module_hamilt_general/module_xc/xc_functional_gradcorr.cpp @@ -233,9 +233,10 @@ void XC_Functional::gradcorr(double &etxc, double &vtxc, ModuleBase::matrix &v, if(arho > epsr) { grho2a = gdr1[ir].norm2(); - + + //normally values in rhotmp can either be >= 0 or < 0. if( rhotmp1[ir] >= 0.0 ) segno = 1.0; - if( rhotmp1[ir] < 0.0 ) segno = -1.0; + else segno = -1.0; if (use_libxc && is_stress) { #ifdef USE_LIBXC diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/CMakeLists.txt b/source/module_hamilt_lcao/hamilt_lcaodft/CMakeLists.txt index b61a497751..3a6bcdd3fd 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/CMakeLists.txt +++ b/source/module_hamilt_lcao/hamilt_lcaodft/CMakeLists.txt @@ -14,12 +14,17 @@ if(ENABLE_LCAO) operator_lcao/td_ekinetic_lcao.cpp operator_lcao/td_nonlocal_lcao.cpp operator_lcao/sc_lambda_lcao.cpp + operator_lcao/dftu_new.cpp FORCE_STRESS.cpp FORCE_gamma.cpp FORCE_gamma_edm.cpp FORCE_gamma_tvnl.cpp FORCE_gamma_vl.cpp FORCE_k.cpp + foverlap_k.cpp + ftvnl_dphi_k.cpp + fvl_dphi_k.cpp + fvnl_dbeta_k.cpp LCAO_gen_fixedH.cpp LCAO_hamilt.cpp LCAO_matrix.cpp @@ -47,4 +52,4 @@ if(ENABLE_LCAO) add_coverage(hamilt_lcao) endif() -endif() \ No newline at end of file +endif() diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.cpp index cefbbe4ab9..e6944bd2cc 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.cpp @@ -14,6 +14,7 @@ #include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" //caoyu add for deepks 2021-06-03 #include "module_elecstate/elecstate_lcao.h" #endif +#include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_new.h" template Force_Stress_LCAO::Force_Stress_LCAO(Record_adj& ra, const int nat_in) : RA(&ra), f_pw(nat_in), nat(nat_in) @@ -28,11 +29,15 @@ void Force_Stress_LCAO::getForceStress(const bool isforce, const bool isstress, const bool istestf, const bool istests, - Local_Orbital_Charge& loc, + Local_Orbital_Charge &loc, + Parallel_Orbitals &pv, + LCAO_Matrix &lm, const elecstate::ElecState* pelec, const psi::Psi* psi, - LCAO_Hamilt& uhm, - ModuleBase::matrix& fcs, + LCAO_Hamilt& uhm, + Gint_Gamma &gint_gamma, // mohan add 2024-04-01 + Gint_k &gint_k, // mohan add 2024-04-01 + ModuleBase::matrix& fcs, ModuleBase::matrix& scs, const Structure_Factor& sf, const K_Vectors& kv, @@ -135,7 +140,7 @@ void Force_Stress_LCAO::getForceStress(const bool isforce, //-------------------------------------------------------- // implement four terms which needs integration //-------------------------------------------------------- - this->calForceStressIntegralPart(GlobalV::GAMMA_ONLY_LOCAL, + this->integral_part(GlobalV::GAMMA_ONLY_LOCAL, isforce, isstress, loc, @@ -154,8 +159,13 @@ void Force_Stress_LCAO::getForceStress(const bool isforce, #else svl_dphi, #endif - uhm, + uhm, + gint_gamma, + gint_k, + pv, + lm, kv); + // implement vdw force or stress here // Peize Lin add 2014-04-04, update 2021-03-09 // jiyy add 2019-05-18, update 2021-05-02 @@ -224,12 +234,29 @@ void Force_Stress_LCAO::getForceStress(const bool isforce, { stress_dftu.create(3, 3); } - GlobalC::dftu.force_stress(pelec, *uhm.LM, force_dftu, stress_dftu, kv); + if(GlobalV::dft_plus_u == 2) + { + GlobalC::dftu.force_stress(pelec, *uhm.LM, force_dftu, stress_dftu, kv); + } + else + { + hamilt::DFTUNew> tmp_dftu(uhm.LM, + kv.kvec_d, + nullptr, + nullptr, + &GlobalC::ucell, + &GlobalC::GridD, + &GlobalC::dftu, + uhm.LM->ParaV); + tmp_dftu.cal_force_stress(isforce, isstress, force_dftu, stress_dftu); + } } + if (!GlobalV::GAMMA_ONLY_LOCAL) { - this->flk.finish_k(); + this->flk.finish_k(lm); } + #ifdef __EXX // Force and Stress contribution from exx ModuleBase::matrix force_exx; @@ -466,6 +493,10 @@ void Force_Stress_LCAO::getForceStress(const bool isforce, ModuleIO::print_force(GlobalV::ofs_running, GlobalC::ucell, "VDW FORCE", force_vdw, 0); // this->print_force("VDW FORCE",force_vdw,1,ry); } + if (GlobalV::dft_plus_u) + { + ModuleIO::print_force(GlobalV::ofs_running, GlobalC::ucell, "DFT+U FORCE", force_dftu, 0); + } #ifdef __DEEPKS // caoyu add 2021-06-03 if (GlobalV::deepks_scf) @@ -692,7 +723,8 @@ void Force_Stress_LCAO::calForcePwPart(ModuleBase::matrix& fvl_dvl, // overlap, kinetic, nonlocal pseudopotential, Local potential terms in force and stress template<> -void Force_Stress_LCAO::calForceStressIntegralPart(const bool isGammaOnly, +void Force_Stress_LCAO::integral_part( + const bool isGammaOnly, const bool isforce, const bool isstress, Local_Orbital_Charge& loc, @@ -711,9 +743,14 @@ void Force_Stress_LCAO::calForceStressIntegralPart(const bool isGammaOnl #else ModuleBase::matrix& svl_dphi, #endif - LCAO_Hamilt& uhm, + LCAO_Hamilt &uhm, + Gint_Gamma &gint_gamma, // mohan add 2024-04-01 + Gint_k &gint_k, // mohan add 2024-04-01 + Parallel_Orbitals &pv, + LCAO_Matrix &lm, const K_Vectors& kv) { + flk.ftable_gamma(isforce, isstress, psi, @@ -732,11 +769,16 @@ void Force_Stress_LCAO::calForceStressIntegralPart(const bool isGammaOnl #else svl_dphi, #endif - uhm); + uhm, + gint_gamma, + lm); return; } + + template<> -void Force_Stress_LCAO>::calForceStressIntegralPart(const bool isGammaOnly, +void Force_Stress_LCAO>::integral_part( + const bool isGammaOnly, const bool isforce, const bool isstress, Local_Orbital_Charge& loc, @@ -755,8 +797,12 @@ void Force_Stress_LCAO>::calForceStressIntegralPart(const b #else ModuleBase::matrix& svl_dphi, #endif - LCAO_Hamilt& uhm, - const K_Vectors& kv) + LCAO_Hamilt &uhm, + Gint_Gamma &gint_gamma, + Gint_k &gint_k, + Parallel_Orbitals &pv, + LCAO_Matrix &lm, + const K_Vectors& kv) { flk.ftable_k(isforce, isstress, @@ -777,8 +823,11 @@ void Force_Stress_LCAO>::calForceStressIntegralPart(const b #else svl_dphi, #endif - uhm, - kv); + uhm, + gint_k, + pv, + lm, + kv); return; } @@ -884,4 +933,4 @@ void Force_Stress_LCAO::forceSymmetry(ModuleBase::matrix& fcs, ModuleSymmetry } template class Force_Stress_LCAO; -template class Force_Stress_LCAO>; \ No newline at end of file +template class Force_Stress_LCAO>; diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.h b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.h index ccca8073ff..1604fd76cc 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_STRESS.h @@ -13,6 +13,8 @@ #ifdef __EXX #include "module_ri/Exx_LRI.h" #endif +#include "module_hamilt_lcao/module_gint/gint_gamma.h" +#include "module_hamilt_lcao/module_gint/gint_k.h" template class Force_Stress_LCAO @@ -30,10 +32,14 @@ class Force_Stress_LCAO const bool isstress, const bool istestf, const bool istests, - Local_Orbital_Charge& loc, - const elecstate::ElecState* pelec, + Local_Orbital_Charge& loc, + Parallel_Orbitals &pv, + LCAO_Matrix &lm, + const elecstate::ElecState* pelec, const psi::Psi* psi, - LCAO_Hamilt& uhm, + LCAO_Hamilt& uhm, + Gint_Gamma &gint_gamma, // mohan add 2024-04-01 + Gint_k &gint_k, // mohan add 2024-04-01 ModuleBase::matrix& fcs, ModuleBase::matrix& scs, const Structure_Factor& sf, @@ -66,7 +72,8 @@ class Force_Stress_LCAO ModulePW::PW_Basis* rhopw, const Structure_Factor& sf); - void calForceStressIntegralPart(const bool isGammaOnly, + void integral_part( + const bool isGammaOnly, const bool isforce, const bool isstress, Local_Orbital_Charge& loc, @@ -85,8 +92,12 @@ class Force_Stress_LCAO #else ModuleBase::matrix& svl_dphi, #endif - LCAO_Hamilt& uhm, - const K_Vectors& kv); + LCAO_Hamilt &uhm, + Gint_Gamma &gint_gamma, + Gint_k &gint_k, + Parallel_Orbitals &pv, + LCAO_Matrix &lm, + const K_Vectors& kv); void calStressPwPart(ModuleBase::matrix& sigmadvl, ModuleBase::matrix& sigmahar, diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.cpp index 1db8883136..0b5835446b 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.cpp @@ -38,7 +38,9 @@ void Force_LCAO_gamma::ftable_gamma(const bool isforce, #else ModuleBase::matrix& svl_dphi, #endif - LCAO_Hamilt& uhm) + LCAO_Hamilt &uhm, + Gint_Gamma &gint_gamma, + LCAO_Matrix &lm) { ModuleBase::TITLE("Force_LCAO_gamma", "ftable"); ModuleBase::timer::tick("Force_LCAO_gamma", "ftable_gamma"); @@ -49,22 +51,21 @@ void Force_LCAO_gamma::ftable_gamma(const bool isforce, this->ParaV = DM->get_paraV_pointer(); //const Parallel_Orbitals* pv = loc.ParaV; - this->UHM = &uhm; // allocate DSloc_x, DSloc_y, DSloc_z // allocate DHloc_fixed_x, DHloc_fixed_y, DHloc_fixed_z - this->allocate_gamma(*this->ParaV); + this->allocate_gamma(*this->ParaV, uhm.genH, lm); // calculate the 'energy density matrix' here. - this->cal_foverlap(isforce, isstress, psid, pelec, foverlap, soverlap); + this->cal_foverlap(isforce, isstress, psid, pelec, lm, foverlap, soverlap); // sum up the density matrix with different spin // DM->sum_DMR_spin(); // - this->cal_ftvnl_dphi(DM, isforce, isstress, ftvnl_dphi, stvnl_dphi); + this->cal_ftvnl_dphi(DM, lm, isforce, isstress, ftvnl_dphi, stvnl_dphi); this->cal_fvnl_dbeta(DM, isforce, isstress, fvnl_dbeta, svnl_dbeta); - this->cal_fvl_dphi(loc.DM, isforce, isstress, pelec->pot, fvl_dphi, svl_dphi); + this->cal_fvl_dphi(loc.DM, isforce, isstress, pelec->pot, gint_gamma, fvl_dphi, svl_dphi); // caoyu add for DeePKS #ifdef __DEEPKS @@ -119,13 +120,16 @@ void Force_LCAO_gamma::ftable_gamma(const bool isforce, // delete DSloc_x, DSloc_y, DSloc_z // delete DHloc_fixed_x, DHloc_fixed_y, DHloc_fixed_z - this->finish_ftable_gamma(); + this->finish_ftable_gamma(lm); ModuleBase::timer::tick("Force_LCAO_gamma", "ftable_gamma"); return; } -void Force_LCAO_gamma::allocate_gamma(const Parallel_Orbitals& pv) +void Force_LCAO_gamma::allocate_gamma( + const Parallel_Orbitals &pv, + LCAO_gen_fixedH &gen_h, + LCAO_Matrix &lm) { ModuleBase::TITLE("Force_LCAO_gamma", "allocate_gamma"); ModuleBase::timer::tick("Force_LCAO_gamma", "allocate_gamma"); @@ -138,108 +142,134 @@ void Force_LCAO_gamma::allocate_gamma(const Parallel_Orbitals& pv) // liaochen add on 2010/7/12 // save the results in dense matrix by now. // pv.nloc: number of H elements in this proc. - this->UHM->LM->DSloc_x = new double[pv.nloc]; - this->UHM->LM->DSloc_y = new double[pv.nloc]; - this->UHM->LM->DSloc_z = new double[pv.nloc]; - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DSloc_x, pv.nloc); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DSloc_y, pv.nloc); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DSloc_z, pv.nloc); + lm.DSloc_x = new double[pv.nloc]; + lm.DSloc_y = new double[pv.nloc]; + lm.DSloc_z = new double[pv.nloc]; + ModuleBase::GlobalFunc::ZEROS(lm.DSloc_x, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DSloc_y, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DSloc_z, pv.nloc); ModuleBase::Memory::record("Force::dS_GO", sizeof(double) * pv.nloc * 3); // allocate stress part in gamma_only-line, added by zhengdy-stress if (GlobalV::CAL_STRESS) { - this->UHM->LM->DSloc_11 = new double[pv.nloc]; - this->UHM->LM->DSloc_12 = new double[pv.nloc]; - this->UHM->LM->DSloc_13 = new double[pv.nloc]; - this->UHM->LM->DSloc_22 = new double[pv.nloc]; - this->UHM->LM->DSloc_23 = new double[pv.nloc]; - this->UHM->LM->DSloc_33 = new double[pv.nloc]; - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DSloc_11, pv.nloc); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DSloc_12, pv.nloc); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DSloc_13, pv.nloc); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DSloc_22, pv.nloc); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DSloc_23, pv.nloc); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DSloc_33, pv.nloc); - this->UHM->LM->DHloc_fixed_11 = new double[pv.nloc]; - this->UHM->LM->DHloc_fixed_12 = new double[pv.nloc]; - this->UHM->LM->DHloc_fixed_13 = new double[pv.nloc]; - this->UHM->LM->DHloc_fixed_22 = new double[pv.nloc]; - this->UHM->LM->DHloc_fixed_23 = new double[pv.nloc]; - this->UHM->LM->DHloc_fixed_33 = new double[pv.nloc]; - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DHloc_fixed_11, pv.nloc); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DHloc_fixed_12, pv.nloc); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DHloc_fixed_13, pv.nloc); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DHloc_fixed_22, pv.nloc); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DHloc_fixed_23, pv.nloc); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DHloc_fixed_33, pv.nloc); + lm.DSloc_11 = new double[pv.nloc]; + lm.DSloc_12 = new double[pv.nloc]; + lm.DSloc_13 = new double[pv.nloc]; + lm.DSloc_22 = new double[pv.nloc]; + lm.DSloc_23 = new double[pv.nloc]; + lm.DSloc_33 = new double[pv.nloc]; + ModuleBase::GlobalFunc::ZEROS(lm.DSloc_11, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DSloc_12, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DSloc_13, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DSloc_22, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DSloc_23, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DSloc_33, pv.nloc); + lm.DHloc_fixed_11 = new double[pv.nloc]; + lm.DHloc_fixed_12 = new double[pv.nloc]; + lm.DHloc_fixed_13 = new double[pv.nloc]; + lm.DHloc_fixed_22 = new double[pv.nloc]; + lm.DHloc_fixed_23 = new double[pv.nloc]; + lm.DHloc_fixed_33 = new double[pv.nloc]; + ModuleBase::GlobalFunc::ZEROS(lm.DHloc_fixed_11, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DHloc_fixed_12, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DHloc_fixed_13, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DHloc_fixed_22, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DHloc_fixed_23, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DHloc_fixed_33, pv.nloc); ModuleBase::Memory::record("Stress::dSH_GO", sizeof(double) * pv.nloc * 12); } // calculate dS in LCAO basis // ModuleBase::timer::tick("Force_LCAO_gamma","build_S_new"); - this->UHM->genH.build_ST_new('S', cal_deri, GlobalC::ucell, this->UHM->LM->Sloc.data()); + gen_h.build_ST_new('S', cal_deri, GlobalC::ucell, lm.Sloc.data()); // ModuleBase::timer::tick("Force_LCAO_gamma","build_S_new"); // calculate dT in LCAP // allocation dt // liaochen add on 2010/7/12 - this->UHM->LM->DHloc_fixed_x = new double[pv.nloc]; - this->UHM->LM->DHloc_fixed_y = new double[pv.nloc]; - this->UHM->LM->DHloc_fixed_z = new double[pv.nloc]; + lm.DHloc_fixed_x = new double[pv.nloc]; + lm.DHloc_fixed_y = new double[pv.nloc]; + lm.DHloc_fixed_z = new double[pv.nloc]; ModuleBase::Memory::record("Force::dTVNL", sizeof(double) * pv.nloc * 3); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DHloc_fixed_x, pv.nloc); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DHloc_fixed_y, pv.nloc); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DHloc_fixed_z, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DHloc_fixed_x, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DHloc_fixed_y, pv.nloc); + ModuleBase::GlobalFunc::ZEROS(lm.DHloc_fixed_z, pv.nloc); // calculate dT // calculate T + VNL(P1) in LCAO basis // ModuleBase::timer::tick("Force_LCAO_gamma","build_T_new"); - this->UHM->genH.build_ST_new('T', cal_deri, GlobalC::ucell, this->UHM->LM->Hloc_fixed.data()); + gen_h.build_ST_new('T', cal_deri, GlobalC::ucell, lm.Hloc_fixed.data()); // ModuleBase::timer::tick("Force_LCAO_gamma","build_T_new"); - // test_gamma(this->UHM->LM->DHloc_fixed_x, "dHloc_fixed_x T part"); + // test_gamma(lm.DHloc_fixed_x, "dHloc_fixed_x T part"); // ModuleBase::timer::tick("Force_LCAO_gamma","build_Nonlocal_mu"); - this->UHM->genH.build_Nonlocal_mu_new(this->UHM->genH.LM->Hloc_fixed.data(), cal_deri); + gen_h.build_Nonlocal_mu_new(lm.Hloc_fixed.data(), cal_deri); // ModuleBase::timer::tick("Force_LCAO_gamma","build_Nonlocal_mu"); - // test_gamma(this->UHM->LM->DHloc_fixed_x, "dHloc_fixed_x Vnl part"); + // test_gamma(lm.DHloc_fixed_x, "dHloc_fixed_x Vnl part"); // calculate asynchronous S matrix to output for Hefei-NAMD if (INPUT.cal_syns) { cal_deri = false; - this->UHM->genH.LM->zeros_HSgamma('S'); - this->UHM->genH - .build_ST_new('S', cal_deri, GlobalC::ucell, this->UHM->genH.LM->Sloc.data(), INPUT.cal_syns, INPUT.dmax); + + lm.zeros_HSgamma('S'); + + gen_h.build_ST_new('S', cal_deri, GlobalC::ucell, + + lm.Sloc.data(), INPUT.cal_syns, INPUT.dmax); + bool bit = false; // LiuXh, 2017-03-21 - ModuleIO::save_mat(0, this->UHM->genH.LM->Hloc.data(), GlobalV::NLOCAL, bit, GlobalV::out_ndigits, 0, GlobalV::out_app_flag, "H", "data-" + std::to_string(0), *this->ParaV, GlobalV::DRANK); - ModuleIO::save_mat(0, this->UHM->genH.LM->Sloc.data(), GlobalV::NLOCAL, bit, GlobalV::out_ndigits, 0, GlobalV::out_app_flag, "S", "data-" + std::to_string(0), *this->ParaV, GlobalV::DRANK); - } + + ModuleIO::save_mat(0, + lm.Hloc.data(), + GlobalV::NLOCAL, + bit, + GlobalV::out_ndigits, + 0, + GlobalV::out_app_flag, + "H", + "data-" + std::to_string(0), + *this->ParaV, + GlobalV::DRANK); + + ModuleIO::save_mat(0, + lm.Sloc.data(), + GlobalV::NLOCAL, + bit, + GlobalV::out_ndigits, + 0, + GlobalV::out_app_flag, + "S", + "data-" + std::to_string(0), + *this->ParaV, + GlobalV::DRANK); + } ModuleBase::timer::tick("Force_LCAO_gamma", "allocate_gamma"); return; } -void Force_LCAO_gamma::finish_ftable_gamma(void) +void Force_LCAO_gamma::finish_ftable_gamma(LCAO_Matrix &lm) { - delete[] this->UHM->LM->DSloc_x; - delete[] this->UHM->LM->DSloc_y; - delete[] this->UHM->LM->DSloc_z; - delete[] this->UHM->LM->DHloc_fixed_x; - delete[] this->UHM->LM->DHloc_fixed_y; - delete[] this->UHM->LM->DHloc_fixed_z; + delete[] lm.DSloc_x; + delete[] lm.DSloc_y; + delete[] lm.DSloc_z; + delete[] lm.DHloc_fixed_x; + delete[] lm.DHloc_fixed_y; + delete[] lm.DHloc_fixed_z; if (GlobalV::CAL_STRESS) // added by zhengdy-stress { - delete[] this->UHM->LM->DSloc_11; - delete[] this->UHM->LM->DSloc_12; - delete[] this->UHM->LM->DSloc_13; - delete[] this->UHM->LM->DHloc_fixed_11; - delete[] this->UHM->LM->DHloc_fixed_12; - delete[] this->UHM->LM->DHloc_fixed_13; - delete[] this->UHM->LM->DSloc_22; - delete[] this->UHM->LM->DSloc_23; - delete[] this->UHM->LM->DSloc_33; - delete[] this->UHM->LM->DHloc_fixed_22; - delete[] this->UHM->LM->DHloc_fixed_23; - delete[] this->UHM->LM->DHloc_fixed_33; + delete[] lm.DSloc_11; + delete[] lm.DSloc_12; + delete[] lm.DSloc_13; + delete[] lm.DHloc_fixed_11; + delete[] lm.DHloc_fixed_12; + delete[] lm.DHloc_fixed_13; + delete[] lm.DSloc_22; + delete[] lm.DSloc_23; + delete[] lm.DSloc_33; + delete[] lm.DHloc_fixed_22; + delete[] lm.DHloc_fixed_23; + delete[] lm.DHloc_fixed_33; } return; } @@ -282,4 +312,4 @@ void stress_fill(const double& lat0_, const double& omega_, ModuleBase::matrix& } } } -} // namespace StressTools \ No newline at end of file +} // namespace StressTools diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.h b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.h index e9efd88b42..c8fe00c040 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma.h @@ -9,6 +9,7 @@ #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.h" #include "module_hamilt_lcao/hamilt_lcaodft/local_orbital_charge.h" #include "module_psi/psi.h" +#include "module_hamilt_lcao/module_gint/gint_gamma.h" class Force_LCAO_gamma { @@ -20,8 +21,9 @@ class Force_LCAO_gamma ~Force_LCAO_gamma(); private: - LCAO_Hamilt* UHM; + const Parallel_Orbitals* ParaV; + elecstate::Potential* pot; // orthonormal force + contribution from T and VNL @@ -43,12 +45,19 @@ class Force_LCAO_gamma #else ModuleBase::matrix& svl_dphi, #endif - LCAO_Hamilt& uhm); + LCAO_Hamilt& uhm, + Gint_Gamma &gint_gamma, + LCAO_Matrix& lm); + + // get the ds, dt, dvnl. - void allocate_gamma(const Parallel_Orbitals& pv); + void allocate_gamma( + const Parallel_Orbitals& pv, + LCAO_gen_fixedH &gen_h, + LCAO_Matrix &lm); - void finish_ftable_gamma(void); + void finish_ftable_gamma(LCAO_Matrix &lm); void average_force(double* fm); @@ -61,15 +70,17 @@ class Force_LCAO_gamma void cal_foverlap(const bool isforce, const bool isstress, - const psi::Psi* psid, - const elecstate::ElecState* pelec, - ModuleBase::matrix& foverlap, - ModuleBase::matrix& soverlap); + const psi::Psi *psid, + const elecstate::ElecState *pelec, + LCAO_Matrix &lm, + ModuleBase::matrix &foverlap, + ModuleBase::matrix &soverlap); //------------------------------------------------------------- // forces related to kinetic and non-local pseudopotentials //-------------------------------------------------------------- void cal_ftvnl_dphi(const elecstate::DensityMatrix* DM, + LCAO_Matrix &lm, const bool isforce, const bool isstress, ModuleBase::matrix& ftvnl_dphi, @@ -88,6 +99,7 @@ class Force_LCAO_gamma const bool isforce, const bool isstress, const elecstate::Potential* pot_in, + Gint_Gamma &gint_gamma, // mohan add 2024-04-01 ModuleBase::matrix& fvl_dphi, ModuleBase::matrix& svl_dphi); }; diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_edm.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_edm.cpp index a69821c50c..e719bc8537 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_edm.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_edm.cpp @@ -11,10 +11,11 @@ void Force_LCAO_gamma::cal_foverlap( const bool isforce, const bool isstress, - const psi::Psi* psid, - const elecstate::ElecState* pelec, - ModuleBase::matrix& foverlap, - ModuleBase::matrix& soverlap) + const psi::Psi *psid, + const elecstate::ElecState *pelec, + LCAO_Matrix &lm, + ModuleBase::matrix &foverlap, + ModuleBase::matrix &soverlap) { ModuleBase::TITLE("Force_LCAO_gamma","cal_foverlap"); ModuleBase::timer::tick("Force_LCAO_gamma","cal_foverlap"); @@ -61,19 +62,19 @@ void Force_LCAO_gamma::cal_foverlap( if(isforce) { - foverlap(iat,0) += sum * this->UHM->LM->DSloc_x[index]; - foverlap(iat,1) += sum * this->UHM->LM->DSloc_y[index]; - foverlap(iat,2) += sum * this->UHM->LM->DSloc_z[index]; + foverlap(iat,0) += sum * lm.DSloc_x[index]; + foverlap(iat,1) += sum * lm.DSloc_y[index]; + foverlap(iat,2) += sum * lm.DSloc_z[index]; } if(isstress) { - soverlap(0,0) += sum/2.0 * this->UHM->LM->DSloc_11[index]; - soverlap(0,1) += sum/2.0 * this->UHM->LM->DSloc_12[index]; - soverlap(0,2) += sum/2.0 * this->UHM->LM->DSloc_13[index]; - soverlap(1,1) += sum/2.0 * this->UHM->LM->DSloc_22[index]; - soverlap(1,2) += sum/2.0 * this->UHM->LM->DSloc_23[index]; - soverlap(2,2) += sum/2.0 * this->UHM->LM->DSloc_33[index]; + soverlap(0,0) += sum/2.0 * lm.DSloc_11[index]; + soverlap(0,1) += sum/2.0 * lm.DSloc_12[index]; + soverlap(0,2) += sum/2.0 * lm.DSloc_13[index]; + soverlap(1,1) += sum/2.0 * lm.DSloc_22[index]; + soverlap(1,2) += sum/2.0 * lm.DSloc_23[index]; + soverlap(2,2) += sum/2.0 * lm.DSloc_33[index]; } } diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_tvnl.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_tvnl.cpp index 3759f5f9a7..dd89912d1d 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_tvnl.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_tvnl.cpp @@ -237,6 +237,7 @@ void Force_LCAO_gamma::cal_fvnl_dbeta( void Force_LCAO_gamma::cal_ftvnl_dphi( const elecstate::DensityMatrix* DM, + LCAO_Matrix &lm, const bool isforce, const bool isstress, ModuleBase::matrix& ftvnl_dphi, @@ -268,25 +269,26 @@ void Force_LCAO_gamma::cal_ftvnl_dphi( if(isforce) { - ftvnl_dphi(iat,0) += sum * this->UHM->LM->DHloc_fixed_x[index]; - ftvnl_dphi(iat,1) += sum * this->UHM->LM->DHloc_fixed_y[index]; - ftvnl_dphi(iat,2) += sum * this->UHM->LM->DHloc_fixed_z[index]; + ftvnl_dphi(iat,0) += sum * lm.DHloc_fixed_x[index]; + ftvnl_dphi(iat,1) += sum * lm.DHloc_fixed_y[index]; + ftvnl_dphi(iat,2) += sum * lm.DHloc_fixed_z[index]; } if(isstress) { - stvnl_dphi(0,0) += sum/2.0 * this->UHM->LM->DHloc_fixed_11[index]; - stvnl_dphi(0,1) += sum/2.0 * this->UHM->LM->DHloc_fixed_12[index]; - stvnl_dphi(0,2) += sum/2.0 * this->UHM->LM->DHloc_fixed_13[index]; - stvnl_dphi(1,1) += sum/2.0 * this->UHM->LM->DHloc_fixed_22[index]; - stvnl_dphi(1,2) += sum/2.0 * this->UHM->LM->DHloc_fixed_23[index]; - stvnl_dphi(2,2) += sum/2.0 * this->UHM->LM->DHloc_fixed_33[index]; + stvnl_dphi(0,0) += sum/2.0 * lm.DHloc_fixed_11[index]; + stvnl_dphi(0,1) += sum/2.0 * lm.DHloc_fixed_12[index]; + stvnl_dphi(0,2) += sum/2.0 * lm.DHloc_fixed_13[index]; + stvnl_dphi(1,1) += sum/2.0 * lm.DHloc_fixed_22[index]; + stvnl_dphi(1,2) += sum/2.0 * lm.DHloc_fixed_23[index]; + stvnl_dphi(2,2) += sum/2.0 * lm.DHloc_fixed_33[index]; } } } } - if(isstress){ - StressTools::stress_fill(GlobalC::ucell.lat0, GlobalC::ucell.omega, stvnl_dphi); - } + if(isstress) + { + StressTools::stress_fill(GlobalC::ucell.lat0, GlobalC::ucell.omega, stvnl_dphi); + } ModuleBase::timer::tick("Force_LCAO_gamma","cal_ftvnl_dphi"); return; -} \ No newline at end of file +} diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_vl.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_vl.cpp index 6e97123cd0..5ce367c568 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_vl.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_gamma_vl.cpp @@ -7,6 +7,7 @@ void Force_LCAO_gamma::cal_fvl_dphi( const bool isforce, const bool isstress, const elecstate::Potential* pot_in, + Gint_Gamma &gint_gamma, ModuleBase::matrix& fvl_dphi, ModuleBase::matrix& svl_dphi) { @@ -27,13 +28,22 @@ void Force_LCAO_gamma::cal_fvl_dphi( if(XC_Functional::get_func_type()==3 || XC_Functional::get_func_type()==5) { - Gint_inout inout(DM_in, is, vr_eff1, vofk_eff1, isforce, isstress, &fvl_dphi, &svl_dphi, Gint_Tools::job_type::force_meta); - this->UHM->GG.cal_gint(&inout); + Gint_inout inout(DM_in, + is, + vr_eff1, + vofk_eff1, + isforce, + isstress, + &fvl_dphi, + &svl_dphi, + Gint_Tools::job_type::force_meta); + + gint_gamma.cal_gint(&inout); } else { Gint_inout inout(DM_in, is, vr_eff1, isforce, isstress, &fvl_dphi, &svl_dphi, Gint_Tools::job_type::force); - this->UHM->GG.cal_gint(&inout); + gint_gamma.cal_gint(&inout); } } @@ -50,4 +60,4 @@ void Force_LCAO_gamma::cal_fvl_dphi( } } ModuleBase::timer::tick("Force_LCAO_gamma","cal_fvl_dphi"); -} \ No newline at end of file +} diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp index 918d4c5346..98fd937979 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.cpp @@ -50,36 +50,70 @@ void Force_LCAO_k::ftable_k(const bool isforce, #else ModuleBase::matrix& svl_dphi, #endif - LCAO_Hamilt& uhm, + LCAO_Hamilt &uhm, + Gint_k &gint_k, + Parallel_Orbitals &pv, + LCAO_Matrix &lm, const K_Vectors& kv) { ModuleBase::TITLE("Force_LCAO_k", "ftable_k"); ModuleBase::timer::tick("Force_LCAO_k", "ftable_k"); - this->UHM = &uhm; - elecstate::DensityMatrix,double>* DM = dynamic_cast>*>(pelec)->get_DM(); - this->ParaV = DM->get_paraV_pointer(); - const Parallel_Orbitals* pv = this->ParaV; - //const Parallel_Orbitals* pv = loc.ParaV; - this->allocate_k(*this->ParaV, kv.nks, kv.kvec_d); + this->allocate_k( + pv, + lm, + uhm.genH, + kv.nks, + kv.kvec_d); // calculate the energy density matrix // and the force related to overlap matrix and energy density matrix. - this->cal_foverlap_k(isforce, isstress, ra, psi, loc, DM, foverlap, soverlap, pelec, kv.nks, kv); - - //DM->sum_DMR_spin(); - - this->cal_ftvnl_dphi_k(DM, isforce, isstress, ra, ftvnl_dphi, stvnl_dphi); - - // --------------------------------------- - // doing on the real space grid. - // --------------------------------------- - this->cal_fvl_dphi_k(isforce, isstress, pelec->pot, fvl_dphi, svl_dphi, loc.DM_R); - - this->cal_fvnl_dbeta_k(DM, isforce, isstress, fvnl_dbeta, svnl_dbeta); + this->cal_foverlap_k( + isforce, + isstress, + ra, + psi, + loc, + pv, + lm, + DM, + foverlap, + soverlap, + pelec, + kv.nks, + kv); + + this->cal_ftvnl_dphi_k( + DM, + pv, + lm, + isforce, + isstress, + ra, + ftvnl_dphi, + stvnl_dphi); + + // doing on the real space grid. + this->cal_fvl_dphi_k( + isforce, + isstress, + lm, + gint_k, + pelec->pot, + fvl_dphi, + svl_dphi, + loc.DM_R); + + this->cal_fvnl_dbeta_k( + DM, + isforce, + isstress, + pv, + fvnl_dbeta, + svnl_dbeta); #ifdef __DEEPKS if (GlobalV::deepks_scf) @@ -149,49 +183,59 @@ void Force_LCAO_k::ftable_k(const bool isforce, } void Force_LCAO_k::allocate_k(const Parallel_Orbitals& pv, + LCAO_Matrix &lm, + LCAO_gen_fixedH &gen_h, const int& nks, const std::vector>& kvec_d) { ModuleBase::TITLE("Force_LCAO_k", "allocate_k"); ModuleBase::timer::tick("Force_LCAO_k", "allocate_k"); - this->ParaV = &pv; const int nnr = pv.nnr; + + assert(nnr>=0); + //-------------------------------- // (1) allocate for dSx dSy & dSz //-------------------------------- - this->UHM->LM->DSloc_Rx = new double[nnr]; - this->UHM->LM->DSloc_Ry = new double[nnr]; - this->UHM->LM->DSloc_Rz = new double[nnr]; - const auto init_DSloc_Rxyz = [this, nnr](int num_threads, int thread_id) { - int beg, len; - ModuleBase::BLOCK_TASK_DIST_1D(num_threads, thread_id, nnr, 1024, beg, len); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DSloc_Rx + beg, len); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DSloc_Ry + beg, len); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DSloc_Rz + beg, len); - }; + lm.DSloc_Rx = new double[nnr]; + lm.DSloc_Ry = new double[nnr]; + lm.DSloc_Rz = new double[nnr]; + + // mohan add lm on 2024-03-31 + const auto init_DSloc_Rxyz = [this, nnr, &lm](int num_threads, int thread_id) + { + int beg=0; + int len=0; + ModuleBase::BLOCK_TASK_DIST_1D(num_threads, thread_id, nnr, 1024, beg, len); + ModuleBase::GlobalFunc::ZEROS(lm.DSloc_Rx + beg, len); + ModuleBase::GlobalFunc::ZEROS(lm.DSloc_Ry + beg, len); + ModuleBase::GlobalFunc::ZEROS(lm.DSloc_Rz + beg, len); + }; + ModuleBase::OMP_PARALLEL(init_DSloc_Rxyz); ModuleBase::Memory::record("Force::dS_K", sizeof(double) * nnr * 3); if (GlobalV::CAL_STRESS) { - this->UHM->LM->DH_r = new double[3 * nnr]; - this->UHM->LM->stvnl11 = new double[nnr]; - this->UHM->LM->stvnl12 = new double[nnr]; - this->UHM->LM->stvnl13 = new double[nnr]; - this->UHM->LM->stvnl22 = new double[nnr]; - this->UHM->LM->stvnl23 = new double[nnr]; - this->UHM->LM->stvnl33 = new double[nnr]; - const auto init_DH_r_stvnl = [this, nnr](int num_threads, int thread_id) { + lm.DH_r = new double[3 * nnr]; + lm.stvnl11 = new double[nnr]; + lm.stvnl12 = new double[nnr]; + lm.stvnl13 = new double[nnr]; + lm.stvnl22 = new double[nnr]; + lm.stvnl23 = new double[nnr]; + lm.stvnl33 = new double[nnr]; + // mohan add lm on 2024-03-31 + const auto init_DH_r_stvnl = [this, nnr, &lm](int num_threads, int thread_id) { int beg, len; ModuleBase::BLOCK_TASK_DIST_1D(num_threads, thread_id, nnr, 1024, beg, len); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DH_r + 3 * beg, 3 * len); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->stvnl11 + beg, len); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->stvnl12 + beg, len); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->stvnl13 + beg, len); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->stvnl22 + beg, len); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->stvnl23 + beg, len); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->stvnl33 + beg, len); + ModuleBase::GlobalFunc::ZEROS(lm.DH_r + 3 * beg, 3 * len); + ModuleBase::GlobalFunc::ZEROS(lm.stvnl11 + beg, len); + ModuleBase::GlobalFunc::ZEROS(lm.stvnl12 + beg, len); + ModuleBase::GlobalFunc::ZEROS(lm.stvnl13 + beg, len); + ModuleBase::GlobalFunc::ZEROS(lm.stvnl22 + beg, len); + ModuleBase::GlobalFunc::ZEROS(lm.stvnl23 + beg, len); + ModuleBase::GlobalFunc::ZEROS(lm.stvnl33 + beg, len); }; ModuleBase::OMP_PARALLEL(init_DH_r_stvnl); @@ -203,48 +247,75 @@ void Force_LCAO_k::allocate_k(const Parallel_Orbitals& pv, // calculate dS = //----------------------------- bool cal_deri = true; - this->UHM->genH.build_ST_new('S', cal_deri, GlobalC::ucell, this->UHM->genH.LM->SlocR.data()); + gen_h.build_ST_new('S', cal_deri, GlobalC::ucell, gen_h.LM->SlocR.data()); //----------------------------------------- // (2) allocate for //----------------------------------------- - this->UHM->LM->DHloc_fixedR_x = new double[nnr]; - this->UHM->LM->DHloc_fixedR_y = new double[nnr]; - this->UHM->LM->DHloc_fixedR_z = new double[nnr]; - const auto init_DHloc_fixedR_xyz = [this, nnr](int num_threads, int thread_id) { - int beg, len; + lm.DHloc_fixedR_x = new double[nnr]; + lm.DHloc_fixedR_y = new double[nnr]; + lm.DHloc_fixedR_z = new double[nnr]; + + // mohan add lm on 2024-03-31 + const auto init_DHloc_fixedR_xyz = [this, nnr, &lm](int num_threads, int thread_id) { + int beg=0; + int len=0; ModuleBase::BLOCK_TASK_DIST_1D(num_threads, thread_id, nnr, 1024, beg, len); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DHloc_fixedR_x + beg, len); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DHloc_fixedR_y + beg, len); - ModuleBase::GlobalFunc::ZEROS(this->UHM->LM->DHloc_fixedR_z + beg, len); + ModuleBase::GlobalFunc::ZEROS(lm.DHloc_fixedR_x + beg, len); + ModuleBase::GlobalFunc::ZEROS(lm.DHloc_fixedR_y + beg, len); + ModuleBase::GlobalFunc::ZEROS(lm.DHloc_fixedR_z + beg, len); }; ModuleBase::OMP_PARALLEL(init_DHloc_fixedR_xyz); ModuleBase::Memory::record("Force::dTVNL", sizeof(double) * nnr * 3); // calculate dT= in LCAO // calculate T + VNL(P1) in LCAO basis - this->UHM->genH.build_ST_new('T', cal_deri, GlobalC::ucell, this->UHM->genH.LM->Hloc_fixedR.data()); - // test(this->UHM->LM->DHloc_fixedR_x,"this->UHM->LM->DHloc_fixedR_x T part"); + gen_h.build_ST_new('T', cal_deri, GlobalC::ucell, gen_h.LM->Hloc_fixedR.data()); // calculate dVnl= in LCAO - this->UHM->genH.build_Nonlocal_mu_new(this->UHM->genH.LM->Hloc_fixed.data(), cal_deri); - // test(this->UHM->LM->DHloc_fixedR_x,"this->UHM->LM->DHloc_fixedR_x Vnl part"); + gen_h.build_Nonlocal_mu_new(gen_h.LM->Hloc_fixed.data(), cal_deri); // calculate asynchronous S matrix to output for Hefei-NAMD if (INPUT.cal_syns) { cal_deri = false; - // this->UHM->genH.build_ST_new('S', cal_deri, GlobalC::ucell, this->UHM->genH.LM->SlocR.data(), - // INPUT.cal_syns); - this->UHM->genH - .build_ST_new('S', cal_deri, GlobalC::ucell, this->UHM->genH.LM->SlocR.data(), INPUT.cal_syns, INPUT.dmax); + // gen_h.build_ST_new('S', cal_deri, GlobalC::ucell, gen_h.LM->SlocR.data(), + // INPUT.cal_syns); + gen_h.build_ST_new('S', + cal_deri, + GlobalC::ucell, + lm.SlocR.data(), + INPUT.cal_syns, + INPUT.dmax); + for (int ik = 0; ik < nks; ik++) { - this->UHM->genH.LM->zeros_HSk('S'); - this->UHM->genH.LM->folding_fixedH(ik, kvec_d, 1); + lm.zeros_HSk('S'); + lm.folding_fixedH(ik, kvec_d, 1); bool bit = false; // LiuXh, 2017-03-21 - ModuleIO::save_mat(0, this->UHM->genH.LM->Hloc2.data(), GlobalV::NLOCAL, bit, GlobalV::out_ndigits, 0, GlobalV::out_app_flag, "H", "data-" + std::to_string(ik), *this->ParaV, GlobalV::DRANK); - ModuleIO::save_mat(0, this->UHM->genH.LM->Sloc2.data(), GlobalV::NLOCAL, bit, GlobalV::out_ndigits, 0, GlobalV::out_app_flag, "S", "data-" + std::to_string(ik), *this->ParaV, GlobalV::DRANK); + ModuleIO::save_mat(0, + lm.Hloc2.data(), + GlobalV::NLOCAL, + bit, + GlobalV::out_ndigits, + 0, + GlobalV::out_app_flag, + "H", + "data-" + std::to_string(ik), + pv, + GlobalV::DRANK); + + ModuleIO::save_mat(0, + lm.Sloc2.data(), + GlobalV::NLOCAL, + bit, + GlobalV::out_ndigits, + 0, + GlobalV::out_app_flag, + "S", + "data-" + std::to_string(ik), + pv, + GlobalV::DRANK); } } @@ -252,385 +323,41 @@ void Force_LCAO_k::allocate_k(const Parallel_Orbitals& pv, return; } -void Force_LCAO_k::finish_k(void) -{ - delete[] this->UHM->LM->DSloc_Rx; - delete[] this->UHM->LM->DSloc_Ry; - delete[] this->UHM->LM->DSloc_Rz; - delete[] this->UHM->LM->DHloc_fixedR_x; - delete[] this->UHM->LM->DHloc_fixedR_y; - delete[] this->UHM->LM->DHloc_fixedR_z; - if (GlobalV::CAL_STRESS) - { - delete[] this->UHM->LM->DH_r; - delete[] this->UHM->LM->stvnl11; - delete[] this->UHM->LM->stvnl12; - delete[] this->UHM->LM->stvnl13; - delete[] this->UHM->LM->stvnl22; - delete[] this->UHM->LM->stvnl23; - delete[] this->UHM->LM->stvnl33; - } - return; -} -#include "module_hamilt_lcao/hamilt_lcaodft/record_adj.h" -void Force_LCAO_k::cal_foverlap_k(const bool isforce, - const bool isstress, - Record_adj& ra, - const psi::Psi>* psi, - Local_Orbital_Charge& loc, - const elecstate::DensityMatrix, double>* DM, - ModuleBase::matrix& foverlap, - ModuleBase::matrix& soverlap, - const elecstate::ElecState* pelec, - const int& nks, - const K_Vectors& kv) +void Force_LCAO_k::finish_k(LCAO_Matrix &lm) { - ModuleBase::TITLE("Force_LCAO_k", "cal_foverlap_k"); - ModuleBase::timer::tick("Force_LCAO_k", "cal_foverlap_k"); + delete[] lm.DSloc_Rx; + delete[] lm.DSloc_Ry; + delete[] lm.DSloc_Rz; + delete[] lm.DHloc_fixedR_x; + delete[] lm.DHloc_fixedR_y; + delete[] lm.DHloc_fixedR_z; - const Parallel_Orbitals* pv = this->ParaV; - - // construct a DensityMatrix object - elecstate::DensityMatrix, double> EDM(&kv,pv,GlobalV::NSPIN); - - //-------------------------------------------- - // calculate the energy density matrix here. - //-------------------------------------------- - ModuleBase::timer::tick("Force_LCAO_k", "cal_edm_2d"); - - ModuleBase::matrix wgEkb; - wgEkb.create(nks, GlobalV::NBANDS); - ModuleBase::Memory::record("Force::wgEkb", sizeof(double) * nks * GlobalV::NBANDS); -#ifdef _OPENMP -#pragma omp parallel for collapse(2) schedule(static, 1024) -#endif - for (int ik = 0; ik < nks; ik++) - { - for (int ib = 0; ib < GlobalV::NBANDS; ib++) - { - wgEkb(ik, ib) = pelec->wg(ik, ib) * pelec->ekb(ik, ib); - } - } - std::vector edm_k(nks); - - // use the original formula (Hamiltonian matrix) to calculate energy density matrix - if (DM->EDMK.size()) - { -#ifdef _OPENMP -#pragma omp parallel for schedule(static, 1024) -#endif - for (int ik = 0; ik < nks; ++ik) - { - //edm_k[ik] = loc.edm_k_tddft[ik]; - EDM.set_DMK_pointer(ik,DM->EDMK[ik].c); - } - } - else - { - //elecstate::cal_dm(loc.ParaV, wgEkb, psi[0], edm_k); - // cal_dm_psi - elecstate::cal_dm_psi(EDM.get_paraV_pointer(), wgEkb, psi[0], EDM); - } - - //loc.cal_dm_R(edm_k, ra, edm2d, kv); - - // cal_dm_2d - EDM.init_DMR(ra,&GlobalC::ucell); - EDM.cal_DMR(); - EDM.sum_DMR_spin(); - // - ModuleBase::timer::tick("Force_LCAO_k", "cal_edm_2d"); - //-------------------------------------------- - // summation \sum_{i,j} E(i,j)*dS(i,j) - // BEGIN CALCULATION OF FORCE OF EACH ATOM - //-------------------------------------------- - int total_irr = 0; -#ifdef _OPENMP -#pragma omp parallel - { - int num_threads = omp_get_num_threads(); - ModuleBase::matrix local_soverlap(3, 3); - int local_total_irr = 0; -#else - ModuleBase::matrix& local_soverlap = soverlap; - int& local_total_irr = total_irr; -#endif - - ModuleBase::Vector3 tau1, dtau, tau2; - -#ifdef _OPENMP -#pragma omp for schedule(dynamic) -#endif - for (int iat = 0; iat < GlobalC::ucell.nat; iat++) - { - const int T1 = GlobalC::ucell.iat2it[iat]; - Atom* atom1 = &GlobalC::ucell.atoms[T1]; - const int I1 = GlobalC::ucell.iat2ia[iat]; - // get iat1 - int iat1 = GlobalC::ucell.itia2iat(T1, I1); - double* foverlap_iat; - if (isforce) - foverlap_iat = &foverlap(iat, 0); - -#ifdef _OPENMP - // using local stack to avoid false sharing in multi-threaded case - double foverlap_temp[3] = {0.0, 0.0, 0.0}; - if (num_threads > 1) - { - foverlap_iat = foverlap_temp; - } -#endif - int irr = pv->nlocstart[iat]; - const int start1 = GlobalC::ucell.itiaiw2iwt(T1, I1, 0); - for (int cb = 0; cb < ra.na_each[iat]; ++cb) - { - const int T2 = ra.info[iat][cb][3]; - const int I2 = ra.info[iat][cb][4]; - - const int start2 = GlobalC::ucell.itiaiw2iwt(T2, I2, 0); - - Atom* atom2 = &GlobalC::ucell.atoms[T2]; - - // get iat2 - int iat2 = GlobalC::ucell.itia2iat(T2, I2); - double Rx = ra.info[iat][cb][0]; - double Ry = ra.info[iat][cb][1]; - double Rz = ra.info[iat][cb][2]; - // get BaseMatrix - hamilt::BaseMatrix* tmp_matrix = EDM.get_DMR_pointer(1)->find_matrix(iat1, iat2, Rx, Ry, Rz); - if(tmp_matrix == nullptr) continue; - int row_ap = pv->atom_begin_row[iat1]; - int col_ap = pv->atom_begin_col[iat2]; - // get DMR - for (int mu = 0; mu < pv->get_row_size(iat1); ++mu) - { - for (int nu = 0; nu < pv->get_col_size(iat2); ++nu) - { - // here do not sum over spin due to EDM.sum_DMR_spin(); - double edm2d1 = tmp_matrix->get_value(mu,nu); - double edm2d2 = 2.0 * edm2d1; - - if (isforce) - { - foverlap_iat[0] -= edm2d2 * this->UHM->LM->DSloc_Rx[irr]; - foverlap_iat[1] -= edm2d2 * this->UHM->LM->DSloc_Ry[irr]; - foverlap_iat[2] -= edm2d2 * this->UHM->LM->DSloc_Rz[irr]; - } - if (isstress) - { - for (int ipol = 0; ipol < 3; ipol++) - { - local_soverlap(0, ipol) += edm2d1 * this->UHM->LM->DSloc_Rx[irr] - * this->UHM->LM->DH_r[irr * 3 + ipol]; - if (ipol < 1) - continue; - local_soverlap(1, ipol) += edm2d1 * this->UHM->LM->DSloc_Ry[irr] - * this->UHM->LM->DH_r[irr * 3 + ipol]; - if (ipol < 2) - continue; - local_soverlap(2, ipol) += edm2d1 * this->UHM->LM->DSloc_Rz[irr] - * this->UHM->LM->DH_r[irr * 3 + ipol]; - } - } - //} - ++local_total_irr; - ++irr; - } // end kk - } // end jj - } // end cb -#ifdef _OPENMP - if (isforce && num_threads > 1) - { - foverlap(iat, 0) += foverlap_iat[0]; - foverlap(iat, 1) += foverlap_iat[1]; - foverlap(iat, 2) += foverlap_iat[2]; - } -#endif - } // end iat -#ifdef _OPENMP -#pragma omp critical(cal_foverlap_k_reduce) - { - total_irr += local_total_irr; - if (isstress) - { - for (int ipol = 0; ipol < 3; ipol++) - { - soverlap(0, ipol) += local_soverlap(0, ipol); - if (ipol < 1) - continue; - soverlap(1, ipol) += local_soverlap(1, ipol); - if (ipol < 2) - continue; - soverlap(2, ipol) += local_soverlap(2, ipol); - } - } - } - } -#endif - - if (isstress) - { - StressTools::stress_fill(GlobalC::ucell.lat0, GlobalC::ucell.omega, soverlap); - } - - if (total_irr != pv->nnr) + if (GlobalV::CAL_STRESS) { - ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running, "wrong irr", total_irr); - ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running, "wrong LNNR.nnr", pv->nnr); - ModuleBase::WARNING_QUIT("Force_LCAO_k::cal_foverlap_k", "irr!=LNNR.nnr"); + delete[] lm.DH_r; + delete[] lm.stvnl11; + delete[] lm.stvnl12; + delete[] lm.stvnl13; + delete[] lm.stvnl22; + delete[] lm.stvnl23; + delete[] lm.stvnl33; } - - ModuleBase::timer::tick("Force_LCAO_k", "cal_foverlap_k"); return; } -void Force_LCAO_k::cal_ftvnl_dphi_k(const elecstate::DensityMatrix, double>* DM, - const bool isforce, - const bool isstress, - Record_adj& ra, - ModuleBase::matrix& ftvnl_dphi, - ModuleBase::matrix& stvnl_dphi) -{ - ModuleBase::TITLE("Force_LCAO_k", "cal_ftvnl_dphi_k"); - ModuleBase::timer::tick("Force_LCAO_k", "cal_ftvnl_dphi_k"); - - int total_irr = 0; - const Parallel_Orbitals* pv = this->ParaV; - // get the adjacent atom's information. - - // GlobalV::ofs_running << " calculate the ftvnl_dphi_k force" << std::endl; -#ifdef _OPENMP -#pragma omp parallel - { - int num_threads = omp_get_num_threads(); - ModuleBase::matrix local_stvnl_dphi(3, 3); - int local_total_irr = 0; -#pragma omp for schedule(dynamic) -#else - ModuleBase::matrix& local_stvnl_dphi = stvnl_dphi; - int& local_total_irr = total_irr; -#endif - for (int iat = 0; iat < GlobalC::ucell.nat; iat++) - { - const int T1 = GlobalC::ucell.iat2it[iat]; - Atom* atom1 = &GlobalC::ucell.atoms[T1]; - const int I1 = GlobalC::ucell.iat2ia[iat]; - // get iat1 - int iat1 = GlobalC::ucell.itia2iat(T1, I1); - // - int irr = pv->nlocstart[iat]; - const int start1 = GlobalC::ucell.itiaiw2iwt(T1, I1, 0); - double* ftvnl_dphi_iat; - if (isforce) - ftvnl_dphi_iat = &ftvnl_dphi(iat, 0); -#ifdef _OPENMP - // using local stack to avoid false sharing in multi-threaded case - double ftvnl_dphi_temp[3] = {0.0, 0.0, 0.0}; - if (num_threads > 1) - { - ftvnl_dphi_iat = ftvnl_dphi_temp; - } -#endif - for (int cb = 0; cb < ra.na_each[iat]; ++cb) - { - const int T2 = ra.info[iat][cb][3]; - const int I2 = ra.info[iat][cb][4]; - const int start2 = GlobalC::ucell.itiaiw2iwt(T2, I2, 0); - Atom* atom2 = &GlobalC::ucell.atoms[T2]; - // get iat2 - int iat2 = GlobalC::ucell.itia2iat(T2, I2); - double Rx = ra.info[iat][cb][0]; - double Ry = ra.info[iat][cb][1]; - double Rz = ra.info[iat][cb][2]; - // get BaseMatrix - if (pv->get_row_size(iat1) <= 0 || pv->get_col_size(iat2) <= 0) - { - continue; - } - std::vector*> tmp_matrix; - for (int is = 0; is < GlobalV::NSPIN; ++is) - { - tmp_matrix.push_back(DM->get_DMR_pointer(is+1)->find_matrix(iat1, iat2, Rx, Ry, Rz)); - } - //hamilt::BaseMatrix* tmp_matrix = DM->get_DMR_pointer(1)->find_matrix(iat1, iat2, Rx, Ry, Rz); - for (int mu = 0; mu < pv->get_row_size(iat1); ++mu) - { - for (int nu = 0; nu < pv->get_col_size(iat2); ++nu) - { - // get value from DM - double dm2d1 = 0.0; - for (int is = 0; is < GlobalV::NSPIN; ++is) - { - dm2d1 += tmp_matrix[is]->get_value(mu, nu); - } - double dm2d2 = 2.0 * dm2d1; - // - if (isforce) - { - ftvnl_dphi_iat[0] += dm2d2 * this->UHM->LM->DHloc_fixedR_x[irr]; - ftvnl_dphi_iat[1] += dm2d2 * this->UHM->LM->DHloc_fixedR_y[irr]; - ftvnl_dphi_iat[2] += dm2d2 * this->UHM->LM->DHloc_fixedR_z[irr]; - } - if (isstress) - { - local_stvnl_dphi(0, 0) -= dm2d1 * this->UHM->LM->stvnl11[irr]; - local_stvnl_dphi(0, 1) -= dm2d1 * this->UHM->LM->stvnl12[irr]; - local_stvnl_dphi(0, 2) -= dm2d1 * this->UHM->LM->stvnl13[irr]; - local_stvnl_dphi(1, 1) -= dm2d1 * this->UHM->LM->stvnl22[irr]; - local_stvnl_dphi(1, 2) -= dm2d1 * this->UHM->LM->stvnl23[irr]; - local_stvnl_dphi(2, 2) -= dm2d1 * this->UHM->LM->stvnl33[irr]; - } - //} - ++local_total_irr; - ++irr; - } // end kk - } // end jj - } // end cb -#ifdef _OPENMP - if (isforce && num_threads > 1) - { - ftvnl_dphi(iat, 0) += ftvnl_dphi_iat[0]; - ftvnl_dphi(iat, 1) += ftvnl_dphi_iat[1]; - ftvnl_dphi(iat, 2) += ftvnl_dphi_iat[2]; - } -#endif - } // end iat -#ifdef _OPENMP -#pragma omp critical(cal_ftvnl_dphi_k_reduce) - { - total_irr += local_total_irr; - if (isstress) - { - stvnl_dphi(0, 0) += local_stvnl_dphi(0, 0); - stvnl_dphi(0, 1) += local_stvnl_dphi(0, 1); - stvnl_dphi(0, 2) += local_stvnl_dphi(0, 2); - stvnl_dphi(1, 1) += local_stvnl_dphi(1, 1); - stvnl_dphi(1, 2) += local_stvnl_dphi(1, 2); - stvnl_dphi(2, 2) += local_stvnl_dphi(2, 2); - } - } - } -#endif - assert(total_irr == pv->nnr); - - // test(this->UHM->LM->DSloc_Rx); - // test(dm2d[0],"dm2d"); - - if (isstress) - { - StressTools::stress_fill(GlobalC::ucell.lat0, GlobalC::ucell.omega, stvnl_dphi); - } - - ModuleBase::timer::tick("Force_LCAO_k", "cal_ftvnl_dphi_k"); - return; -} -void Force_LCAO_k::test(double* mmm, const std::string& name) +void Force_LCAO_k::test( + Parallel_Orbitals &pv, + double* mmm, + const std::string& name) { - const Parallel_Orbitals* pv = this->ParaV; + // mohan remove 'const' for pv, 2024-03-31 if (GlobalV::NPROC != 1) + { return; + } + std::cout << "test!" << std::endl; int irr = 0; @@ -638,7 +365,9 @@ void Force_LCAO_k::test(double* mmm, const std::string& name) GlobalV::ofs_running << " Calculate the test in Force_LCAO_k" << std::endl; Record_adj RA; - RA.for_2d(*this->UHM->LM->ParaV, GlobalV::GAMMA_ONLY_LOCAL); + + // mohan update 2024-03-31 + RA.for_2d(pv, GlobalV::GAMMA_ONLY_LOCAL); double* test; test = new double[GlobalV::NLOCAL * GlobalV::NLOCAL]; @@ -664,8 +393,7 @@ void Force_LCAO_k::test(double* mmm, const std::string& name) for (int kk = 0; kk < atom2->nw; kk++) { const int iw2_all = start2 + kk; - assert(irr < pv->nnr); - // test[iw1_all*GlobalV::NLOCAL+iw2_all] += this->UHM->LM->DHloc_fixedR_x[irr]; + assert(irr < pv.nnr); test[iw1_all * GlobalV::NLOCAL + iw2_all] += mmm[irr]; ++irr; } @@ -681,11 +409,15 @@ void Force_LCAO_k::test(double* mmm, const std::string& name) { for (int j = 0; j < GlobalV::NLOCAL; j++) { - if (std::abs(test[i * GlobalV::NLOCAL + j]) > 1.0e-5) - std::cout << std::setw(12) << test[i * GlobalV::NLOCAL + j]; - else - std::cout << std::setw(12) << "0"; - } + if (std::abs(test[i * GlobalV::NLOCAL + j]) > 1.0e-5) + { + std::cout << std::setw(12) << test[i * GlobalV::NLOCAL + j]; + } + else + { + std::cout << std::setw(12) << "0"; + } + } std::cout << std::endl; } delete[] test; @@ -694,549 +426,5 @@ void Force_LCAO_k::test(double* mmm, const std::string& name) return; } -typedef std::tuple key_tuple; -// must consider three-center H matrix. -void Force_LCAO_k::cal_fvnl_dbeta_k(const elecstate::DensityMatrix, double>* DM, - const bool isforce, - const bool isstress, - ModuleBase::matrix& fvnl_dbeta, - ModuleBase::matrix& svnl_dbeta) -{ - ModuleBase::TITLE("Force_LCAO_k", "cal_fvnl_dbeta_k_new"); - ModuleBase::timer::tick("Force_LCAO_k", "cal_fvnl_dbeta_k_new"); - const Parallel_Orbitals* pv = this->ParaV; - - // Data structure for storing , for a detailed description - // check out the same data structure in build_Nonlocal_mu_new - std::vector>>>> nlm_tot; - - nlm_tot.resize(GlobalC::ucell.nat); - -#ifdef _OPENMP -// use schedule(dynamic) for load balancing because adj_num is various -#pragma omp parallel for schedule(dynamic) -#endif - for (int iat = 0; iat < GlobalC::ucell.nat; iat++) - { - - const int it = GlobalC::ucell.iat2it[iat]; - const int ia = GlobalC::ucell.iat2ia[iat]; - - // Step 1 : generate - // type of atom; distance; atomic basis; projectors - - const double Rcut_Beta = GlobalC::ucell.infoNL.Beta[it].get_rcut_max(); - const ModuleBase::Vector3 tau = GlobalC::ucell.atoms[it].tau[ia]; - AdjacentAtomInfo adjs; - GlobalC::GridD.Find_atom(GlobalC::ucell, tau, it, ia, &adjs); - - nlm_tot[iat].clear(); - - for (int ad = 0; ad < adjs.adj_num + 1; ++ad) - { - const int T1 = adjs.ntype[ad]; - const int I1 = adjs.natom[ad]; - const int start1 = GlobalC::ucell.itiaiw2iwt(T1, I1, 0); - const double Rcut_AO1 = GlobalC::ORB.Phi[T1].getRcut(); - - const ModuleBase::Vector3& tau1 = adjs.adjacent_tau[ad]; - const Atom* atom1 = &GlobalC::ucell.atoms[T1]; - const int nw1_tot = atom1->nw * GlobalV::NPOL; - - const ModuleBase::Vector3 dtau = tau1 - tau; - const double dist1 = dtau.norm2() * pow(GlobalC::ucell.lat0, 2); - if (dist1 > pow(Rcut_Beta + Rcut_AO1, 2)) - { - continue; - } - - std::unordered_map>> nlm_cur; - nlm_cur.clear(); - - for (int iw1 = 0; iw1 < nw1_tot; ++iw1) - { - const int iw1_all = start1 + iw1; - const int iw1_local = pv->global2local_row(iw1_all); - const int iw2_local = pv->global2local_col(iw1_all); - if (iw1_local < 0 && iw2_local < 0) - continue; - const int iw1_0 = iw1 / GlobalV::NPOL; - std::vector> nlm; -#ifdef USE_NEW_TWO_CENTER - //================================================================= - // new two-center integral (temporary) - //================================================================= - int L1 = atom1->iw2l[ iw1_0 ]; - int N1 = atom1->iw2n[ iw1_0 ]; - int m1 = atom1->iw2m[ iw1_0 ]; - - // convert m (0,1,...2l) to M (-l, -l+1, ..., l-1, l) - int M1 = (m1 % 2 == 0) ? -m1/2 : (m1+1)/2; - - ModuleBase::Vector3 dtau = tau - tau1; - GlobalC::UOT.two_center_bundle->overlap_orb_beta->snap( - T1, L1, N1, M1, it, dtau * GlobalC::ucell.lat0, true, nlm); -#else - GlobalC::UOT.snap_psibeta_half(GlobalC::ORB, - GlobalC::ucell.infoNL, - nlm, - tau1, - T1, - atom1->iw2l[iw1_0], // L1 - atom1->iw2m[iw1_0], // m1 - atom1->iw2n[iw1_0], // N1 - tau, - it, - 1); // R0,T0 -#endif - nlm_cur.insert({iw1_all, nlm}); - } // end iw - const int iat1 = GlobalC::ucell.itia2iat(T1, I1); - const int rx1 = adjs.box[ad].x; - const int ry1 = adjs.box[ad].y; - const int rz1 = adjs.box[ad].z; - key_tuple key_1(iat1, rx1, ry1, rz1); - nlm_tot[iat][key_1] = nlm_cur; - } // end ad - } - - //======================================================= - // Step2: - // calculate sum_(L0,M0) beta - // and accumulate the value to Hloc_fixedR(i,j) - //======================================================= - int total_nnr = 0; -#ifdef _OPENMP -#pragma omp parallel reduction(+ : total_nnr) - { - ModuleBase::matrix local_svnl_dbeta(3, 3); - const int num_threads = omp_get_num_threads(); -#else - ModuleBase::matrix& local_svnl_dbeta = svnl_dbeta; -#endif - - ModuleBase::Vector3 tau1; - ModuleBase::Vector3 tau2; - ModuleBase::Vector3 dtau; - ModuleBase::Vector3 tau0; - ModuleBase::Vector3 dtau1; - ModuleBase::Vector3 dtau2; - - double rcut; - double distance; - - double rcut1; - double rcut2; - double distance1; - double distance2; - -#ifdef _OPENMP -// use schedule(dynamic) for load balancing because adj_num is various -#pragma omp for schedule(dynamic) -#endif - for (int iat1 = 0; iat1 < GlobalC::ucell.nat; iat1++) - { - const int T1 = GlobalC::ucell.iat2it[iat1]; - const Atom* atom1 = &GlobalC::ucell.atoms[T1]; - - { - const int I1 = GlobalC::ucell.iat2ia[iat1]; - tau1 = atom1->tau[I1]; - AdjacentAtomInfo adjs; - GlobalC::GridD.Find_atom(GlobalC::ucell, tau1, T1, I1, &adjs); - const int start1 = GlobalC::ucell.itiaiw2iwt(T1, I1, 0); - int nnr = this->ParaV->nlocstart[iat1]; - - /* - !!!!!!!!!!!!!!!! - This optimization is also improving the performance of single thread. - Making memory access more linearly in the core loop - */ - bool iat_recorded = false; - bool force_updated = false; - // record iat of adjs - std::vector adj_iat; - // record fvnl_dbeta diff of adjs - std::vector adj_fvnl_dbeta; - if (isforce) - { - adj_iat.resize(adjs.adj_num + 1); - adj_fvnl_dbeta.resize((adjs.adj_num + 1) * 3, 0.0); - } - - for (int ad2 = 0; ad2 < adjs.adj_num + 1; ++ad2) - { - const int T2 = adjs.ntype[ad2]; - const Atom* atom2 = &GlobalC::ucell.atoms[T2]; - - const int I2 = adjs.natom[ad2]; - const int iat2 = GlobalC::ucell.itia2iat(T2, I2); - const int start2 = GlobalC::ucell.itiaiw2iwt(T2, I2, 0); - tau2 = adjs.adjacent_tau[ad2]; - - const int rx2 = adjs.box[ad2].x; - const int ry2 = adjs.box[ad2].y; - const int rz2 = adjs.box[ad2].z; - - dtau = tau2 - tau1; - distance = dtau.norm2() * pow(GlobalC::ucell.lat0, 2); - // this rcut is in order to make nnr consistent - // with other matrix. - rcut = pow(GlobalC::ORB.Phi[T1].getRcut() + GlobalC::ORB.Phi[T2].getRcut(), 2); - - // check if this a adjacent atoms. - bool is_adj = false; - if (distance < rcut) - is_adj = true; - else if (distance >= rcut) - { - for (int ad0 = 0; ad0 < adjs.adj_num + 1; ++ad0) - { - const int T0 = adjs.ntype[ad0]; - if (GlobalC::ucell.infoNL.nproj[T0] == 0) - continue; - const int I0 = adjs.natom[ad0]; - // const int iat0 = GlobalC::ucell.itia2iat(T0, I0); - // const int start0 = GlobalC::ucell.itiaiw2iwt(T0, I0, 0); - - tau0 = adjs.adjacent_tau[ad0]; - dtau1 = tau0 - tau1; - distance1 = dtau1.norm() * GlobalC::ucell.lat0; - rcut1 = GlobalC::ORB.Phi[T1].getRcut() + GlobalC::ucell.infoNL.Beta[T0].get_rcut_max(); - - dtau2 = tau0 - tau2; - distance2 = dtau2.norm() * GlobalC::ucell.lat0; - rcut2 = GlobalC::ORB.Phi[T2].getRcut() + GlobalC::ucell.infoNL.Beta[T0].get_rcut_max(); - - if (distance1 < rcut1 && distance2 < rcut2) - { - is_adj = true; - break; - } - } - } - - if (is_adj) - { - // basematrix and its data pointer - if (pv->get_row_size(iat1) <= 0 || pv->get_col_size(iat2) <= 0) - { - continue; - } - std::vector tmp_matrix_ptr; - for (int is = 0; is < GlobalV::NSPIN; ++is) - { - auto* tmp_base_matrix = DM->get_DMR_pointer(is+1)->find_matrix(iat1, iat2, rx2, ry2, rz2); - tmp_matrix_ptr.push_back(tmp_base_matrix->get_pointer()); - } - //hamilt::BaseMatrix* tmp_matrix = DM->get_DMR_pointer(1)->find_matrix(iat1, iat2, rx2, ry2, rz2); - //double* tmp_matrix_ptr = tmp_matrix->get_pointer(); - for (int ad0 = 0; ad0 < adjs.adj_num + 1; ++ad0) - { - const int T0 = adjs.ntype[ad0]; - const int I0 = adjs.natom[ad0]; - const int iat = GlobalC::ucell.itia2iat(T0, I0); - if (!iat_recorded && isforce) - adj_iat[ad0] = iat; - - // mohan add 2010-12-19 - if (GlobalC::ucell.infoNL.nproj[T0] == 0) - continue; - - // const int I0 = GlobalC::GridD.getNatom(ad0); - // const int start0 = GlobalC::ucell.itiaiw2iwt(T0, I0, 0); - tau0 = adjs.adjacent_tau[ad0]; - - dtau1 = tau0 - tau1; - dtau2 = tau0 - tau2; - const double distance1 = dtau1.norm2() * pow(GlobalC::ucell.lat0, 2); - const double distance2 = dtau2.norm2() * pow(GlobalC::ucell.lat0, 2); - - // seems a bug here!! mohan 2011-06-17 - rcut1 = pow(GlobalC::ORB.Phi[T1].getRcut() + GlobalC::ucell.infoNL.Beta[T0].get_rcut_max(), - 2); - rcut2 = pow(GlobalC::ORB.Phi[T2].getRcut() + GlobalC::ucell.infoNL.Beta[T0].get_rcut_max(), - 2); - - double r0[3]; - double r1[3]; - r1[0] = (tau1.x - tau0.x); - r1[1] = (tau1.y - tau0.y); - r1[2] = (tau1.z - tau0.z); - r0[0] = (tau2.x - tau0.x); - r0[1] = (tau2.y - tau0.y); - r0[2] = (tau2.z - tau0.z); - - if (distance1 >= rcut1 || distance2 >= rcut2) - { - continue; - } - - const int rx0 = adjs.box[ad0].x; - const int ry0 = adjs.box[ad0].y; - const int rz0 = adjs.box[ad0].z; - key_tuple key1(iat1, -rx0, -ry0, -rz0); - key_tuple key2(iat2, rx2 - rx0, ry2 - ry0, rz2 - rz0); - - int nnr_inner = 0; - for (int j = 0; j < atom1->nw * GlobalV::NPOL; j++) - { - const int j0 = j / GlobalV::NPOL; // added by zhengdy-soc - const int iw1_all = start1 + j; - const int mu = pv->global2local_row(iw1_all); - if (mu < 0) - continue; - - for (int k = 0; k < atom2->nw * GlobalV::NPOL; k++) - { - const int k0 = k / GlobalV::NPOL; - const int iw2_all = start2 + k; - const int nu = pv->global2local_col(iw2_all); - if (nu < 0) - continue; - // const Atom* atom0 = &GlobalC::ucell.atoms[T0]; - double nlm[3] = {0, 0, 0}; - std::vector nlm_1 = nlm_tot[iat][key2][iw2_all][0]; - std::vector> nlm_2; - nlm_2.resize(3); - for (int i = 0; i < 3; i++) - { - nlm_2[i] = nlm_tot[iat][key1][iw1_all][i + 1]; - } - - assert(nlm_1.size() == nlm_2[0].size()); - - const int nproj = GlobalC::ucell.infoNL.nproj[T0]; - int ib = 0; - for (int nb = 0; nb < nproj; nb++) - { - const int L0 = GlobalC::ucell.infoNL.Beta[T0].Proj[nb].getL(); - for (int m = 0; m < 2 * L0 + 1; m++) - { - for (int ir = 0; ir < 3; ir++) - { - nlm[ir] += nlm_2[ir][ib] * nlm_1[ib] - * GlobalC::ucell.atoms[T0].ncpp.dion(nb, nb); - } - ib += 1; - } - } - assert(ib == nlm_1.size()); - - double nlm1[3] = {0, 0, 0}; - if (isstress) - { - std::vector nlm_1 = nlm_tot[iat][key1][iw1_all][0]; - std::vector> nlm_2; - nlm_2.resize(3); - for (int i = 0; i < 3; i++) - { - nlm_2[i] = nlm_tot[iat][key2][iw2_all][i + 1]; - } - - assert(nlm_1.size() == nlm_2[0].size()); - - const int nproj = GlobalC::ucell.infoNL.nproj[T0]; - int ib = 0; - for (int nb = 0; nb < nproj; nb++) - { - const int L0 = GlobalC::ucell.infoNL.Beta[T0].Proj[nb].getL(); - for (int m = 0; m < 2 * L0 + 1; m++) - { - for (int ir = 0; ir < 3; ir++) - { - nlm1[ir] += nlm_2[ir][ib] * nlm_1[ib] - * GlobalC::ucell.atoms[T0].ncpp.dion(nb, nb); - } - ib += 1; - } - } - assert(ib == nlm_1.size()); - } - - /// only one projector for each atom force, but another projector for stress - force_updated = true; - // get DMR - double dm2d1 = 0.0; - for (int is = 0; is < GlobalV::NSPIN; ++is) - { - dm2d1 += tmp_matrix_ptr[is][nnr_inner]; - } - double dm2d2 = 2.0 * dm2d1; - // - for (int jpol = 0; jpol < 3; jpol++) - { - if (isforce) - { - adj_fvnl_dbeta[ad0 * 3 + jpol] -= dm2d2 * nlm[jpol]; - } - if (isstress) - { - for (int ipol = jpol; ipol < 3; ipol++) - { - local_svnl_dbeta(jpol, ipol) - += dm2d1 - * (nlm[jpol] * r1[ipol] + nlm1[jpol] * r0[ipol]); - } - } - } - //} - nnr_inner++; - } // k - } // j - } // ad0 - - // outer circle : accumulate nnr - for (int j = 0; j < atom1->nw * GlobalV::NPOL; j++) - { - const int j0 = j / GlobalV::NPOL; // added by zhengdy-soc - const int iw1_all = start1 + j; - const int mu = pv->global2local_row(iw1_all); - if (mu < 0) - continue; - - // fix a serious bug: atom2[T2] -> atom2 - // mohan 2010-12-20 - for (int k = 0; k < atom2->nw * GlobalV::NPOL; k++) - { - const int k0 = k / GlobalV::NPOL; - const int iw2_all = start2 + k; - const int nu = pv->global2local_col(iw2_all); - if (nu < 0) - continue; - total_nnr++; - nnr++; - } - } - iat_recorded = true; - } // is_adj - } // ad2 - - // sum the diff to fvnl_dbeta - if (force_updated && isforce) - { -#ifdef _OPENMP - if (num_threads > 1) - { - for (int ad0 = 0; ad0 < adjs.adj_num + 1; ++ad0) - { -#pragma omp atomic - fvnl_dbeta(adj_iat[ad0], 0) += adj_fvnl_dbeta[ad0 * 3 + 0]; -#pragma omp atomic - fvnl_dbeta(adj_iat[ad0], 1) += adj_fvnl_dbeta[ad0 * 3 + 1]; -#pragma omp atomic - fvnl_dbeta(adj_iat[ad0], 2) += adj_fvnl_dbeta[ad0 * 3 + 2]; - } - } - else -#endif - { - for (int ad0 = 0; ad0 < adjs.adj_num + 1; ++ad0) - { - fvnl_dbeta(adj_iat[ad0], 0) += adj_fvnl_dbeta[ad0 * 3 + 0]; - fvnl_dbeta(adj_iat[ad0], 1) += adj_fvnl_dbeta[ad0 * 3 + 1]; - fvnl_dbeta(adj_iat[ad0], 2) += adj_fvnl_dbeta[ad0 * 3 + 2]; - } - } - } - } // I1 - } // T1 - -#ifdef _OPENMP - if (isstress) - { -#pragma omp critical(cal_fvnl_dbeta_k_new_reduce) - { - for (int l = 0; l < 3; l++) - { - for (int m = 0; m < 3; m++) - { - svnl_dbeta(l, m) += local_svnl_dbeta(l, m); - } - } - } - } - } -#endif - - assert(total_nnr == pv->nnr); - - if (isstress) - { - StressTools::stress_fill(GlobalC::ucell.lat0, GlobalC::ucell.omega, svnl_dbeta); - } - - ModuleBase::timer::tick("Force_LCAO_k", "cal_fvnl_dbeta_k_new"); - return; -} - -// calculate the force due to < phi | Vlocal | dphi > -void Force_LCAO_k::cal_fvl_dphi_k(const bool isforce, - const bool isstress, - const elecstate::Potential* pot_in, - ModuleBase::matrix& fvl_dphi, - ModuleBase::matrix& svl_dphi, - double** DM_R) -{ - ModuleBase::TITLE("Force_LCAO_k", "cal_fvl_dphi_k"); - ModuleBase::timer::tick("Force_LCAO_k", "cal_fvl_dphi_k"); - - if (!isforce && !isstress) - { - ModuleBase::timer::tick("Force_LCAO_k", "cal_fvl_dphi_k"); - return; - } - assert(this->UHM->LM->DHloc_fixedR_x != NULL); - assert(this->UHM->LM->DHloc_fixedR_y != NULL); - assert(this->UHM->LM->DHloc_fixedR_z != NULL); - - int istep = 1; - - for (int is = 0; is < GlobalV::NSPIN; ++is) - { - GlobalV::CURRENT_SPIN = is; - - const double* vr_eff1 = pot_in->get_effective_v(GlobalV::CURRENT_SPIN); - const double* vofk_eff1 = nullptr; - if (XC_Functional::get_func_type() == 3 || XC_Functional::get_func_type() == 5) - { - vofk_eff1 = pot_in->get_effective_vofk(GlobalV::CURRENT_SPIN); - } - - //-------------------------------- - // Grid integration here. - //-------------------------------- - // fvl_dphi can not be set to zero here if Vna is used - if (isstress || isforce) - { - if (XC_Functional::get_func_type() == 3 || XC_Functional::get_func_type() == 5) - { - Gint_inout inout(DM_R, - is, - vr_eff1, - vofk_eff1, - isforce, - isstress, - &fvl_dphi, - &svl_dphi, - Gint_Tools::job_type::force_meta); - this->UHM->GK.cal_gint(&inout); - } - else - { - Gint_inout inout(DM_R, is, vr_eff1, isforce, isstress, &fvl_dphi, &svl_dphi, Gint_Tools::job_type::force); - this->UHM->GK.cal_gint(&inout); - } - } - } - - if (isstress) - { - StressTools::stress_fill(-1.0, GlobalC::ucell.omega, svl_dphi); - } - - ModuleBase::timer::tick("Force_LCAO_k", "cal_fvl_dphi_k"); - return; -} diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.h b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.h index 0deb189aa5..9fa60e2ad5 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/FORCE_k.h @@ -9,19 +9,18 @@ #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.h" #include "module_hamilt_lcao/hamilt_lcaodft/local_orbital_charge.h" +#include "module_hamilt_lcao/module_gint/gint_k.h" class Force_LCAO_k : public Force_LCAO_gamma { -public: + public: template friend class Force_Stress_LCAO; Force_LCAO_k(); ~Force_LCAO_k(); - private: - LCAO_Hamilt* UHM; - const Parallel_Orbitals* ParaV; + private: // orthonormal force + contribution from T and VNL void ftable_k(const bool isforce, @@ -43,53 +42,68 @@ class Force_LCAO_k : public Force_LCAO_gamma #else ModuleBase::matrix& svl_dphi, #endif - LCAO_Hamilt& uhm, - const K_Vectors& kv); + LCAO_Hamilt &uhm, + Gint_k &gint_k, + Parallel_Orbitals &pv, + LCAO_Matrix &lm, + const K_Vectors &kv); // get the ds, dt, dvnl. void allocate_k(const Parallel_Orbitals& pv, + LCAO_Matrix &lm, + LCAO_gen_fixedH &gen_h, const int& nks, const std::vector>& kvec_d); - void finish_k(void); + void finish_k(LCAO_Matrix &lm); // calculate the force due to < dphi | beta > < beta | phi > - void cal_ftvnl_dphi_k(const elecstate::DensityMatrix, double>* DM, - const bool isforce, - const bool isstress, - Record_adj& ra, - ModuleBase::matrix& ftvnl_dphi, - ModuleBase::matrix& stvnl_dphi); + void cal_ftvnl_dphi_k(const elecstate::DensityMatrix, double>* DM, + const Parallel_Orbitals &pv, + LCAO_Matrix &lm, + const bool isforce, + const bool isstress, + Record_adj& ra, + ModuleBase::matrix& ftvnl_dphi, + ModuleBase::matrix& stvnl_dphi); // calculate the overlap force void cal_foverlap_k(const bool isforce, const bool isstress, - Record_adj& ra, - const psi::Psi>* psi, - Local_Orbital_Charge& loc, - const elecstate::DensityMatrix, double>* DM, - ModuleBase::matrix& foverlap, - ModuleBase::matrix& soverlap, - const elecstate::ElecState* pelec, - const int& nks, - const K_Vectors& kv); + Record_adj &ra, + const psi::Psi> *psi, + Local_Orbital_Charge &loc, + Parallel_Orbitals &pv, + LCAO_Matrix &lm, + const elecstate::DensityMatrix, double> *DM, + ModuleBase::matrix &foverlap, + ModuleBase::matrix &soverlap, + const elecstate::ElecState *pelec, + const int &nks, + const K_Vectors &kv); // calculate the force due to < phi | Vlocal | dphi > - void cal_fvl_dphi_k(const bool isforce, - const bool isstress, - const elecstate::Potential* pot_in, - ModuleBase::matrix& fvl_dphi, - ModuleBase::matrix& svl_dphi, - double** DM_R); + void cal_fvl_dphi_k(const bool isforce, + const bool isstress, + LCAO_Matrix &lm, + Gint_k &gint_k, + const elecstate::Potential* pot_in, + ModuleBase::matrix& fvl_dphi, + ModuleBase::matrix& svl_dphi, + double** DM_R); // new method to calculate the force due to < phi | dbeta > < beta | phi > , developed by wenfei-li void cal_fvnl_dbeta_k(const elecstate::DensityMatrix, double>* DM, const bool isforce, - const bool isstress, - ModuleBase::matrix& fvnl_dbeta, + const bool isstress, + const Parallel_Orbitals &pv, + ModuleBase::matrix& fvnl_dbeta, ModuleBase::matrix& svnl_dbeta); - void test(double* mm, const std::string& name); + void test( + Parallel_Orbitals &pv, + double* mm, + const std::string& name); }; #endif diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.cpp index 94d7408c9f..b1881849f4 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.cpp @@ -31,22 +31,27 @@ LCAO_Hamilt::~LCAO_Hamilt() //-------------------------------------------- // prepare grid network for Gint(grid integral) //-------------------------------------------- -void LCAO_Hamilt::grid_prepare(const Grid_Technique& gt, const ModulePW::PW_Basis& rhopw, const ModulePW::PW_Basis_Big& bigpw) +void LCAO_Hamilt::grid_prepare( + const Grid_Technique& gt, + Gint_Gamma &gint_gamma, + Gint_k &gint_k, + const ModulePW::PW_Basis& rhopw, + const ModulePW::PW_Basis_Big& bigpw) { ModuleBase::TITLE("LCAO_Hamilt","grid_prepare"); ModuleBase::timer::tick("LCAO_Hamilt","grid_prepare"); if(GlobalV::GAMMA_ONLY_LOCAL) { - this->GG.prep_grid(gt, bigpw.nbx, bigpw.nby, bigpw.nbzp, bigpw.nbzp_start, + gint_gamma.prep_grid(gt, bigpw.nbx, bigpw.nby, bigpw.nbzp, bigpw.nbzp_start, rhopw.nxyz, bigpw.bx, bigpw.by, bigpw.bz, bigpw.bxyz, bigpw.nbxx, rhopw.ny, rhopw.nplane, rhopw.startz_current); } else // multiple k-points { - // calculate the grid integration of 'Vl' matrix for l-points algorithms. - this->GK.prep_grid(gt, bigpw.nbx, bigpw.nby, bigpw.nbzp, bigpw.nbzp_start, + // cal the grid integration of 'Vl' matrix for l-points algorithms. + gint_k.prep_grid(gt, bigpw.nbx, bigpw.nby, bigpw.nbzp, bigpw.nbzp_start, rhopw.nxyz, bigpw.bx, bigpw.by, bigpw.bz, bigpw.bxyz, bigpw.nbxx, rhopw.ny, rhopw.nplane, rhopw.startz_current); } @@ -55,7 +60,7 @@ void LCAO_Hamilt::grid_prepare(const Grid_Technique& gt, const ModulePW::PW_Basi return; } -void LCAO_Hamilt::set_R_range_sparse() +void LCAO_Hamilt::set_R_range_sparse(LCAO_Matrix &lm) { int R_minX = int(GlobalC::GridD.getD_minX()); int R_minY = int(GlobalC::GridD.getD_minY()); @@ -72,7 +77,7 @@ void LCAO_Hamilt::set_R_range_sparse() for(int iz = 0; iz < R_z; iz++) { Abfs::Vector3_Order temp_R(ix+R_minX, iy+R_minY, iz+R_minZ); - this->LM->all_R_coor.insert(temp_R); + lm.all_R_coor.insert(temp_R); } } } @@ -80,16 +85,22 @@ void LCAO_Hamilt::set_R_range_sparse() return; } -void LCAO_Hamilt::calculate_STN_R_sparse_for_S(const double &sparse_threshold) +void LCAO_Hamilt::cal_STN_R_sparse_for_S( + const Parallel_Orbitals pv, + std::vector &slocR, + std::vector> &slocR_soc, + std::map, std::map>> &SR_sparse, + std::map, std::map>>> &SR_soc_sparse, + const double &sparse_threshold) { - ModuleBase::TITLE("LCAO_Hamilt","calculate_STN_R_sparse_for_S"); + ModuleBase::TITLE("LCAO_Hamilt","cal_STN_R_sparse_for_S"); int index = 0; ModuleBase::Vector3 dtau, tau1, tau2; ModuleBase::Vector3 dtau1, dtau2, tau0; - double temp_value_double; - std::complex temp_value_complex; + double tmp=0.0; + std::complex tmpc=complex(0.0,0.0); for(int T1 = 0; T1 < GlobalC::ucell.ntype; ++T1) { @@ -114,7 +125,10 @@ void LCAO_Hamilt::calculate_STN_R_sparse_for_S(const double &sparse_threshold) bool adj = false; - if(distance < rcut) adj = true; + if(distance < rcut) + { + adj = true; + } else if(distance >= rcut) { for(int ad0 = 0; ad0 < GlobalC::GridD.getAdjacentNum()+1; ++ad0) @@ -143,36 +157,45 @@ void LCAO_Hamilt::calculate_STN_R_sparse_for_S(const double &sparse_threshold) { const int start2 = GlobalC::ucell.itiaiw2iwt(T2,I2,0); - Abfs::Vector3_Order dR(GlobalC::GridD.getBox(ad).x, GlobalC::GridD.getBox(ad).y, GlobalC::GridD.getBox(ad).z); + Abfs::Vector3_Order dR( + GlobalC::GridD.getBox(ad).x, + GlobalC::GridD.getBox(ad).y, + GlobalC::GridD.getBox(ad).z); for(int ii=0; iinw*GlobalV::NPOL; ii++) { const int iw1_all = start + ii; - const int mu = this->LM->ParaV->global2local_row(iw1_all); + const int mu = pv.global2local_row(iw1_all); - if(mu<0)continue; + if(mu<0) + { + continue; + } for(int jj=0; jjnw*GlobalV::NPOL; jj++) { int iw2_all = start2 + jj; - const int nu = this->LM->ParaV->global2local_col(iw2_all); + const int nu = pv.global2local_col(iw2_all); - if(nu<0)continue; + if(nu<0) + { + continue; + } if(GlobalV::NSPIN!=4) { - temp_value_double = this->LM->SlocR[index]; - if (std::abs(temp_value_double) > sparse_threshold) + tmp = slocR[index]; + if (std::abs(tmp) > sparse_threshold) { - this->LM->SR_sparse[dR][iw1_all][iw2_all] = temp_value_double; + SR_sparse[dR][iw1_all][iw2_all] = tmp; } } else { - temp_value_complex = this->LM->SlocR_soc[index]; - if(std::abs(temp_value_complex) > sparse_threshold) + tmpc = slocR_soc[index]; + if(std::abs(tmpc) > sparse_threshold) { - this->LM->SR_soc_sparse[dR][iw1_all][iw2_all] = temp_value_complex; + SR_soc_sparse[dR][iw1_all][iw2_all] = tmpc; } } @@ -188,9 +211,13 @@ void LCAO_Hamilt::calculate_STN_R_sparse_for_S(const double &sparse_threshold) } #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" -void LCAO_Hamilt::calculate_HContainer_sparse_d(const int ¤t_spin, const double &sparse_threshold, const hamilt::HContainer& hR, std::map, std::map>>& target) +void LCAO_Hamilt::cal_HContainer_sparse_d( + const int ¤t_spin, + const double &sparse_threshold, + const hamilt::HContainer& hR, + std::map, std::map>>& target) { - ModuleBase::TITLE("LCAO_Hamilt","calculate_HContainer_sparse_d"); + ModuleBase::TITLE("LCAO_Hamilt","cal_HContainer_sparse_d"); const Parallel_Orbitals* paraV = this->LM->ParaV; auto row_indexes = paraV->get_indexes_row(); @@ -227,9 +254,14 @@ void LCAO_Hamilt::calculate_HContainer_sparse_d(const int ¤t_spin, const d return; } -void LCAO_Hamilt::calculate_HContainer_sparse_cd(const int ¤t_spin, const double &sparse_threshold, const hamilt::HContainer>& hR, std::map, std::map>>>& target) +void LCAO_Hamilt::cal_HContainer_sparse_cd( + const int ¤t_spin, + const double &sparse_threshold, + const hamilt::HContainer>& hR, + std::map, + std::map>>>& target) { - ModuleBase::TITLE("LCAO_Hamilt","calculate_HContainer_sparse_cd"); + ModuleBase::TITLE("LCAO_Hamilt","cal_HContainer_sparse_cd"); const Parallel_Orbitals* paraV = this->LM->ParaV; auto row_indexes = paraV->get_indexes_row(); @@ -266,35 +298,58 @@ void LCAO_Hamilt::calculate_HContainer_sparse_cd(const int ¤t_spin, const return; } -void LCAO_Hamilt::calculate_HSR_sparse(const int ¤t_spin, const double &sparse_threshold, const int (&nmp)[3], hamilt::Hamilt>* p_ham) +void LCAO_Hamilt::cal_HSR_sparse( + const int ¤t_spin, + const double &sparse_threshold, + const int (&nmp)[3], + hamilt::Hamilt>* p_ham) { - ModuleBase::TITLE("LCAO_Hamilt","calculate_HSR_sparse"); + ModuleBase::TITLE("LCAO_Hamilt","cal_HSR_sparse"); - set_R_range_sparse(); + set_R_range_sparse(*this->LM); - //calculate_STN_R_sparse(current_spin, sparse_threshold); + //cal_STN_R_sparse(current_spin, sparse_threshold); if(GlobalV::NSPIN!=4) { - hamilt::HamiltLCAO, double>* p_ham_lcao = dynamic_cast, double>*>(p_ham); - this->calculate_HContainer_sparse_d(current_spin, sparse_threshold, *(p_ham_lcao->getHR()), this->LM->HR_sparse[current_spin]); - this->calculate_HContainer_sparse_d(current_spin, sparse_threshold, *(p_ham_lcao->getSR()), this->LM->SR_sparse); + hamilt::HamiltLCAO, double>* p_ham_lcao = + dynamic_cast, double>*>(p_ham); + + this->cal_HContainer_sparse_d(current_spin, + sparse_threshold, + *(p_ham_lcao->getHR()), + this->LM->HR_sparse[current_spin]); + + this->cal_HContainer_sparse_d(current_spin, + sparse_threshold, + *(p_ham_lcao->getSR()), + this->LM->SR_sparse); } else { - hamilt::HamiltLCAO, std::complex>* p_ham_lcao = dynamic_cast, std::complex>*>(p_ham); - this->calculate_HContainer_sparse_cd(current_spin, sparse_threshold, *(p_ham_lcao->getHR()), this->LM->HR_soc_sparse); - this->calculate_HContainer_sparse_cd(current_spin, sparse_threshold, *(p_ham_lcao->getSR()), this->LM->SR_soc_sparse); + hamilt::HamiltLCAO, std::complex>* p_ham_lcao = + dynamic_cast, std::complex>*>(p_ham); + + this->cal_HContainer_sparse_cd(current_spin, + sparse_threshold, + *(p_ham_lcao->getHR()), + this->LM->HR_soc_sparse); + + this->cal_HContainer_sparse_cd(current_spin, + sparse_threshold, + *(p_ham_lcao->getSR()), + this->LM->SR_soc_sparse); } - if (GlobalV::dft_plus_u) + // only old DFT+U method need to cal extra contribution to HR + if (GlobalV::dft_plus_u == 2) { if (GlobalV::NSPIN != 4) { - calculat_HR_dftu_sparse(current_spin, sparse_threshold); + cal_HR_dftu_sparse(current_spin, sparse_threshold); } else { - calculat_HR_dftu_soc_sparse(current_spin, sparse_threshold); + cal_HR_dftu_soc_sparse(current_spin, sparse_threshold); } } @@ -302,22 +357,29 @@ void LCAO_Hamilt::calculate_HSR_sparse(const int ¤t_spin, const double &sp #ifdef __MPI if( GlobalC::exx_info.info_global.cal_exx ) { - if(GlobalC::exx_info.info_ri.real_number) - this->calculate_HR_exx_sparse(current_spin, sparse_threshold, nmp, *this->LM->Hexxd); - else - this->calculate_HR_exx_sparse(current_spin, sparse_threshold, nmp, *this->LM->Hexxc); - } + if(GlobalC::exx_info.info_ri.real_number) + { + this->cal_HR_exx_sparse(current_spin, sparse_threshold, nmp, *this->LM->Hexxd); + } + else + { + this->cal_HR_exx_sparse(current_spin, sparse_threshold, nmp, *this->LM->Hexxc); + } + } #endif // __MPI #endif // __EXX clear_zero_elements(current_spin, sparse_threshold); } -void LCAO_Hamilt::calculate_dH_sparse(const int ¤t_spin, const double &sparse_threshold) +void LCAO_Hamilt::cal_dH_sparse( + const int ¤t_spin, + const double &sparse_threshold, + Gint_k &gint_k) { - ModuleBase::TITLE("LCAO_Hamilt","calculate_dH_sparse"); + ModuleBase::TITLE("LCAO_Hamilt","cal_dH_sparse"); - set_R_range_sparse(); + set_R_range_sparse(*this->LM); const int nnr = this->LM->ParaV->nnr; this->LM->DHloc_fixedR_x = new double[nnr]; @@ -327,8 +389,8 @@ void LCAO_Hamilt::calculate_dH_sparse(const int ¤t_spin, const double &spa ModuleBase::GlobalFunc::ZEROS(this->LM->DHloc_fixedR_x, this->LM->ParaV->nloc); ModuleBase::GlobalFunc::ZEROS(this->LM->DHloc_fixedR_y, this->LM->ParaV->nloc); ModuleBase::GlobalFunc::ZEROS(this->LM->DHloc_fixedR_z, this->LM->ParaV->nloc); - // calculate dT= in LCAO - // calculate T + VNL(P1) in LCAO basis + // cal dT= in LCAO + // cal T + VNL(P1) in LCAO basis if(GlobalV::CAL_STRESS) { GlobalV::CAL_STRESS = false; @@ -341,25 +403,26 @@ void LCAO_Hamilt::calculate_dH_sparse(const int ¤t_spin, const double &spa } this->genH.build_Nonlocal_mu_new (this->LM->Hloc_fixed.data(), true); - calculate_dSTN_R_sparse(current_spin, sparse_threshold); + cal_dSTN_R_sparse(current_spin, sparse_threshold); delete[] this->LM->DHloc_fixedR_x; delete[] this->LM->DHloc_fixedR_y; delete[] this->LM->DHloc_fixedR_z; - GK.cal_dvlocal_R_sparseMatrix(current_spin, sparse_threshold, this->LM); + gint_k.cal_dvlocal_R_sparseMatrix(current_spin, sparse_threshold, this->LM); } -void LCAO_Hamilt::calculate_STN_R_sparse_for_T(const double &sparse_threshold) + +void LCAO_Hamilt::cal_STN_R_sparse_for_T(const double &sparse_threshold) { - ModuleBase::TITLE("LCAO_Hamilt","calculate_STN_R_sparse_for_T"); + ModuleBase::TITLE("LCAO_Hamilt","cal_STN_R_sparse_for_T"); int index = 0; ModuleBase::Vector3 dtau, tau1, tau2; ModuleBase::Vector3 dtau1, dtau2, tau0; - double temp_value_double; - std::complex temp_value_complex; + double tmp=0.0; + std::complex tmpc=complex(0.0,0.0); for(int T1 = 0; T1 < GlobalC::ucell.ntype; ++T1) { @@ -413,7 +476,10 @@ void LCAO_Hamilt::calculate_STN_R_sparse_for_T(const double &sparse_threshold) { const int start2 = GlobalC::ucell.itiaiw2iwt(T2,I2,0); - Abfs::Vector3_Order dR(GlobalC::GridD.getBox(ad).x, GlobalC::GridD.getBox(ad).y, GlobalC::GridD.getBox(ad).z); + Abfs::Vector3_Order dR( + GlobalC::GridD.getBox(ad).x, + GlobalC::GridD.getBox(ad).y, + GlobalC::GridD.getBox(ad).z); for(int ii=0; iinw*GlobalV::NPOL; ii++) { @@ -431,18 +497,18 @@ void LCAO_Hamilt::calculate_STN_R_sparse_for_T(const double &sparse_threshold) if(GlobalV::NSPIN!=4) { - temp_value_double = this->LM->Hloc_fixedR[index]; - if (std::abs(temp_value_double) > sparse_threshold) + tmp = this->LM->Hloc_fixedR[index]; + if (std::abs(tmp) > sparse_threshold) { - this->LM->TR_sparse[dR][iw1_all][iw2_all] = temp_value_double; + this->LM->TR_sparse[dR][iw1_all][iw2_all] = tmp; } } else { - temp_value_complex = this->LM->Hloc_fixedR_soc[index]; - if(std::abs(temp_value_complex) > sparse_threshold) + tmpc = this->LM->Hloc_fixedR_soc[index]; + if(std::abs(tmpc) > sparse_threshold) { - this->LM->TR_soc_sparse[dR][iw1_all][iw2_all] = temp_value_complex; + this->LM->TR_soc_sparse[dR][iw1_all][iw2_all] = tmpc; } } @@ -457,39 +523,43 @@ void LCAO_Hamilt::calculate_STN_R_sparse_for_T(const double &sparse_threshold) return; } -void LCAO_Hamilt::calculate_SR_sparse(const double &sparse_threshold, hamilt::Hamilt>* p_ham) +void LCAO_Hamilt::cal_SR_sparse(const double &sparse_threshold, hamilt::Hamilt>* p_ham) { - ModuleBase::TITLE("LCAO_Hamilt","calculate_SR_sparse"); - set_R_range_sparse(); - //calculate_STN_R_sparse(current_spin, sparse_threshold); + ModuleBase::TITLE("LCAO_Hamilt","cal_SR_sparse"); + set_R_range_sparse(*this->LM); + //cal_STN_R_sparse(current_spin, sparse_threshold); if(GlobalV::NSPIN!=4) { - hamilt::HamiltLCAO, double>* p_ham_lcao = dynamic_cast, double>*>(p_ham); - this->calculate_HContainer_sparse_d(0, sparse_threshold, *(p_ham_lcao->getSR()), this->LM->SR_sparse); + hamilt::HamiltLCAO, double>* p_ham_lcao + = dynamic_cast, double>*>(p_ham); + this->cal_HContainer_sparse_d(0, sparse_threshold, *(p_ham_lcao->getSR()), this->LM->SR_sparse); } else { - hamilt::HamiltLCAO, std::complex>* p_ham_lcao = dynamic_cast, std::complex>*>(p_ham); - this->calculate_HContainer_sparse_cd(0, sparse_threshold, *(p_ham_lcao->getSR()), this->LM->SR_soc_sparse); + hamilt::HamiltLCAO, std::complex>* p_ham_lcao + = dynamic_cast, std::complex>*>(p_ham); + this->cal_HContainer_sparse_cd(0, sparse_threshold, *(p_ham_lcao->getSR()), this->LM->SR_soc_sparse); } } -void LCAO_Hamilt::calculate_TR_sparse(const double &sparse_threshold) +void LCAO_Hamilt::cal_TR_sparse(const double &sparse_threshold) { - ModuleBase::TITLE("LCAO_Hamilt","calculate_TR_sparse"); + ModuleBase::TITLE("LCAO_Hamilt","cal_TR_sparse"); //need to rebuild T(R) this->LM->Hloc_fixedR.resize(this->LM->ParaV->nnr); this->LM->zeros_HSR('T'); this->genH.build_ST_new('T', 0, GlobalC::ucell, this->LM->Hloc_fixedR.data()); - set_R_range_sparse(); - calculate_STN_R_sparse_for_T(sparse_threshold); + this->set_R_range_sparse(*this->LM); + this->cal_STN_R_sparse_for_T(sparse_threshold); + + return; } -void LCAO_Hamilt::calculat_HR_dftu_sparse(const int ¤t_spin, const double &sparse_threshold) +void LCAO_Hamilt::cal_HR_dftu_sparse(const int ¤t_spin, const double &sparse_threshold) { - ModuleBase::TITLE("LCAO_Hamilt","calculat_HR_dftu_sparse"); - ModuleBase::timer::tick("LCAO_Hamilt","calculat_HR_dftu_sparse"); + ModuleBase::TITLE("LCAO_Hamilt","cal_HR_dftu_sparse"); + ModuleBase::timer::tick("LCAO_Hamilt","cal_HR_dftu_sparse"); int total_R_num = this->LM->all_R_coor.size(); int *nonzero_num = new int[total_R_num]; @@ -513,9 +583,9 @@ void LCAO_Hamilt::calculat_HR_dftu_sparse(const int ¤t_spin, const double double *HR_tmp = new double[this->LM->ParaV->nloc]; double *SR_tmp = new double[this->LM->ParaV->nloc]; - int ir; - int ic; - int iic; + int ir=0; + int ic=0; + int iic=0; auto &temp_HR_sparse = this->LM->HR_sparse[current_spin]; count = 0; @@ -595,14 +665,14 @@ void LCAO_Hamilt::calculat_HR_dftu_sparse(const int ¤t_spin, const double HR_tmp = nullptr; SR_tmp = nullptr; - ModuleBase::timer::tick("LCAO_Hamilt","calculat_HR_dftu_sparse"); + ModuleBase::timer::tick("LCAO_Hamilt","cal_HR_dftu_sparse"); } -void LCAO_Hamilt::calculat_HR_dftu_soc_sparse(const int ¤t_spin, const double &sparse_threshold) +void LCAO_Hamilt::cal_HR_dftu_soc_sparse(const int ¤t_spin, const double &sparse_threshold) { - ModuleBase::TITLE("LCAO_Hamilt","calculat_HR_dftu_soc_sparse"); - ModuleBase::timer::tick("LCAO_Hamilt","calculat_HR_dftu_soc_sparse"); + ModuleBase::TITLE("LCAO_Hamilt","cal_HR_dftu_soc_sparse"); + ModuleBase::timer::tick("LCAO_Hamilt","cal_HR_dftu_soc_sparse"); int total_R_num = this->LM->all_R_coor.size(); int *nonzero_num = new int[total_R_num]; @@ -626,9 +696,9 @@ void LCAO_Hamilt::calculat_HR_dftu_soc_sparse(const int ¤t_spin, const dou std::complex *HR_soc_tmp = new std::complex[this->LM->ParaV->nloc]; std::complex *SR_soc_tmp = new std::complex[this->LM->ParaV->nloc]; - int ir; - int ic; - int iic; + int ir=0; + int ic=0; + int iic=0; count = 0; for (auto &R_coor : this->LM->all_R_coor) @@ -802,9 +872,9 @@ void LCAO_Hamilt::clear_zero_elements(const int ¤t_spin, const double &spa } } -void LCAO_Hamilt::calculate_dSTN_R_sparse(const int ¤t_spin, const double &sparse_threshold) +void LCAO_Hamilt::cal_dSTN_R_sparse(const int ¤t_spin, const double &sparse_threshold) { - ModuleBase::TITLE("LCAO_Hamilt","calculate_dSTN_R_sparse"); + ModuleBase::TITLE("LCAO_Hamilt","cal_dSTN_R_sparse"); int index = 0; ModuleBase::Vector3 dtau, tau1, tau2; @@ -901,7 +971,7 @@ void LCAO_Hamilt::calculate_dSTN_R_sparse(const int ¤t_spin, const double } else { - ModuleBase::WARNING_QUIT("calculate_dSTN_R_sparse","soc not supported!"); + ModuleBase::WARNING_QUIT("cal_dSTN_R_sparse","soc not supported!"); } ++index; } diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.h b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.h index 53002629da..b57ebf43e7 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.h @@ -4,10 +4,13 @@ #include "module_base/global_function.h" #include "module_base/global_variable.h" #include "LCAO_gen_fixedH.h" -#include "module_hamilt_lcao/module_gint/gint_gamma.h" -#include "module_hamilt_lcao/module_gint/gint_k.h" #include "module_hamilt_lcao/module_hcontainer/hcontainer.h" #include "module_hamilt_general/hamilt.h" +#include "module_hamilt_lcao/module_gint/grid_technique.h" + +#include "module_hamilt_lcao/module_gint/gint_gamma.h" +#include "module_hamilt_lcao/module_gint/gint_k.h" + #ifdef __EXX #include @@ -18,46 +21,76 @@ class LCAO_Hamilt public: LCAO_Hamilt(); + ~LCAO_Hamilt(); - void grid_prepare(const Grid_Technique& gt, const ModulePW::PW_Basis& rhopw, const ModulePW::PW_Basis_Big& bigpw); + void grid_prepare( + const Grid_Technique& gt, + Gint_Gamma &gint_gamma, + Gint_k &gint_k, + const ModulePW::PW_Basis& rhopw, + const ModulePW::PW_Basis_Big& bigpw); // jingan add 2021-6-4 - void set_R_range_sparse(); - void calculate_HContainer_sparse_d(const int ¤t_spin, + void set_R_range_sparse(LCAO_Matrix &lm); + + void cal_HContainer_sparse_d(const int ¤t_spin, const double &sparse_threshold, const hamilt::HContainer& hR, std::map, std::map>>& target); - void calculate_HContainer_sparse_cd(const int ¤t_spin, + + void cal_HContainer_sparse_cd(const int ¤t_spin, const double &sparse_threshold, const hamilt::HContainer>& hR, std::map, std::map>>>& target); - void calculate_dSTN_R_sparse(const int ¤t_spin, const double &sparse_threshold); - void calculate_STN_R_sparse_for_S(const double &sparse_threshold); - void calculate_STN_R_sparse_for_T(const double &sparse_threshold); - void calculat_HR_dftu_sparse(const int ¤t_spin, const double &sparse_threshold); - void calculat_HR_dftu_soc_sparse(const int ¤t_spin, const double &sparse_threshold); + + void cal_dSTN_R_sparse(const int ¤t_spin, const double &sparse_threshold); + + // mohan update 2024-04-01 + void cal_STN_R_sparse_for_S( + const Parallel_Orbitals pv, + std::vector &slocR, + std::vector> &slocR_soc, + std::map, std::map>> &SR_sparse, + std::map, std::map>>> &SR_soc_sparse, + const double &sparse_threshold); + + void cal_STN_R_sparse_for_T(const double &sparse_threshold); + + void cal_HR_dftu_sparse(const int ¤t_spin, const double &sparse_threshold); + + void cal_HR_dftu_soc_sparse(const int ¤t_spin, const double &sparse_threshold); + #ifdef __EXX - template void calculate_HR_exx_sparse( + template void cal_HR_exx_sparse( const int ¤t_spin, const double &sparse_threshold, const int (&nmp)[3], const std::vector< std::map >, RI::Tensor > >>& Hexxs); #endif - void calculate_HSR_sparse(const int ¤t_spin, const double &sparse_threshold, const int (&nmp)[3], hamilt::Hamilt>* p_ham); - void calculate_SR_sparse(const double &sparse_threshold, hamilt::Hamilt>* p_ham); + + void cal_HSR_sparse( + const int ¤t_spin, + const double &sparse_threshold, + const int (&nmp)[3], + hamilt::Hamilt>* p_ham); + + void cal_SR_sparse(const double &sparse_threshold, hamilt::Hamilt>* p_ham); + void clear_zero_elements(const int ¤t_spin, const double &sparse_threshold); + void destroy_all_HSR_sparse(void); - void calculate_TR_sparse(const double &sparse_threshold); + + void cal_TR_sparse(const double &sparse_threshold); + void destroy_TR_sparse(void); - void calculate_dH_sparse(const int ¤t_spin, const double &sparse_threshold); - void destroy_dH_R_sparse(void); - // used for gamma only algorithms. - Gint_Gamma GG; + void cal_dH_sparse( + const int ¤t_spin, + const double &sparse_threshold, + Gint_k &gint_k); // mohan add 2024-04-01 - // used for k-dependent grid integration. - Gint_k GK; + void destroy_dH_R_sparse(void); // use overlap matrix to generate fixed Hamiltonian LCAO_gen_fixedH genH; diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.hpp b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.hpp index db8b32a13a..57ed48c7e7 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.hpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.hpp @@ -23,30 +23,35 @@ // Peize Lin add 2022.09.13 template -void LCAO_Hamilt::calculate_HR_exx_sparse( +void LCAO_Hamilt::cal_HR_exx_sparse( const int ¤t_spin, const double &sparse_threshold, const int (&nmp)[3], const std::vector< std::map>, RI::Tensor>>>& Hexxs) { - ModuleBase::TITLE("LCAO_Hamilt","calculate_HR_exx_sparse"); - ModuleBase::timer::tick("LCAO_Hamilt","calculate_HR_exx_sparse"); + ModuleBase::TITLE("LCAO_Hamilt","cal_HR_exx_sparse"); + ModuleBase::timer::tick("LCAO_Hamilt","cal_HR_exx_sparse"); const Tdata frac = GlobalC::exx_info.info_global.hybrid_alpha; std::map> atoms_pos; for(int iat=0; iat,3> latvec = {RI_Util::Vector3_to_array3(GlobalC::ucell.a1), RI_Util::Vector3_to_array3(GlobalC::ucell.a2), RI_Util::Vector3_to_array3(GlobalC::ucell.a3)}; + const std::array Rs_period = {nmp[0], nmp[1], nmp[2]}; RI::Cell_Nearest cell_nearest; cell_nearest.init(atoms_pos, latvec, Rs_period); const std::vector is_list = (GlobalV::NSPIN!=4) ? std::vector{current_spin} : std::vector{0,1,2,3}; + for(const int is : is_list) { int is0_b, is1_b; @@ -102,7 +107,7 @@ void LCAO_Hamilt::calculate_HR_exx_sparse( } } - ModuleBase::timer::tick("LCAO_Hamilt","calculate_HR_exx_sparse"); + ModuleBase::timer::tick("LCAO_Hamilt","cal_HR_exx_sparse"); } #endif diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.cpp index b394ccd032..38bf7b138f 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.cpp @@ -45,11 +45,13 @@ void LCAO_Matrix::divide_HS_in_frag(const bool isGamma, Parallel_Orbitals &pv, c { na[it] = GlobalC::ucell.atoms[it].na; } + GlobalC::ld.init(GlobalC::ORB, GlobalC::ucell.nat, GlobalC::ucell.ntype, pv, na); + if(GlobalV::deepks_scf) { if(isGamma) @@ -72,7 +74,11 @@ void LCAO_Matrix::allocate_HS_gamma(const long &nloc) ModuleBase::TITLE("LCAO_Matrix","allocate_HS_gamma"); ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running,"nloc",nloc); - if(nloc==0) return; //mohan fix bug 2012-05-25 + + if(nloc==0) + { + return; + } // because we initilize in the constructor function // with dimension '1', so here we reconstruct these @@ -95,7 +101,11 @@ void LCAO_Matrix::allocate_HS_k(const long &nloc) ModuleBase::TITLE("LCAO_Matrix","allocate_HS_k"); ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running,"nloc",nloc); - if(nloc==0) return; //mohan fix bug 2012-05-25 + + if(nloc==0) + { + return; //mohan fix bug 2012-05-25 + } // because we initilize in the constructor function // with dimension '1', so here we reconstruct these @@ -116,19 +126,33 @@ void LCAO_Matrix::allocate_HS_R(const int &nnR) if(GlobalV::NSPIN!=4) { this->SlocR.resize(nnR); - if(GlobalV::CALCULATION!="get_S") this->Hloc_fixedR.resize(nnR); + if(GlobalV::CALCULATION!="get_S") + { + this->Hloc_fixedR.resize(nnR); + } ModuleBase::GlobalFunc::ZEROS(SlocR.data(), nnR); - if(GlobalV::CALCULATION!="get_S") ModuleBase::GlobalFunc::ZEROS(Hloc_fixedR.data(), nnR); + + if(GlobalV::CALCULATION!="get_S") + { + ModuleBase::GlobalFunc::ZEROS(Hloc_fixedR.data(), nnR); + } } else { this->SlocR_soc.resize(nnR); - if(GlobalV::CALCULATION!="get_S") this->Hloc_fixedR_soc.resize(nnR); + if(GlobalV::CALCULATION!="get_S") + { + this->Hloc_fixedR_soc.resize(nnR); + } ModuleBase::GlobalFunc::ZEROS(SlocR_soc.data(), nnR); - if(GlobalV::CALCULATION!="get_S") ModuleBase::GlobalFunc::ZEROS(Hloc_fixedR_soc.data(), nnR); - + + if(GlobalV::CALCULATION!="get_S") + { + ModuleBase::GlobalFunc::ZEROS(Hloc_fixedR_soc.data(), nnR); + } + } return; @@ -139,16 +163,26 @@ void LCAO_Matrix::set_HSgamma(const int& iw1_all, const int& iw2_all, const doub LCAO_Matrix::set_mat2d(iw1_all, iw2_all, v, *this->ParaV, HSloc); return; } + + void LCAO_Matrix::set_HSk(const int& iw1_all, const int& iw2_all, const std::complex& v, const char& dtype, const int spin) { - if (dtype=='S')//overlap Hamiltonian. - LCAO_Matrix::set_mat2d>(iw1_all, iw2_all, v, *this->ParaV, this->Sloc2.data()); - else if (dtype=='T' || dtype=='N')// kinetic and nonlocal Hamiltonian. - LCAO_Matrix::set_mat2d>(iw1_all, iw2_all, v, *this->ParaV, this->Hloc_fixed2.data()); - else if (dtype=='L') // Local potential Hamiltonian. - LCAO_Matrix::set_mat2d>(iw1_all, iw2_all, v, *this->ParaV, this->Hloc2.data()); - else - ModuleBase::WARNING_QUIT("LCAO_Matrix", "set_HSk"); + if (dtype=='S')//overlap Hamiltonian. + { + LCAO_Matrix::set_mat2d>(iw1_all, iw2_all, v, *this->ParaV, this->Sloc2.data()); + } + else if (dtype=='T' || dtype=='N')// kinetic and nonlocal Hamiltonian. + { + LCAO_Matrix::set_mat2d>(iw1_all, iw2_all, v, *this->ParaV, this->Hloc_fixed2.data()); + } + else if (dtype=='L') // Local potential Hamiltonian. + { + LCAO_Matrix::set_mat2d>(iw1_all, iw2_all, v, *this->ParaV, this->Hloc2.data()); + } + else + { + ModuleBase::WARNING_QUIT("LCAO_Matrix", "set_HSk"); + } return; } @@ -267,17 +301,38 @@ void LCAO_Matrix::zeros_HSgamma(const char &mtype) long long beg, len; if (mtype=='S') { - ModuleBase::BLOCK_TASK_DIST_1D(num_threads, thread_id, (long long)this->Sloc.size(), (long long)512, beg, len); - ModuleBase::GlobalFunc::ZEROS(this->Sloc.data() + beg, len); + ModuleBase::BLOCK_TASK_DIST_1D( + num_threads, + thread_id, + (long long)this->Sloc.size(), + (long long)512, + beg, + len); + + ModuleBase::GlobalFunc::ZEROS(this->Sloc.data() + beg, len); } else if (mtype=='T') { - ModuleBase::BLOCK_TASK_DIST_1D(num_threads, thread_id, (long long)this->Hloc_fixed.size(), (long long)512, beg, len); + ModuleBase::BLOCK_TASK_DIST_1D( + num_threads, + thread_id, + (long long)this->Hloc_fixed.size(), + (long long)512, + beg, + len); + ModuleBase::GlobalFunc::ZEROS(this->Hloc_fixed.data() + beg, len); } else if (mtype=='H') { - ModuleBase::BLOCK_TASK_DIST_1D(num_threads, thread_id, (long long)this->Hloc.size(), (long long)512, beg, len); + ModuleBase::BLOCK_TASK_DIST_1D( + num_threads, + thread_id, + (long long)this->Hloc.size(), + (long long)512, + beg, + len); + ModuleBase::GlobalFunc::ZEROS(this->Hloc.data() + beg, len); } }; @@ -404,12 +459,10 @@ void LCAO_Matrix::print_HSk(const char &mtype, const char &vtype, const double & if( std::abs(v) > accuracy ) { - // os << std::setw(15) << v; os << v << "\t"; } else { - // os << std::setw(15) << "0"; os << "0" << "\t"; } } @@ -556,9 +609,6 @@ void LCAO_Matrix::allocate_Hloc_fixedR_tr(void) { ModuleBase::TITLE("LCAO_Matrix","allocate_Hloc_fixedR_tr"); - //int R_x = 10; - //int R_y = 10; - //int R_z = 10; int R_x = GlobalC::GridD.getCellX(); int R_y = GlobalC::GridD.getCellY(); int R_z = GlobalC::GridD.getCellZ(); @@ -566,26 +616,16 @@ void LCAO_Matrix::allocate_Hloc_fixedR_tr(void) if(GlobalV::NSPIN!=4) { Hloc_fixedR_tr = new double***[R_x]; - //HR_tr = new double***[R_x]; - //SlocR_tr = new double***[R_x]; for(int ix=0; ixParaV->nloc]; - //HR_tr[ix][iy][iz] = new double[this->ParaV->nloc]; - //SlocR_tr[ix][iy][iz] = new double[this->ParaV->nloc]; ModuleBase::GlobalFunc::ZEROS(Hloc_fixedR_tr[ix][iy][iz], this->ParaV->nloc); - //ModuleBase::GlobalFunc::ZEROS(HR_tr[ix][iy][iz], this->ParaV->nloc); - //ModuleBase::GlobalFunc::ZEROS(SlocR_tr[ix][iy][iz], this->ParaV->nloc); } } } @@ -593,36 +633,20 @@ void LCAO_Matrix::allocate_Hloc_fixedR_tr(void) else { Hloc_fixedR_tr_soc = new std::complex***[R_x]; - //HR_tr = new double***[R_x]; - //SlocR_tr = new double***[R_x]; for(int ix=0; ix**[R_y]; - //HR_tr[ix] = new double**[R_y]; - //SlocR_tr[ix] = new double**[R_y]; for(int iy=0; iy*[R_z]; - //HR_tr[ix][iy] = new double*[R_z]; - //SlocR_tr[ix][iy] = new double*[R_z]; for(int iz=0; iz[this->ParaV->nloc]; - //HR_tr[ix][iy][iz] = new double[this->ParaV->nloc]; - //SlocR_tr[ix][iy][iz] = new double[this->ParaV->nloc]; ModuleBase::GlobalFunc::ZEROS(Hloc_fixedR_tr_soc[ix][iy][iz], this->ParaV->nloc); - //ModuleBase::GlobalFunc::ZEROS(HR_tr[ix][iy][iz], this->ParaV->nloc); - //ModuleBase::GlobalFunc::ZEROS(SlocR_tr[ix][iy][iz], this->ParaV->nloc); } } } } -//std::cout<<"R_x: "<ParaV->nloc: "<ParaV->nloc< &v) +void LCAO_Matrix::set_HR_tr_soc( + const int &Rx, + const int &Ry, + const int &Rz, + const int &iw1_all, + const int &iw2_all, + const std::complex &v) { const int ir = this->ParaV->global2local_row(iw1_all); const int ic = this->ParaV->global2local_col(iw2_all); -//std::cout<<"ir: "<ParaV->nrow+ir; -//std::cout<<"index: "<ParaV->ncol+ic; -//std::cout<<"index: "<ParaV->nloc: "<ParaV->nloc<ParaV->nloc); -//std::cout<<"Rx: "<>; std::vector< std::map>>> *Hexxd; - std::vector< std::map>>>> *Hexxc; + std::vector< std::map>>>>* Hexxc; + /// @brief Hexxk for all k-points, only for the 1st scf loop ofrestart load + std::vector> Hexxd_k_load; + std::vector>> Hexxc_k_load; #endif void allocate_HS_k(const long &nloc); @@ -189,41 +192,96 @@ class LCAO_Matrix double* DHloc_fixed_23; double* DHloc_fixed_33; - template - static void set_mat2d(const int& global_ir, const int& global_ic, const T& v, const Parallel_Orbitals& pv, T* mat); - void set_HSgamma(const int& iw1_all, const int& iw2_all, const double& v, double* HSloc); - void set_HSk(const int &iw1_all, const int &iw2_all, const std::complex &v, const char &dtype, const int spin = 0); - - void set_force (const int& iw1_all, const int& iw2_all, const double& vx, const double& vy, - const double& vz, const char &dtype); - void set_stress (const int& iw1_all, const int& iw2_all, const double& vx, const double& vy, - const double& vz, const char &dtype, const ModuleBase::Vector3 &dtau); - - void set_HR_tr(const int &Rx, const int &Ry, const int &Rz, const int &iw1_all, const int &iw2_all, const double &v); - void set_HR_tr_soc(const int &Rx, const int &Ry, const int &Rz, - const int &iw1_all, const int &iw2_all, const std::complex &v); //LiuXh add 2019-07-16 + template + static void set_mat2d( + const int& global_ir, + const int& global_ic, + const T& v, + const Parallel_Orbitals& pv, + T* mat); + + void set_HSgamma( + const int& iw1_all, + const int& iw2_all, + const double& v, + double* HSloc); + + void set_HSk( + const int &iw1_all, + const int &iw2_all, + const std::complex &v, + const char &dtype, + const int spin = 0); + + void set_force ( + const int& iw1_all, + const int& iw2_all, + const double& vx, + const double& vy, + const double& vz, + const char &dtype); + + void set_stress ( + const int& iw1_all, + const int& iw2_all, + const double& vx, + const double& vy, + const double& vz, + const char &dtype, + const ModuleBase::Vector3 &dtau); + + void set_HR_tr( + const int &Rx, + const int &Ry, + const int &Rz, + const int &iw1_all, + const int &iw2_all, + const double &v); + + void set_HR_tr_soc( + const int &Rx, + const int &Ry, + const int &Rz, + const int &iw1_all, + const int &iw2_all, + const std::complex &v); //LiuXh add 2019-07-16 void zeros_HSgamma(const char &mtype); + void zeros_HSk(const char &mtype); + void zeros_HSR(const char &mtype); void print_HSgamma(const char &mtype, std::ostream &os=std::cout); - void print_HSk(const char &mtype, const char &vtype = 'C', const double &accuracy = 1.0e-5, std::ostream &os=std::cout); + + void print_HSk( + const char &mtype, + const char &vtype = 'C', + const double &accuracy = 1.0e-5, + std::ostream &os=std::cout); + void update_Hloc(void); + void update_Hloc2(const int &ik); void allocate_HS_R(const int &nnr); void output_HSk(const char &mtype, std::string &fn); + //LiuXh add 2019-07-15 void allocate_Hloc_fixedR_tr(void); + void allocate_HR_tr(void); + void allocate_SlocR_tr(void); + void destroy_Hloc_fixedR_tr(void); // jingan add 2021-6-4, modify 2021-12-2 void destroy_HS_R_sparse(void); + void destroy_T_R_sparse(void); + void destroy_dH_R_sparse(void); }; diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/foverlap_k.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/foverlap_k.cpp new file mode 100644 index 0000000000..0fcb9a9251 --- /dev/null +++ b/source/module_hamilt_lcao/hamilt_lcaodft/foverlap_k.cpp @@ -0,0 +1,250 @@ +#include "FORCE_k.h" + +#include +#include + +#include "module_base/memory.h" +#include "module_base/parallel_reduce.h" +#include "module_base/timer.h" +#include "module_base/tool_threading.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" +#include "module_elecstate/cal_dm.h" +#include "module_elecstate/module_dm/cal_dm_psi.h" +#include "module_elecstate/elecstate_lcao.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" +#include "module_io/write_HS.h" + +#ifdef __DEEPKS +#include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" +#endif + +#ifdef _OPENMP +#include +#endif + +#include "module_hamilt_lcao/hamilt_lcaodft/record_adj.h" + + +void Force_LCAO_k::cal_foverlap_k(const bool isforce, + const bool isstress, + Record_adj &ra, + const psi::Psi> *psi, + Local_Orbital_Charge &loc, + Parallel_Orbitals &pv, + LCAO_Matrix &lm, + const elecstate::DensityMatrix, double> *DM, + ModuleBase::matrix &foverlap, + ModuleBase::matrix &soverlap, + const elecstate::ElecState *pelec, + const int &nks, + const K_Vectors &kv) +{ + ModuleBase::TITLE("Force_LCAO_k", "cal_foverlap_k"); + ModuleBase::timer::tick("Force_LCAO_k", "cal_foverlap_k"); + + // construct a DensityMatrix object + elecstate::DensityMatrix, double> EDM(&kv,&pv,GlobalV::NSPIN); + + //-------------------------------------------- + // calculate the energy density matrix here. + //-------------------------------------------- + ModuleBase::timer::tick("Force_LCAO_k", "cal_edm_2d"); + + ModuleBase::matrix wgEkb; + wgEkb.create(nks, GlobalV::NBANDS); + ModuleBase::Memory::record("Force::wgEkb", sizeof(double) * nks * GlobalV::NBANDS); +#ifdef _OPENMP +#pragma omp parallel for collapse(2) schedule(static, 1024) +#endif + for (int ik = 0; ik < nks; ik++) + { + for (int ib = 0; ib < GlobalV::NBANDS; ib++) + { + wgEkb(ik, ib) = pelec->wg(ik, ib) * pelec->ekb(ik, ib); + } + } + std::vector edm_k(nks); + + // use the original formula (Hamiltonian matrix) to calculate energy density matrix + if (DM->EDMK.size()) + { +#ifdef _OPENMP +#pragma omp parallel for schedule(static, 1024) +#endif + for (int ik = 0; ik < nks; ++ik) + { + //edm_k[ik] = loc.edm_k_tddft[ik]; + EDM.set_DMK_pointer(ik,DM->EDMK[ik].c); + } + } + else + { + //elecstate::cal_dm(pv, wgEkb, psi[0], edm_k); + // cal_dm_psi + elecstate::cal_dm_psi(EDM.get_paraV_pointer(), wgEkb, psi[0], EDM); + } + + //loc.cal_dm_R(edm_k, ra, edm2d, kv); + + // cal_dm_2d + EDM.init_DMR(ra,&GlobalC::ucell); + EDM.cal_DMR(); + EDM.sum_DMR_spin(); + // + ModuleBase::timer::tick("Force_LCAO_k", "cal_edm_2d"); + //-------------------------------------------- + // summation \sum_{i,j} E(i,j)*dS(i,j) + // BEGIN CALCULATION OF FORCE OF EACH ATOM + //-------------------------------------------- + int total_irr = 0; +#ifdef _OPENMP +#pragma omp parallel + { + int num_threads = omp_get_num_threads(); + ModuleBase::matrix local_soverlap(3, 3); + int local_total_irr = 0; +#else + ModuleBase::matrix& local_soverlap = soverlap; + int& local_total_irr = total_irr; +#endif + + ModuleBase::Vector3 tau1, dtau, tau2; + +#ifdef _OPENMP +#pragma omp for schedule(dynamic) +#endif + for (int iat = 0; iat < GlobalC::ucell.nat; iat++) + { + const int T1 = GlobalC::ucell.iat2it[iat]; + Atom* atom1 = &GlobalC::ucell.atoms[T1]; + const int I1 = GlobalC::ucell.iat2ia[iat]; + // get iat1 + int iat1 = GlobalC::ucell.itia2iat(T1, I1); + double* foverlap_iat; + if (isforce) + { + foverlap_iat = &foverlap(iat, 0); + } + +#ifdef _OPENMP + // using local stack to avoid false sharing in multi-threaded case + double foverlap_temp[3] = {0.0, 0.0, 0.0}; + if (num_threads > 1) + { + foverlap_iat = foverlap_temp; + } +#endif + int irr = pv.nlocstart[iat]; + const int start1 = GlobalC::ucell.itiaiw2iwt(T1, I1, 0); + for (int cb = 0; cb < ra.na_each[iat]; ++cb) + { + const int T2 = ra.info[iat][cb][3]; + const int I2 = ra.info[iat][cb][4]; + + const int start2 = GlobalC::ucell.itiaiw2iwt(T2, I2, 0); + + Atom* atom2 = &GlobalC::ucell.atoms[T2]; + + // get iat2 + int iat2 = GlobalC::ucell.itia2iat(T2, I2); + double Rx = ra.info[iat][cb][0]; + double Ry = ra.info[iat][cb][1]; + double Rz = ra.info[iat][cb][2]; + // get BaseMatrix + hamilt::BaseMatrix* tmp_matrix = EDM.get_DMR_pointer(1)->find_matrix(iat1, iat2, Rx, Ry, Rz); + if(tmp_matrix == nullptr) + { + continue; + } + int row_ap = pv.atom_begin_row[iat1]; + int col_ap = pv.atom_begin_col[iat2]; + // get DMR + for (int mu = 0; mu < pv.get_row_size(iat1); ++mu) + { + for (int nu = 0; nu < pv.get_col_size(iat2); ++nu) + { + // here do not sum over spin due to EDM.sum_DMR_spin(); + double edm2d1 = tmp_matrix->get_value(mu,nu); + double edm2d2 = 2.0 * edm2d1; + + if (isforce) + { + foverlap_iat[0] -= edm2d2 * lm.DSloc_Rx[irr]; + foverlap_iat[1] -= edm2d2 * lm.DSloc_Ry[irr]; + foverlap_iat[2] -= edm2d2 * lm.DSloc_Rz[irr]; + } + if (isstress) + { + for (int ipol = 0; ipol < 3; ipol++) + { + local_soverlap(0, ipol) += edm2d1 * lm.DSloc_Rx[irr] + * lm.DH_r[irr * 3 + ipol]; + if (ipol < 1) + { + continue; + } + local_soverlap(1, ipol) += edm2d1 * lm.DSloc_Ry[irr] + * lm.DH_r[irr * 3 + ipol]; + if (ipol < 2) + { + continue; + } + local_soverlap(2, ipol) += edm2d1 * lm.DSloc_Rz[irr] + * lm.DH_r[irr * 3 + ipol]; + } + } + //} + ++local_total_irr; + ++irr; + } // end kk + } // end jj + } // end cb +#ifdef _OPENMP + if (isforce && num_threads > 1) + { + foverlap(iat, 0) += foverlap_iat[0]; + foverlap(iat, 1) += foverlap_iat[1]; + foverlap(iat, 2) += foverlap_iat[2]; + } +#endif + } // end iat +#ifdef _OPENMP +#pragma omp critical(cal_foverlap_k_reduce) + { + total_irr += local_total_irr; + if (isstress) + { + for (int ipol = 0; ipol < 3; ipol++) + { + soverlap(0, ipol) += local_soverlap(0, ipol); + if (ipol < 1) + { + continue; + } + soverlap(1, ipol) += local_soverlap(1, ipol); + if (ipol < 2) + { + continue; + } + soverlap(2, ipol) += local_soverlap(2, ipol); + } + } + } + } +#endif + + if (isstress) + { + StressTools::stress_fill(GlobalC::ucell.lat0, GlobalC::ucell.omega, soverlap); + } + + if (total_irr != pv.nnr) + { + ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running, "wrong irr", total_irr); + ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running, "wrong LNNR.nnr", pv.nnr); + ModuleBase::WARNING_QUIT("Force_LCAO_k::cal_foverlap_k", "irr!=LNNR.nnr"); + } + + ModuleBase::timer::tick("Force_LCAO_k", "cal_foverlap_k"); + return; +} diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/ftvnl_dphi_k.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/ftvnl_dphi_k.cpp new file mode 100644 index 0000000000..ab95392b11 --- /dev/null +++ b/source/module_hamilt_lcao/hamilt_lcaodft/ftvnl_dphi_k.cpp @@ -0,0 +1,165 @@ +#include "FORCE_k.h" + +#include +#include + +#include "module_base/memory.h" +#include "module_base/parallel_reduce.h" +#include "module_base/timer.h" +#include "module_base/tool_threading.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" +#include "module_elecstate/cal_dm.h" +#include "module_elecstate/module_dm/cal_dm_psi.h" +#include "module_elecstate/elecstate_lcao.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" +#include "module_io/write_HS.h" + +#ifdef __DEEPKS +#include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" +#endif + +#ifdef _OPENMP +#include +#endif + + +void Force_LCAO_k::cal_ftvnl_dphi_k(const elecstate::DensityMatrix, double>* DM, + const Parallel_Orbitals &pv, + LCAO_Matrix &lm, + const bool isforce, + const bool isstress, + Record_adj& ra, + ModuleBase::matrix& ftvnl_dphi, + ModuleBase::matrix& stvnl_dphi) +{ + ModuleBase::TITLE("Force_LCAO_k", "cal_ftvnl_dphi_k"); + ModuleBase::timer::tick("Force_LCAO_k", "cal_ftvnl_dphi_k"); + + int total_irr = 0; + // get the adjacent atom's information. + + // GlobalV::ofs_running << " calculate the ftvnl_dphi_k force" << std::endl; +#ifdef _OPENMP +#pragma omp parallel + { + int num_threads = omp_get_num_threads(); + ModuleBase::matrix local_stvnl_dphi(3, 3); + int local_total_irr = 0; +#pragma omp for schedule(dynamic) +#else + ModuleBase::matrix& local_stvnl_dphi = stvnl_dphi; + int& local_total_irr = total_irr; +#endif + for (int iat = 0; iat < GlobalC::ucell.nat; iat++) + { + const int T1 = GlobalC::ucell.iat2it[iat]; + Atom* atom1 = &GlobalC::ucell.atoms[T1]; + const int I1 = GlobalC::ucell.iat2ia[iat]; + // get iat1 + int iat1 = GlobalC::ucell.itia2iat(T1, I1); + // + int irr = pv.nlocstart[iat]; + const int start1 = GlobalC::ucell.itiaiw2iwt(T1, I1, 0); + double* ftvnl_dphi_iat; + if (isforce) + { + ftvnl_dphi_iat = &ftvnl_dphi(iat, 0); + } +#ifdef _OPENMP + // using local stack to avoid false sharing in multi-threaded case + double ftvnl_dphi_temp[3] = {0.0, 0.0, 0.0}; + if (num_threads > 1) + { + ftvnl_dphi_iat = ftvnl_dphi_temp; + } +#endif + for (int cb = 0; cb < ra.na_each[iat]; ++cb) + { + const int T2 = ra.info[iat][cb][3]; + const int I2 = ra.info[iat][cb][4]; + const int start2 = GlobalC::ucell.itiaiw2iwt(T2, I2, 0); + Atom* atom2 = &GlobalC::ucell.atoms[T2]; + // get iat2 + int iat2 = GlobalC::ucell.itia2iat(T2, I2); + double Rx = ra.info[iat][cb][0]; + double Ry = ra.info[iat][cb][1]; + double Rz = ra.info[iat][cb][2]; + // get BaseMatrix + if (pv.get_row_size(iat1) <= 0 || pv.get_col_size(iat2) <= 0) + { + continue; + } + std::vector*> tmp_matrix; + for (int is = 0; is < GlobalV::NSPIN; ++is) + { + tmp_matrix.push_back(DM->get_DMR_pointer(is+1)->find_matrix(iat1, iat2, Rx, Ry, Rz)); + } + //hamilt::BaseMatrix* tmp_matrix = DM->get_DMR_pointer(1)->find_matrix(iat1, iat2, Rx, Ry, Rz); + for (int mu = 0; mu < pv.get_row_size(iat1); ++mu) + { + for (int nu = 0; nu < pv.get_col_size(iat2); ++nu) + { + // get value from DM + double dm2d1 = 0.0; + for (int is = 0; is < GlobalV::NSPIN; ++is) + { + dm2d1 += tmp_matrix[is]->get_value(mu, nu); + } + double dm2d2 = 2.0 * dm2d1; + // + if (isforce) + { + ftvnl_dphi_iat[0] += dm2d2 * lm.DHloc_fixedR_x[irr]; + ftvnl_dphi_iat[1] += dm2d2 * lm.DHloc_fixedR_y[irr]; + ftvnl_dphi_iat[2] += dm2d2 * lm.DHloc_fixedR_z[irr]; + } + if (isstress) + { + local_stvnl_dphi(0, 0) -= dm2d1 * lm.stvnl11[irr]; + local_stvnl_dphi(0, 1) -= dm2d1 * lm.stvnl12[irr]; + local_stvnl_dphi(0, 2) -= dm2d1 * lm.stvnl13[irr]; + local_stvnl_dphi(1, 1) -= dm2d1 * lm.stvnl22[irr]; + local_stvnl_dphi(1, 2) -= dm2d1 * lm.stvnl23[irr]; + local_stvnl_dphi(2, 2) -= dm2d1 * lm.stvnl33[irr]; + } + //} + ++local_total_irr; + ++irr; + } // end kk + } // end jj + } // end cb +#ifdef _OPENMP + if (isforce && num_threads > 1) + { + ftvnl_dphi(iat, 0) += ftvnl_dphi_iat[0]; + ftvnl_dphi(iat, 1) += ftvnl_dphi_iat[1]; + ftvnl_dphi(iat, 2) += ftvnl_dphi_iat[2]; + } +#endif + } // end iat +#ifdef _OPENMP +#pragma omp critical(cal_ftvnl_dphi_k_reduce) + { + total_irr += local_total_irr; + if (isstress) + { + stvnl_dphi(0, 0) += local_stvnl_dphi(0, 0); + stvnl_dphi(0, 1) += local_stvnl_dphi(0, 1); + stvnl_dphi(0, 2) += local_stvnl_dphi(0, 2); + stvnl_dphi(1, 1) += local_stvnl_dphi(1, 1); + stvnl_dphi(1, 2) += local_stvnl_dphi(1, 2); + stvnl_dphi(2, 2) += local_stvnl_dphi(2, 2); + } + } + } +#endif + assert(total_irr == pv.nnr); + + if (isstress) + { + StressTools::stress_fill(GlobalC::ucell.lat0, GlobalC::ucell.omega, stvnl_dphi); + } + + ModuleBase::timer::tick("Force_LCAO_k", "cal_ftvnl_dphi_k"); + return; +} diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/fvl_dphi_k.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/fvl_dphi_k.cpp new file mode 100644 index 0000000000..f6d267c511 --- /dev/null +++ b/source/module_hamilt_lcao/hamilt_lcaodft/fvl_dphi_k.cpp @@ -0,0 +1,96 @@ +#include "FORCE_k.h" + +#include +#include + +#include "module_base/memory.h" +#include "module_base/parallel_reduce.h" +#include "module_base/timer.h" +#include "module_base/tool_threading.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" +#include "module_elecstate/cal_dm.h" +#include "module_elecstate/module_dm/cal_dm_psi.h" +#include "module_elecstate/elecstate_lcao.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" +#include "module_io/write_HS.h" + +#ifdef __DEEPKS +#include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" +#endif + +#ifdef _OPENMP +#include +#endif + + +// calculate the force due to < phi | Vlocal | dphi > +void Force_LCAO_k::cal_fvl_dphi_k(const bool isforce, + const bool isstress, + LCAO_Matrix &lm, + Gint_k &gint_k, + const elecstate::Potential* pot_in, + ModuleBase::matrix& fvl_dphi, + ModuleBase::matrix& svl_dphi, + double** DM_R) +{ + ModuleBase::TITLE("Force_LCAO_k", "cal_fvl_dphi_k"); + ModuleBase::timer::tick("Force_LCAO_k", "cal_fvl_dphi_k"); + + if (!isforce && !isstress) + { + ModuleBase::timer::tick("Force_LCAO_k", "cal_fvl_dphi_k"); + return; + } + + assert(lm.DHloc_fixedR_x != NULL); + assert(lm.DHloc_fixedR_y != NULL); + assert(lm.DHloc_fixedR_z != NULL); + + int istep = 1; + + for (int is = 0; is < GlobalV::NSPIN; ++is) + { + GlobalV::CURRENT_SPIN = is; + + const double* vr_eff1 = pot_in->get_effective_v(GlobalV::CURRENT_SPIN); + const double* vofk_eff1 = nullptr; + if (XC_Functional::get_func_type() == 3 || XC_Functional::get_func_type() == 5) + { + vofk_eff1 = pot_in->get_effective_vofk(GlobalV::CURRENT_SPIN); + } + + //-------------------------------- + // Grid integration here. + //-------------------------------- + // fvl_dphi can not be set to zero here if Vna is used + if (isstress || isforce) + { + if (XC_Functional::get_func_type() == 3 || XC_Functional::get_func_type() == 5) + { + Gint_inout inout(DM_R, + is, + vr_eff1, + vofk_eff1, + isforce, + isstress, + &fvl_dphi, + &svl_dphi, + Gint_Tools::job_type::force_meta); + gint_k.cal_gint(&inout); + } + else + { + Gint_inout inout(DM_R, is, vr_eff1, isforce, isstress, &fvl_dphi, &svl_dphi, Gint_Tools::job_type::force); + gint_k.cal_gint(&inout); + } + } + } + + if (isstress) + { + StressTools::stress_fill(-1.0, GlobalC::ucell.omega, svl_dphi); + } + + ModuleBase::timer::tick("Force_LCAO_k", "cal_fvl_dphi_k"); + return; +} diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/fvnl_dbeta_k.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/fvnl_dbeta_k.cpp new file mode 100644 index 0000000000..65e3ebb290 --- /dev/null +++ b/source/module_hamilt_lcao/hamilt_lcaodft/fvnl_dbeta_k.cpp @@ -0,0 +1,515 @@ +#include "FORCE_k.h" + +#include +#include + +#include "module_base/memory.h" +#include "module_base/parallel_reduce.h" +#include "module_base/timer.h" +#include "module_base/tool_threading.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" +#include "module_elecstate/cal_dm.h" +#include "module_elecstate/module_dm/cal_dm_psi.h" +#include "module_elecstate/elecstate_lcao.h" +#include "module_hamilt_pw/hamilt_pwdft/global.h" +#include "module_io/write_HS.h" + +#ifdef __DEEPKS +#include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" +#endif + +#ifdef _OPENMP +#include +#endif + + +typedef std::tuple key_tuple; + +// must consider three-center H matrix. +void Force_LCAO_k::cal_fvnl_dbeta_k(const elecstate::DensityMatrix, double>* DM, + const bool isforce, + const bool isstress, + const Parallel_Orbitals &pv, + ModuleBase::matrix& fvnl_dbeta, + ModuleBase::matrix& svnl_dbeta) +{ + ModuleBase::TITLE("Force_LCAO_k", "cal_fvnl_dbeta_k_new"); + ModuleBase::timer::tick("Force_LCAO_k", "cal_fvnl_dbeta_k_new"); + + // Data structure for storing , for a detailed description + // check out the same data structure in build_Nonlocal_mu_new + std::vector>>>> nlm_tot; + + nlm_tot.resize(GlobalC::ucell.nat); + +#ifdef _OPENMP +// use schedule(dynamic) for load balancing because adj_num is various +#pragma omp parallel for schedule(dynamic) +#endif + for (int iat = 0; iat < GlobalC::ucell.nat; iat++) + { + + const int it = GlobalC::ucell.iat2it[iat]; + const int ia = GlobalC::ucell.iat2ia[iat]; + + // Step 1 : generate + // type of atom; distance; atomic basis; projectors + + const double Rcut_Beta = GlobalC::ucell.infoNL.Beta[it].get_rcut_max(); + const ModuleBase::Vector3 tau = GlobalC::ucell.atoms[it].tau[ia]; + AdjacentAtomInfo adjs; + GlobalC::GridD.Find_atom(GlobalC::ucell, tau, it, ia, &adjs); + + nlm_tot[iat].clear(); + + for (int ad = 0; ad < adjs.adj_num + 1; ++ad) + { + const int T1 = adjs.ntype[ad]; + const int I1 = adjs.natom[ad]; + const int start1 = GlobalC::ucell.itiaiw2iwt(T1, I1, 0); + const double Rcut_AO1 = GlobalC::ORB.Phi[T1].getRcut(); + + const ModuleBase::Vector3& tau1 = adjs.adjacent_tau[ad]; + const Atom* atom1 = &GlobalC::ucell.atoms[T1]; + const int nw1_tot = atom1->nw * GlobalV::NPOL; + + const ModuleBase::Vector3 dtau = tau1 - tau; + const double dist1 = dtau.norm2() * pow(GlobalC::ucell.lat0, 2); + if (dist1 > pow(Rcut_Beta + Rcut_AO1, 2)) + { + continue; + } + + std::unordered_map>> nlm_cur; + nlm_cur.clear(); + + for (int iw1 = 0; iw1 < nw1_tot; ++iw1) + { + const int iw1_all = start1 + iw1; + const int iw1_local = pv.global2local_row(iw1_all); + const int iw2_local = pv.global2local_col(iw1_all); + if (iw1_local < 0 && iw2_local < 0) + { + continue; + } + const int iw1_0 = iw1 / GlobalV::NPOL; + std::vector> nlm; +#ifdef USE_NEW_TWO_CENTER + //================================================================= + // new two-center integral (temporary) + //================================================================= + int L1 = atom1->iw2l[ iw1_0 ]; + int N1 = atom1->iw2n[ iw1_0 ]; + int m1 = atom1->iw2m[ iw1_0 ]; + + // convert m (0,1,...2l) to M (-l, -l+1, ..., l-1, l) + int M1 = (m1 % 2 == 0) ? -m1/2 : (m1+1)/2; + + ModuleBase::Vector3 dtau = tau - tau1; + GlobalC::UOT.two_center_bundle->overlap_orb_beta->snap( + T1, L1, N1, M1, it, dtau * GlobalC::ucell.lat0, true, nlm); +#else + GlobalC::UOT.snap_psibeta_half(GlobalC::ORB, + GlobalC::ucell.infoNL, + nlm, + tau1, + T1, + atom1->iw2l[iw1_0], // L1 + atom1->iw2m[iw1_0], // m1 + atom1->iw2n[iw1_0], // N1 + tau, + it, + 1); // R0,T0 +#endif + nlm_cur.insert({iw1_all, nlm}); + } // end iw + const int iat1 = GlobalC::ucell.itia2iat(T1, I1); + const int rx1 = adjs.box[ad].x; + const int ry1 = adjs.box[ad].y; + const int rz1 = adjs.box[ad].z; + key_tuple key_1(iat1, rx1, ry1, rz1); + nlm_tot[iat][key_1] = nlm_cur; + } // end ad + } + + //======================================================= + // Step2: + // calculate sum_(L0,M0) beta + // and accumulate the value to Hloc_fixedR(i,j) + //======================================================= + int total_nnr = 0; +#ifdef _OPENMP +#pragma omp parallel reduction(+ : total_nnr) + { + ModuleBase::matrix local_svnl_dbeta(3, 3); + const int num_threads = omp_get_num_threads(); +#else + ModuleBase::matrix& local_svnl_dbeta = svnl_dbeta; +#endif + + ModuleBase::Vector3 tau1; + ModuleBase::Vector3 tau2; + ModuleBase::Vector3 dtau; + ModuleBase::Vector3 tau0; + ModuleBase::Vector3 dtau1; + ModuleBase::Vector3 dtau2; + + double rcut; + double distance; + + double rcut1; + double rcut2; + double distance1; + double distance2; + +#ifdef _OPENMP +// use schedule(dynamic) for load balancing because adj_num is various +#pragma omp for schedule(dynamic) +#endif + for (int iat1 = 0; iat1 < GlobalC::ucell.nat; iat1++) + { + const int T1 = GlobalC::ucell.iat2it[iat1]; + const Atom* atom1 = &GlobalC::ucell.atoms[T1]; + + { + const int I1 = GlobalC::ucell.iat2ia[iat1]; + tau1 = atom1->tau[I1]; + AdjacentAtomInfo adjs; + GlobalC::GridD.Find_atom(GlobalC::ucell, tau1, T1, I1, &adjs); + const int start1 = GlobalC::ucell.itiaiw2iwt(T1, I1, 0); + int nnr = pv.nlocstart[iat1]; + + /* + !!!!!!!!!!!!!!!! + This optimization is also improving the performance of single thread. + Making memory access more linearly in the core loop + */ + bool iat_recorded = false; + bool force_updated = false; + // record iat of adjs + std::vector adj_iat; + // record fvnl_dbeta diff of adjs + std::vector adj_fvnl_dbeta; + if (isforce) + { + adj_iat.resize(adjs.adj_num + 1); + adj_fvnl_dbeta.resize((adjs.adj_num + 1) * 3, 0.0); + } + + for (int ad2 = 0; ad2 < adjs.adj_num + 1; ++ad2) + { + const int T2 = adjs.ntype[ad2]; + const Atom* atom2 = &GlobalC::ucell.atoms[T2]; + + const int I2 = adjs.natom[ad2]; + const int iat2 = GlobalC::ucell.itia2iat(T2, I2); + const int start2 = GlobalC::ucell.itiaiw2iwt(T2, I2, 0); + tau2 = adjs.adjacent_tau[ad2]; + + const int rx2 = adjs.box[ad2].x; + const int ry2 = adjs.box[ad2].y; + const int rz2 = adjs.box[ad2].z; + + dtau = tau2 - tau1; + distance = dtau.norm2() * pow(GlobalC::ucell.lat0, 2); + // this rcut is in order to make nnr consistent + // with other matrix. + rcut = pow(GlobalC::ORB.Phi[T1].getRcut() + GlobalC::ORB.Phi[T2].getRcut(), 2); + + // check if this a adjacent atoms. + bool is_adj = false; + if (distance < rcut) + is_adj = true; + else if (distance >= rcut) + { + for (int ad0 = 0; ad0 < adjs.adj_num + 1; ++ad0) + { + const int T0 = adjs.ntype[ad0]; + if (GlobalC::ucell.infoNL.nproj[T0] == 0) + { + continue; + } + const int I0 = adjs.natom[ad0]; + // const int iat0 = GlobalC::ucell.itia2iat(T0, I0); + // const int start0 = GlobalC::ucell.itiaiw2iwt(T0, I0, 0); + + tau0 = adjs.adjacent_tau[ad0]; + dtau1 = tau0 - tau1; + distance1 = dtau1.norm() * GlobalC::ucell.lat0; + rcut1 = GlobalC::ORB.Phi[T1].getRcut() + GlobalC::ucell.infoNL.Beta[T0].get_rcut_max(); + + dtau2 = tau0 - tau2; + distance2 = dtau2.norm() * GlobalC::ucell.lat0; + rcut2 = GlobalC::ORB.Phi[T2].getRcut() + GlobalC::ucell.infoNL.Beta[T0].get_rcut_max(); + + if (distance1 < rcut1 && distance2 < rcut2) + { + is_adj = true; + break; + } + } + } + + if (is_adj) + { + // basematrix and its data pointer + if (pv.get_row_size(iat1) <= 0 || pv.get_col_size(iat2) <= 0) + { + continue; + } + std::vector tmp_matrix_ptr; + for (int is = 0; is < GlobalV::NSPIN; ++is) + { + auto* tmp_base_matrix = DM->get_DMR_pointer(is+1)->find_matrix(iat1, iat2, rx2, ry2, rz2); + tmp_matrix_ptr.push_back(tmp_base_matrix->get_pointer()); + } + //hamilt::BaseMatrix* tmp_matrix = DM->get_DMR_pointer(1)->find_matrix(iat1, iat2, rx2, ry2, rz2); + //double* tmp_matrix_ptr = tmp_matrix->get_pointer(); + for (int ad0 = 0; ad0 < adjs.adj_num + 1; ++ad0) + { + const int T0 = adjs.ntype[ad0]; + const int I0 = adjs.natom[ad0]; + const int iat = GlobalC::ucell.itia2iat(T0, I0); + if (!iat_recorded && isforce) + adj_iat[ad0] = iat; + + // mohan add 2010-12-19 + if (GlobalC::ucell.infoNL.nproj[T0] == 0) + continue; + + // const int I0 = GlobalC::GridD.getNatom(ad0); + // const int start0 = GlobalC::ucell.itiaiw2iwt(T0, I0, 0); + tau0 = adjs.adjacent_tau[ad0]; + + dtau1 = tau0 - tau1; + dtau2 = tau0 - tau2; + const double distance1 = dtau1.norm2() * pow(GlobalC::ucell.lat0, 2); + const double distance2 = dtau2.norm2() * pow(GlobalC::ucell.lat0, 2); + + // seems a bug here!! mohan 2011-06-17 + rcut1 = pow(GlobalC::ORB.Phi[T1].getRcut() + GlobalC::ucell.infoNL.Beta[T0].get_rcut_max(), + 2); + rcut2 = pow(GlobalC::ORB.Phi[T2].getRcut() + GlobalC::ucell.infoNL.Beta[T0].get_rcut_max(), + 2); + + double r0[3]; + double r1[3]; + r1[0] = (tau1.x - tau0.x); + r1[1] = (tau1.y - tau0.y); + r1[2] = (tau1.z - tau0.z); + r0[0] = (tau2.x - tau0.x); + r0[1] = (tau2.y - tau0.y); + r0[2] = (tau2.z - tau0.z); + + if (distance1 >= rcut1 || distance2 >= rcut2) + { + continue; + } + + const int rx0 = adjs.box[ad0].x; + const int ry0 = adjs.box[ad0].y; + const int rz0 = adjs.box[ad0].z; + key_tuple key1(iat1, -rx0, -ry0, -rz0); + key_tuple key2(iat2, rx2 - rx0, ry2 - ry0, rz2 - rz0); + + int nnr_inner = 0; + for (int j = 0; j < atom1->nw * GlobalV::NPOL; j++) + { + const int j0 = j / GlobalV::NPOL; // added by zhengdy-soc + const int iw1_all = start1 + j; + const int mu = pv.global2local_row(iw1_all); + if (mu < 0) + { + continue; + } + + for (int k = 0; k < atom2->nw * GlobalV::NPOL; k++) + { + const int k0 = k / GlobalV::NPOL; + const int iw2_all = start2 + k; + const int nu = pv.global2local_col(iw2_all); + if (nu < 0) + { + continue; + } + + // const Atom* atom0 = &GlobalC::ucell.atoms[T0]; + double nlm[3] = {0, 0, 0}; + std::vector nlm_1 = nlm_tot[iat][key2][iw2_all][0]; + std::vector> nlm_2; + nlm_2.resize(3); + for (int i = 0; i < 3; i++) + { + nlm_2[i] = nlm_tot[iat][key1][iw1_all][i + 1]; + } + + assert(nlm_1.size() == nlm_2[0].size()); + + const int nproj = GlobalC::ucell.infoNL.nproj[T0]; + int ib = 0; + for (int nb = 0; nb < nproj; nb++) + { + const int L0 = GlobalC::ucell.infoNL.Beta[T0].Proj[nb].getL(); + for (int m = 0; m < 2 * L0 + 1; m++) + { + for (int ir = 0; ir < 3; ir++) + { + nlm[ir] += nlm_2[ir][ib] * nlm_1[ib] + * GlobalC::ucell.atoms[T0].ncpp.dion(nb, nb); + } + ib += 1; + } + } + assert(ib == nlm_1.size()); + + double nlm1[3] = {0, 0, 0}; + if (isstress) + { + std::vector nlm_1 = nlm_tot[iat][key1][iw1_all][0]; + std::vector> nlm_2; + nlm_2.resize(3); + for (int i = 0; i < 3; i++) + { + nlm_2[i] = nlm_tot[iat][key2][iw2_all][i + 1]; + } + + assert(nlm_1.size() == nlm_2[0].size()); + + const int nproj = GlobalC::ucell.infoNL.nproj[T0]; + int ib = 0; + for (int nb = 0; nb < nproj; nb++) + { + const int L0 = GlobalC::ucell.infoNL.Beta[T0].Proj[nb].getL(); + for (int m = 0; m < 2 * L0 + 1; m++) + { + for (int ir = 0; ir < 3; ir++) + { + nlm1[ir] += nlm_2[ir][ib] * nlm_1[ib] + * GlobalC::ucell.atoms[T0].ncpp.dion(nb, nb); + } + ib += 1; + } + } + assert(ib == nlm_1.size()); + } + + /// only one projector for each atom force, but another projector for stress + force_updated = true; + // get DMR + double dm2d1 = 0.0; + for (int is = 0; is < GlobalV::NSPIN; ++is) + { + dm2d1 += tmp_matrix_ptr[is][nnr_inner]; + } + double dm2d2 = 2.0 * dm2d1; + // + for (int jpol = 0; jpol < 3; jpol++) + { + if (isforce) + { + adj_fvnl_dbeta[ad0 * 3 + jpol] -= dm2d2 * nlm[jpol]; + } + if (isstress) + { + for (int ipol = jpol; ipol < 3; ipol++) + { + local_svnl_dbeta(jpol, ipol) + += dm2d1 + * (nlm[jpol] * r1[ipol] + nlm1[jpol] * r0[ipol]); + } + } + } + //} + nnr_inner++; + } // k + } // j + } // ad0 + + // outer circle : accumulate nnr + for (int j = 0; j < atom1->nw * GlobalV::NPOL; j++) + { + const int j0 = j / GlobalV::NPOL; // added by zhengdy-soc + const int iw1_all = start1 + j; + const int mu = pv.global2local_row(iw1_all); + if (mu < 0) + { + continue; + } + + // fix a serious bug: atom2[T2] -> atom2 + // mohan 2010-12-20 + for (int k = 0; k < atom2->nw * GlobalV::NPOL; k++) + { + const int k0 = k / GlobalV::NPOL; + const int iw2_all = start2 + k; + const int nu = pv.global2local_col(iw2_all); + if (nu < 0) + { + continue; + } + total_nnr++; + nnr++; + } + } + iat_recorded = true; + } // is_adj + } // ad2 + + // sum the diff to fvnl_dbeta + if (force_updated && isforce) + { +#ifdef _OPENMP + if (num_threads > 1) + { + for (int ad0 = 0; ad0 < adjs.adj_num + 1; ++ad0) + { +#pragma omp atomic + fvnl_dbeta(adj_iat[ad0], 0) += adj_fvnl_dbeta[ad0 * 3 + 0]; +#pragma omp atomic + fvnl_dbeta(adj_iat[ad0], 1) += adj_fvnl_dbeta[ad0 * 3 + 1]; +#pragma omp atomic + fvnl_dbeta(adj_iat[ad0], 2) += adj_fvnl_dbeta[ad0 * 3 + 2]; + } + } + else +#endif + { + for (int ad0 = 0; ad0 < adjs.adj_num + 1; ++ad0) + { + fvnl_dbeta(adj_iat[ad0], 0) += adj_fvnl_dbeta[ad0 * 3 + 0]; + fvnl_dbeta(adj_iat[ad0], 1) += adj_fvnl_dbeta[ad0 * 3 + 1]; + fvnl_dbeta(adj_iat[ad0], 2) += adj_fvnl_dbeta[ad0 * 3 + 2]; + } + } + } + } // I1 + } // T1 + +#ifdef _OPENMP + if (isstress) + { +#pragma omp critical(cal_fvnl_dbeta_k_new_reduce) + { + for (int l = 0; l < 3; l++) + { + for (int m = 0; m < 3; m++) + { + svnl_dbeta(l, m) += local_svnl_dbeta(l, m); + } + } + } + } + } +#endif + + assert(total_nnr == pv.nnr); + + if (isstress) + { + StressTools::stress_fill(GlobalC::ucell.lat0, GlobalC::ucell.omega, svnl_dbeta); + } + + ModuleBase::timer::tick("Force_LCAO_k", "cal_fvnl_dbeta_k_new"); + return; +} + diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.cpp index 4abf5ac2a3..9701e4c8f0 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.cpp @@ -9,10 +9,15 @@ #include "module_hamilt_lcao/module_deepks/LCAO_deepks.h" #include "operator_lcao/deepks_lcao.h" #endif +#ifdef __EXX +#include "operator_lcao/op_exx_lcao.h" +#include "module_ri/Exx_LRI_interface.h" +#endif #ifdef __ELPA #include "module_hsolver/diago_elpa.h" #endif #include "operator_lcao/op_dftu_lcao.h" +#include "operator_lcao/dftu_new.h" #include "operator_lcao/meta_lcao.h" #include "operator_lcao/op_exx_lcao.h" #include "operator_lcao/td_ekinetic_lcao.h" @@ -63,7 +68,8 @@ HamiltLCAO::HamiltLCAO( Local_Orbital_Charge* loc_in, elecstate::Potential* pot_in, const K_Vectors& kv_in, - elecstate::DensityMatrix* DM_in) + elecstate::DensityMatrix* DM_in, + int* exx_two_level_step) { this->kv = &kv_in; this->classname = "HamiltLCAO"; @@ -207,13 +213,30 @@ HamiltLCAO::HamiltLCAO( //end node should be OperatorDFTU if (GlobalV::dft_plus_u) { - Operator* dftu = new OperatorDFTU>( - LM_in, - kv->kvec_d, - this->hR,// no explicit call yet - &(this->getHk(LM_in)), - this->kv->isk - ); + Operator* dftu = nullptr; + if(GlobalV::dft_plus_u == 2) + { + dftu = new OperatorDFTU>( + LM_in, + kv->kvec_d, + this->hR,// no explicit call yet + &(this->getHk(LM_in)), + this->kv->isk + ); + } + else + { + dftu = new DFTUNew>( + LM_in, + this->kv->kvec_d, + this->hR, + &(this->getHk(LM_in)), + &GlobalC::ucell, + &GlobalC::GridD, + &GlobalC::dftu, + LM_in->ParaV + ); + } this->getOperator()->add(dftu); } } @@ -361,13 +384,30 @@ HamiltLCAO::HamiltLCAO( } if (GlobalV::dft_plus_u) { - Operator* dftu = new OperatorDFTU>( - LM_in, - kv->kvec_d, - this->hR,// no explicit call yet - &(this->getHk(LM_in)), - this->kv->isk - ); + Operator* dftu = nullptr; + if(GlobalV::dft_plus_u == 2) + { + dftu = new OperatorDFTU>( + LM_in, + kv->kvec_d, + this->hR,// no explicit call yet + &(this->getHk(LM_in)), + this->kv->isk + ); + } + else + { + dftu = new DFTUNew>( + LM_in, + this->kv->kvec_d, + this->hR, + &(this->getHk(LM_in)), + &GlobalC::ucell, + &GlobalC::GridD, + &GlobalC::dftu, + LM_in->ParaV + ); + } this->getOperator()->add(dftu); } if (GlobalV::sc_mag_switch) @@ -382,6 +422,21 @@ HamiltLCAO::HamiltLCAO( } } +#ifdef __EXX + if (GlobalC::exx_info.info_global.cal_exx) + { + Operator* exx + = new OperatorEXX>(LM_in, + this->hR, + &(this->getHk(LM_in)), + *this->kv, + LM_in->Hexxd, + LM_in->Hexxc, + exx_two_level_step, + !GlobalC::restart.info_load.restart_exx&& GlobalC::restart.info_load.load_H); + this->getOperator()->add(exx); + } +#endif // if NSPIN==2, HR should be separated into two parts, save HR into this->hRS2 int memory_fold = 1; if(GlobalV::NSPIN == 2) diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h b/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h index 8a9ce32cd8..cee9b60ee3 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h @@ -27,13 +27,14 @@ class HamiltLCAO : public Hamilt * HR and SR will be allocated with Operators */ HamiltLCAO(Gint_Gamma* GG_in, - Gint_k* GK_in, - LCAO_gen_fixedH* genH_in, - LCAO_Matrix* LM_in, - Local_Orbital_Charge* loc_in, - elecstate::Potential* pot_in, - const K_Vectors& kv_in, - elecstate::DensityMatrix* DM_in); + Gint_k* GK_in, + LCAO_gen_fixedH* genH_in, + LCAO_Matrix* LM_in, + Local_Orbital_Charge* loc_in, + elecstate::Potential* pot_in, + const K_Vectors& kv_in, + elecstate::DensityMatrix* DM_in, + int* exx_two_level_step = nullptr); /** * @brief Constructor of vacuum Operators, only HR and SR will be initialed as empty HContainer */ diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_charge.h b/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_charge.h index 1ce3787ae3..50049ee970 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_charge.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_charge.h @@ -13,6 +13,10 @@ #include "module_psi/psi.h" #include "module_elecstate/elecstate.h" #include "module_hamilt_lcao/hamilt_lcaodft/DM_gamma_2d_to_grid.h" + + +// try to get rid of this class, so please do not use it +// in new code anymoer, mohan 2024-03-28 class Local_Orbital_Charge { public: @@ -27,21 +31,24 @@ class Local_Orbital_Charge psi::Psi* psi, const K_Vectors& kv, const int& istep); + void allocate_dm_wfc(const Grid_Technique& gt, elecstate::ElecState* pelec, Local_Orbital_wfc& lowf, psi::Psi>* psi, const K_Vectors& kv, const int& istep); - //----------------- + // in DM_gamma.cpp - //----------------- - void allocate_gamma(const int& lgd, psi::Psi* psid, elecstate::ElecState* pelec, const int& nks, const int& istep); + void allocate_gamma(const int& lgd, + psi::Psi* psid, + elecstate::ElecState* pelec, + const int& nks, + const int& istep); + void cal_dk_gamma_from_2D_pub(void); - //----------------- // in DM_k.cpp - //----------------- void allocate_DM_k(const int& nks, const int& nnrg); // liaochen modify on 2010-3-23 @@ -53,9 +60,7 @@ class Local_Orbital_Charge static int out_dm; // output density matrix or not. static int out_dm1; - //----------------- // in dm_2d.cpp - //----------------- // dm stands for density matrix std::vector dm_gamma; // dm_gamma[is](iw1,iw2); std::vector dm_k; // dm_k[ik](iw1,iw2); @@ -72,13 +77,10 @@ class Local_Orbital_Charge double** dm2d, const K_Vectors& kv); //output, dm2d[NSPIN][LNNR] - //----------------- // wavefunctions' pointer - //----------------- Local_Orbital_wfc* LOWF; - //----------------- + // Parallel Variables' pointer - //----------------- const Parallel_Orbitals* ParaV; //temporary set it to public for ElecStateLCAO class, would be refactor later @@ -87,12 +89,14 @@ class Local_Orbital_Charge std::map, std::map>> DMR_sparse; void set_dm_k(int ik, std::complex* dm_k_in); // set dm_k from a pointer + void set_dm_gamma(int is, double* dm_gamma_in); // set dm_gamma from a pointer private: // whether the DM array has been allocated bool init_DM; + // whether the DM(R) array has been allocated bool init_DM_R; diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.cpp index 8e7627611a..cbf4ab56e7 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.cpp @@ -40,7 +40,11 @@ void Local_Orbital_wfc::gamma_file(psi::Psi* psid, elecstate::ElecState* //allocate psi int ncol = this->ParaV->ncol_bands; - if (GlobalV::KS_SOLVER == "genelpa" || GlobalV::KS_SOLVER == "lapack_gvx" || GlobalV::KS_SOLVER == "scalapack_gvx" || GlobalV::KS_SOLVER == "cg_in_lcao" + + if (GlobalV::KS_SOLVER == "genelpa" + || GlobalV::KS_SOLVER == "lapack_gvx" + || GlobalV::KS_SOLVER == "scalapack_gvx" + || GlobalV::KS_SOLVER == "cg_in_lcao" #ifdef __CUSOLVER_LCAO || GlobalV::KS_SOLVER == "cusolver" #endif @@ -48,6 +52,7 @@ void Local_Orbital_wfc::gamma_file(psi::Psi* psid, elecstate::ElecState* { ncol = this->ParaV->ncol; } + if (psid == nullptr) { ModuleBase::WARNING_QUIT("gamma_file", "psid should be allocated first!"); @@ -60,7 +65,8 @@ void Local_Orbital_wfc::gamma_file(psi::Psi* psid, elecstate::ElecState* for (int is = 0; is < GlobalV::NSPIN; ++is) { - this->error = ModuleIO::read_wfc_nao(ctot, is, this->ParaV, psid, pelec); + this->error = ModuleIO::read_wfc_nao(ctot, is, GlobalV::GAMMA_ONLY_LOCAL, GlobalV::NB2D, GlobalV::NBANDS, + GlobalV::NLOCAL, GlobalV::global_readin_dir, this->ParaV, psid, pelec); #ifdef __MPI Parallel_Common::bcast_int(this->error); #endif @@ -124,10 +130,8 @@ void Local_Orbital_wfc::allocate_k(const int& lgd, } // allocate the second part. //if(lgd != 0) xiaohui modify 2015-02-04, fixed memory bug - //if(lgd != 0 && this->complex_flag == false) if(lgd != 0) { - //std::cout<<"lgd="<) * GlobalV::NBANDS*GlobalV::NLOCAL); - //ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running,"MemoryForWaveFunctions (MB)",mem); - //std::cout<<"wfc_k_grid["<complex_flag = true; } } @@ -151,7 +151,10 @@ void Local_Orbital_wfc::allocate_k(const int& lgd, } else if (INPUT.init_wfc == "file") { - if (istep > 0)return; + if (istep > 0) + { + return; + } std::cout << " Read in wave functions files: " << nkstot << std::endl; if (psi == nullptr) { @@ -164,7 +167,8 @@ void Local_Orbital_wfc::allocate_k(const int& lgd, for (int ik = 0; ik < nkstot; ++ik) { std::complex** ctot; - this->error = ModuleIO::read_wfc_nao_complex(ctot, ik, kvec_c[ik], this->ParaV, psi, pelec); + this->error = ModuleIO::read_wfc_nao_complex(ctot, ik, GlobalV::NB2D, GlobalV::NBANDS, GlobalV::NLOCAL, + GlobalV::global_readin_dir, kvec_c[ik], this->ParaV, psi, pelec); #ifdef __MPI Parallel_Common::bcast_int(this->error); #endif @@ -199,6 +203,8 @@ void Local_Orbital_wfc::allocate_k(const int& lgd, return; } + + int Local_Orbital_wfc::globalIndex(int localindex, int nblk, int nprocs, int myproc) { int iblock, gIndex; @@ -227,9 +233,9 @@ void Local_Orbital_wfc::wfc_2d_to_grid(const int istep, const Parallel_Orbitals* pv = this->ParaV; const int inc = 1; - int myid; + int myid=0; MPI_Comm_rank(pv->comm_2D, &myid); - int info; + int info=0; //calculate maxnloc for bcasting 2d-wfc long maxnloc; // maximum number of elements in local matrix @@ -266,14 +272,18 @@ void Local_Orbital_wfc::wfc_2d_to_grid(const int istep, info=MPI_Bcast(naroc, 2, MPI_INT, src_rank, pv->comm_2D); info=MPI_Bcast(work, maxnloc, MPI_DOUBLE, src_rank, pv->comm_2D); - if (out_wfc_lcao) - info = this->set_wfc_grid(naroc, pv->nb, - pv->dim0, pv->dim1, iprow, ipcol, - work, wfc_grid, myid, ctot); - else - info = this->set_wfc_grid(naroc, pv->nb, - pv->dim0, pv->dim1, iprow, ipcol, - work, wfc_grid); + if (out_wfc_lcao) + { + info = this->set_wfc_grid(naroc, pv->nb, + pv->dim0, pv->dim1, iprow, ipcol, + work, wfc_grid, myid, ctot); + } + else + { + info = this->set_wfc_grid(naroc, pv->nb, + pv->dim0, pv->dim1, iprow, ipcol, + work, wfc_grid); + } }//loop ipcol }//loop iprow @@ -336,12 +346,12 @@ void Local_Orbital_wfc::wfc_2d_to_grid(const int istep, const Parallel_Orbitals* pv = this->ParaV; const int inc = 1; - int myid; + int myid=0; MPI_Comm_rank(pv->comm_2D, &myid); - int info; + int info=0; //calculate maxnloc for bcasting 2d-wfc - long maxnloc; // maximum number of elements in local matrix + long maxnloc=0; // maximum number of elements in local matrix info=MPI_Reduce(&pv->nloc_wfc, &maxnloc, 1, MPI_LONG, MPI_MAX, 0, pv->comm_2D); info=MPI_Bcast(&maxnloc, 1, MPI_LONG, 0, pv->comm_2D); std::complex *work=new std::complex[maxnloc]; // work/buffer matrix @@ -358,7 +368,7 @@ void Local_Orbital_wfc::wfc_2d_to_grid(const int istep, ModuleBase::Memory::record("LOWF::ctot", sizeof(std::complex) * GlobalV::NBANDS * GlobalV::NLOCAL); } - int naroc[2]; // maximum number of row or column + int naroc[2] = {0}; // maximum number of row or column for(int iprow=0; iprowdim0; ++iprow) { for(int ipcol=0; ipcoldim1; ++ipcol) @@ -375,15 +385,19 @@ void Local_Orbital_wfc::wfc_2d_to_grid(const int istep, info=MPI_Bcast(naroc, 2, MPI_INT, src_rank, pv->comm_2D); info = MPI_Bcast(work, maxnloc, MPI_DOUBLE_COMPLEX, src_rank, pv->comm_2D); - if (out_wfc_lcao) - info = this->set_wfc_grid(naroc, pv->nb, - pv->dim0, pv->dim1, iprow, ipcol, - work, wfc_grid, myid, ctot); - else - // mohan update 2021-02-12, delte BFIELD option - info = this->set_wfc_grid(naroc, pv->nb, - pv->dim0, pv->dim1, iprow, ipcol, - work, wfc_grid); + if (out_wfc_lcao) + { + info = this->set_wfc_grid(naroc, pv->nb, + pv->dim0, pv->dim1, iprow, ipcol, + work, wfc_grid, myid, ctot); + } + else + { + // mohan update 2021-02-12, delte BFIELD option + info = this->set_wfc_grid(naroc, pv->nb, + pv->dim0, pv->dim1, iprow, ipcol, + work, wfc_grid); + } }//loop ipcol }//loop iprow @@ -432,4 +446,4 @@ void Local_Orbital_wfc::wfc_2d_to_grid(const int istep, delete[] work; ModuleBase::timer::tick("Local_Orbital_wfc","wfc_2d_to_grid"); } -#endif \ No newline at end of file +#endif diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.h b/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.h index c071d68ccf..d994289029 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/local_orbital_wfc.h @@ -81,7 +81,9 @@ class Local_Orbital_wfc #endif int error = 0; + private: + template int set_wfc_grid(int naroc[2], int nb, @@ -101,6 +103,7 @@ class Local_Orbital_wfc }; #ifdef __MPI +// the function should not be defined here!! mohan 2024-03-28 template int Local_Orbital_wfc::set_wfc_grid(int naroc[2], int nb, @@ -115,22 +118,28 @@ int Local_Orbital_wfc::set_wfc_grid(int naroc[2], { ModuleBase::TITLE(" Local_Orbital_wfc", "set_wfc_grid"); if (!wfc && !ctot) + { return 0; + } for (int j = 0; j < naroc[1]; ++j) { int igcol = globalIndex(j, nb, dim1, ipcol); - if (igcol >= GlobalV::NBANDS) - continue; - for (int i = 0; i < naroc[0]; ++i) - { - int igrow = globalIndex(i, nb, dim0, iprow); - int mu_local = this->gridt->trace_lo[igrow]; - if (wfc && mu_local >= 0) - { - wfc[igcol][mu_local] = work[j * naroc[0] + i]; - } - if (ctot && myid == 0) - ctot[igcol][igrow] = work[j * naroc[0] + i]; + if (igcol >= GlobalV::NBANDS) + { + continue; + } + for (int i = 0; i < naroc[0]; ++i) + { + int igrow = globalIndex(i, nb, dim0, iprow); + int mu_local = this->gridt->trace_lo[igrow]; + if (wfc && mu_local >= 0) + { + wfc[igcol][mu_local] = work[j * naroc[0] + i]; + } + if (ctot && myid == 0) + { + ctot[igcol][igrow] = work[j * naroc[0] + i]; + } } } return 0; diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/CMakeLists.txt b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/CMakeLists.txt index c1e9fd71ca..e1407f6540 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/CMakeLists.txt +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/CMakeLists.txt @@ -12,6 +12,7 @@ add_library( td_ekinetic_lcao.cpp td_nonlocal_lcao.cpp sc_lambda_lcao.cpp + dftu_new.cpp ) if(ENABLE_COVERAGE) diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_force_stress.hpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_force_stress.hpp new file mode 100644 index 0000000000..1d51b7b11d --- /dev/null +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_force_stress.hpp @@ -0,0 +1,337 @@ +#pragma once +#include "dftu_new.h" +#include "module_base/parallel_reduce.h" + +namespace hamilt +{ + +template +void DFTUNew>::cal_force_stress( + const bool cal_force, + const bool cal_stress, + ModuleBase::matrix& force, + ModuleBase::matrix& stress) +{ + ModuleBase::TITLE("DFTUNew", "cal_force_stress"); +#ifdef __DEBUG + assert(this->dm_in_dftu != nullptr); +#endif + ModuleBase::timer::tick("DFTUNew", "cal_force_stress"); + + const Parallel_Orbitals* paraV = this->dm_in_dftu->get_DMR_pointer(1)->get_atom_pair(0).get_paraV(); + const int npol = this->ucell->get_npol(); + std::vector stress_tmp(6, 0); + if (cal_force) + { + force.zero_out(); + } + // 1. calculate for each pair of atoms + // loop over all on-site atoms + int atom_index = 0; + for (int iat0 = 0; iat0 < this->ucell->nat; iat0++) + { + // skip the atoms without plus-U + auto tau0 = ucell->get_tau(iat0); + int T0, I0; + ucell->iat2iait(iat0, &I0, &T0); + const int target_L = this->dftu->orbital_corr[T0]; + if(target_L == -1) continue; + const int tlp1 = 2 * target_L + 1; + AdjacentAtomInfo& adjs = this->adjs_all[atom_index++]; + + std::vector>> nlm_tot; + nlm_tot.resize(adjs.adj_num + 1); + + for (int ad = 0; ad < adjs.adj_num + 1; ++ad) + { + const int T1 = adjs.ntype[ad]; + const int I1 = adjs.natom[ad]; + const int iat1 = ucell->itia2iat(T1, I1); + const ModuleBase::Vector3& tau1 = adjs.adjacent_tau[ad]; + const Atom* atom1 = &ucell->atoms[T1]; + + const ORB_gen_tables& uot = ORB_gen_tables::get_const_instance(); + const LCAO_Orbitals& orb = LCAO_Orbitals::get_const_instance(); + auto all_indexes = paraV->get_indexes_row(iat1); + auto col_indexes = paraV->get_indexes_col(iat1); + // insert col_indexes into all_indexes to get universal set with no repeat elements + all_indexes.insert(all_indexes.end(), col_indexes.begin(), col_indexes.end()); + std::sort(all_indexes.begin(), all_indexes.end()); + all_indexes.erase(std::unique(all_indexes.begin(), all_indexes.end()), all_indexes.end()); + for (int iw1l = 0; iw1l < all_indexes.size(); iw1l += npol) + { + const int iw1 = all_indexes[iw1l] / npol; + std::vector> nlm; + // nlm is a vector of vectors, but size of outer vector is only 1 here + // If we are calculating force, we need also to store the gradient + // and size of outer vector is then 4 + // inner loop : all projectors (L0,M0) +#ifdef USE_NEW_TWO_CENTER + //================================================================= + // new two-center integral (temporary) + //================================================================= + int L1 = atom1->iw2l[ iw1 ]; + int N1 = atom1->iw2n[ iw1 ]; + int m1 = atom1->iw2m[ iw1 ]; + + // convert m (0,1,...2l) to M (-l, -l+1, ..., l-1, l) + int M1 = (m1 % 2 == 0) ? -m1/2 : (m1+1)/2; + + ModuleBase::Vector3 dtau = tau0 - tau1; + uot.two_center_bundle->overlap_orb_onsite->snap( + T1, L1, N1, M1, T0, dtau * this->ucell->lat0, 1 /*cal_deri*/, nlm); +#else + ModuleBase::WARNING_QUIT("DFTUNew", "old two center integral method not implemented"); +#endif + // select the elements of nlm with target_L + std::vector nlm_target(tlp1 * 4); + for(int iw =0;iw < this->ucell->atoms[T0].nw; iw++) + { + const int L0 = this->ucell->atoms[T0].iw2l[iw]; + if(L0 == target_L) + { + for(int m = 0; m < tlp1; m++)//-l, -l+1, ..., l-1, l + { + for(int n = 0; n < 4; n++)// value, deri_x, deri_y, deri_z + { + nlm_target[m + n * tlp1] = nlm[n][iw+m]; + //if(dtau.norm2 == 0.0) std::cout<<__FILE__<<__LINE__<<" "< occ(tlp1 * tlp1 * GlobalV::NSPIN, 0); + for(int i=0;idftu->locale[iat0][target_L][0][is].c[ii]; + } + hamilt::HContainer* dmR_tmp[GlobalV::NSPIN]; + dmR_tmp[0] = this->dm_in_dftu->get_DMR_pointer(1); + if(GlobalV::NSPIN==2) dmR_tmp[1] = this->dm_in_dftu->get_DMR_pointer(2); + + + //calculate VU + const double u_value = this->dftu->U[T0]; + std::vector VU(occ.size()); + double eu_tmp = 0; + this->cal_v_of_u(occ, tlp1, u_value, &VU[0], eu_tmp); + + // second iteration to calculate force and stress + // calculate Force for atom J + // DMR_{I,J,R'-R} * U*(1/2*delta(m, m')-occ(m, m')) + // \frac{\partial }{\partial \tau_J} for each pair of atoms + // calculate Stress for strain tensor \varepsilon_{\alpha\beta} + // -1/Omega * DMR_{I,J,R'-R} * [ \frac{\partial }{\partial \tau_{J,\alpha}}\tau_{J,\beta} + // U*(1/2*delta(m, m')-occ(m, m')) + // + U*(1/2*delta(m, m')-occ(m, m')) + // \frac{\partial }{\partial \tau_{J,\alpha}}\tau_{J,\beta}] for each pair of atoms + for (int ad1 = 0; ad1 < adjs.adj_num + 1; ++ad1) + { + const int T1 = adjs.ntype[ad1]; + const int I1 = adjs.natom[ad1]; + const int iat1 = ucell->itia2iat(T1, I1); + double* force_tmp1 = (cal_force)? &force(iat1, 0) : nullptr; + double* force_tmp2 = (cal_force)? &force(iat0, 0) : nullptr; + ModuleBase::Vector3& R_index1 = adjs.box[ad1]; + ModuleBase::Vector3 dis1 = adjs.adjacent_tau[ad1] - tau0; + for (int ad2 = 0; ad2 < adjs.adj_num + 1; ++ad2) + { + const int T2 = adjs.ntype[ad2]; + const int I2 = adjs.natom[ad2]; + const int iat2 = ucell->itia2iat(T2, I2); + ModuleBase::Vector3& R_index2 = adjs.box[ad2]; + ModuleBase::Vector3 dis2 = adjs.adjacent_tau[ad2] - tau0; + ModuleBase::Vector3 R_vector(R_index2[0] - R_index1[0], + R_index2[1] - R_index1[1], + R_index2[2] - R_index1[2]); + const hamilt::BaseMatrix* tmp[GlobalV::NSPIN]; + tmp[0] = dmR_tmp[0]->find_matrix(iat1, iat2, R_vector[0], R_vector[1], R_vector[2]); + if(GlobalV::NSPIN == 2) + { + tmp[1] = dmR_tmp[1]->find_matrix(iat1, iat2, R_vector[0], R_vector[1], R_vector[2]); + } + // if not found , skip this pair of atoms + if (tmp[0] != nullptr) + { + // calculate force + if (cal_force) this->cal_force_IJR(iat1, iat2, T0, paraV, nlm_tot[ad1], nlm_tot[ad2], VU, tmp, GlobalV::NSPIN, force_tmp1, force_tmp2); + + // calculate stress + if (cal_stress) this->cal_stress_IJR(iat1, iat2, T0, paraV, nlm_tot[ad1], nlm_tot[ad2], VU, tmp, GlobalV::NSPIN, dis1, dis2, stress_tmp.data()); + } + } + } + } + + if(cal_force) + { +#ifdef __MPI + // sum up the occupation matrix + Parallel_Reduce::reduce_all(force.c, force.nr*force.nc); +#endif + for(int i=0;iucell->lat0 / this->ucell->omega; + for(int i=0;i<6;i++) + { + stress.c[i] = stress_tmp[i] * weight; + } + stress.c[8] = stress.c[5]; // stress(2,2) + stress.c[7] = stress.c[4]; // stress(2,1) + stress.c[6] = stress.c[2]; // stress(2,0) + stress.c[5] = stress.c[4]; // stress(1,2) + stress.c[4] = stress.c[3]; // stress(1,1) + stress.c[3] = stress.c[1]; // stress(1,0) + } + + ModuleBase::timer::tick("DFTUNew", "cal_force_stress"); +} + +template +void DFTUNew>::cal_force_IJR( + const int& iat1, + const int& iat2, + const int& T0, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const std::vector& vu_in, + const hamilt::BaseMatrix** dmR_pointer, + const int nspin, + double* force1, + double* force2) +{ + // npol is the number of polarizations, + // 1 for non-magnetic (one Hamiltonian matrix only has spin-up or spin-down), + // 2 for magnetic (one Hamiltonian matrix has both spin-up and spin-down) + const int npol = this->ucell->get_npol(); + // --------------------------------------------- + // calculate the Nonlocal matrix for each pair of orbitals + // --------------------------------------------- + auto row_indexes = paraV->get_indexes_row(iat1); + auto col_indexes = paraV->get_indexes_col(iat2); + const int m_size = int(sqrt(vu_in.size()/nspin)); + const int m_size2 = m_size * m_size; + // step_trace = 0 for NSPIN=1,2; ={0, 1, local_col, local_col+1} for NSPIN=4 + std::vector step_trace(npol, 0); + if(npol == 2) step_trace[1] = col_indexes.size() + 1; + double tmp[3]; + // calculate the local matrix + for (int is = 0; is < nspin; is++) + { + double* dm_pointer = dmR_pointer[is]->get_pointer(); + for (int iw1l = 0; iw1l < row_indexes.size(); iw1l += npol) + { + const std::vector& nlm1 = nlm1_all.find(row_indexes[iw1l])->second; + for (int iw2l = 0; iw2l < col_indexes.size(); iw2l += npol) + { + const std::vector& nlm2 = nlm2_all.find(col_indexes[iw2l])->second; + #ifdef __DEBUG + assert(nlm1.size() == nlm2.size()); + #endif + for (int m1 = 0; m1 < m_size; m1++) + { + for(int m2 = 0; m2 < m_size; m2++) + { + tmp[0] = vu_in[m1 * m_size + m2 + is*m_size2] * nlm1[m1 + m_size] * nlm2[m2] * dm_pointer[0]; + tmp[1] = vu_in[m1 * m_size + m2 + is*m_size2] * nlm1[m1 + m_size*2] * nlm2[m2] * dm_pointer[0]; + tmp[2] = vu_in[m1 * m_size + m2 + is*m_size2] * nlm1[m1 + m_size*3] * nlm2[m2] * dm_pointer[0]; + // force1 = - VU * * + // force2 = - VU * * } + force1[0] += tmp[0]; + force1[1] += tmp[1]; + force1[2] += tmp[2]; + force2[0] -= tmp[0]; + force2[1] -= tmp[1]; + force2[2] -= tmp[2]; + } + } + dm_pointer++; + } + dm_pointer += (npol - 1) * col_indexes.size(); + } + } +} + +template +void DFTUNew>::cal_stress_IJR( + const int& iat1, + const int& iat2, + const int& T0, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const std::vector& vu_in, + const hamilt::BaseMatrix** dmR_pointer, + const int nspin, + const ModuleBase::Vector3& dis1, + const ModuleBase::Vector3& dis2, + double* stress) +{ + // npol is the number of polarizations, + // 1 for non-magnetic (one Hamiltonian matrix only has spin-up or spin-down), + // 2 for magnetic (one Hamiltonian matrix has both spin-up and spin-down) + const int npol = this->ucell->get_npol(); + // --------------------------------------------- + // calculate the Nonlocal matrix for each pair of orbitals + // --------------------------------------------- + auto row_indexes = paraV->get_indexes_row(iat1); + auto col_indexes = paraV->get_indexes_col(iat2); + const int m_size = int(sqrt(vu_in.size()/nspin)); + const int m_size2 = m_size * m_size; + // step_trace = 0 for NSPIN=1,2; ={0, 1, local_col, local_col+1} for NSPIN=4 + std::vector step_trace(npol, 0); + if(npol == 2) step_trace[1] = col_indexes.size() + 1; + // calculate the local matrix + for (int is = 0; is < nspin; is++) + { + double* dm_pointer = dmR_pointer[is]->get_pointer(); + for (int iw1l = 0; iw1l < row_indexes.size(); iw1l += npol) + { + const std::vector& nlm1 = nlm1_all.find(row_indexes[iw1l])->second; + for (int iw2l = 0; iw2l < col_indexes.size(); iw2l += npol) + { + const std::vector& nlm2 = nlm2_all.find(col_indexes[iw2l])->second; + #ifdef __DEBUG + assert(nlm1.size() == nlm2.size()); + #endif + for (int m1 = 0; m1 < m_size; m1++) + { + for(int m2 = 0; m2 < m_size; m2++) + { + double tmp = vu_in[m1 * m_size + m2 + is*m_size2] * dm_pointer[0]; + //std::cout<<__FILE__<<__LINE__<<" "< +#endif +#include "module_base/parallel_reduce.h" + +template +const elecstate::DensityMatrix* hamilt::DFTUNew>::dm_in_dftu = nullptr; + +template +hamilt::DFTUNew>::DFTUNew( + LCAO_Matrix* LM_in, + const std::vector>& kvec_d_in, + hamilt::HContainer* hR_in, + std::vector* hK_in, + const UnitCell* ucell_in, + Grid_Driver* GridD_in, + ModuleDFTU::DFTU* dftu_in, + const Parallel_Orbitals* paraV) + : hamilt::OperatorLCAO(LM_in, kvec_d_in, hR_in, hK_in) +{ + this->cal_type = lcao_dftu; + this->ucell = ucell_in; + this->dftu = dftu_in; +#ifdef __DEBUG + assert(this->ucell != nullptr); +#endif + // initialize HR to allocate sparse Nonlocal matrix memory + this->initialize_HR(GridD_in, paraV); +} + +// destructor +template +hamilt::DFTUNew>::~DFTUNew() +{ +} + +// initialize_HR() +template +void hamilt::DFTUNew>::initialize_HR(Grid_Driver* GridD, + const Parallel_Orbitals* paraV) +{ + ModuleBase::TITLE("DFTUNew", "initialize_HR"); + ModuleBase::timer::tick("DFTUNew", "initialize_HR"); + + this->adjs_all.clear(); + this->adjs_all.reserve(this->ucell->nat); + for (int iat0 = 0; iat0 < ucell->nat; iat0++) + { + auto tau0 = ucell->get_tau(iat0); + int T0, I0; + ucell->iat2iait(iat0, &I0, &T0); + const int target_L = this->dftu->orbital_corr[T0]; + if(target_L == -1) continue; + + AdjacentAtomInfo adjs; + GridD->Find_atom(*ucell, tau0, T0, I0, &adjs); + std::vector is_adj(adjs.adj_num + 1, false); + for (int ad1 = 0; ad1 < adjs.adj_num + 1; ++ad1) + { + const int T1 = adjs.ntype[ad1]; + const int I1 = adjs.natom[ad1]; + const int iat1 = ucell->itia2iat(T1, I1); + const ModuleBase::Vector3& tau1 = adjs.adjacent_tau[ad1]; + const ModuleBase::Vector3& R_index1 = adjs.box[ad1]; + // choose the real adjacent atoms + const LCAO_Orbitals& orb = LCAO_Orbitals::get_const_instance(); + // Note: the distance of atoms should less than the cutoff radius, + // When equal, the theoretical value of matrix element is zero, + // but the calculated value is not zero due to the numerical error, which would lead to result changes. + if (this->ucell->cal_dtau(iat0, iat1, R_index1).norm() * this->ucell->lat0 + < orb.Phi[T1].getRcut() + GlobalV::onsite_radius) + { + is_adj[ad1] = true; + } + } + filter_adjs(is_adj, adjs); + this->adjs_all.push_back(adjs); + } + + ModuleBase::timer::tick("DFTUNew", "initialize_HR"); +} + +template +void hamilt::DFTUNew>::cal_nlm_all(const Parallel_Orbitals* paraV) +{ + ModuleBase::TITLE("DFTUNew", "cal_nlm_all"); + if(this->precal_nlm_done) return; + ModuleBase::timer::tick("DFTUNew", "cal_nlm_all"); + nlm_tot.resize(this->ucell->nat); + const int npol = this->ucell->get_npol(); + int atom_index = 0; + for (int iat0 = 0; iat0 < ucell->nat; iat0++) + { + auto tau0 = ucell->get_tau(iat0); + int T0, I0; + ucell->iat2iait(iat0, &I0, &T0); + const int target_L = this->dftu->orbital_corr[T0]; + if(target_L == -1) continue; + const int tlp1 = 2*target_L+1; + AdjacentAtomInfo& adjs = this->adjs_all[atom_index++]; + + // calculate and save the table of two-center integrals + nlm_tot[iat0].resize(adjs.adj_num + 1); + + for (int ad = 0; ad < adjs.adj_num + 1; ++ad) + { + const int T1 = adjs.ntype[ad]; + const int I1 = adjs.natom[ad]; + const int iat1 = ucell->itia2iat(T1, I1); + const ModuleBase::Vector3& tau1 = adjs.adjacent_tau[ad]; + const Atom* atom1 = &ucell->atoms[T1]; + + const ORB_gen_tables& uot = ORB_gen_tables::get_const_instance(); + const LCAO_Orbitals& orb = LCAO_Orbitals::get_const_instance(); + auto all_indexes = paraV->get_indexes_row(iat1); + auto col_indexes = paraV->get_indexes_col(iat1); + // insert col_indexes into all_indexes to get universal set with no repeat elements + all_indexes.insert(all_indexes.end(), col_indexes.begin(), col_indexes.end()); + std::sort(all_indexes.begin(), all_indexes.end()); + all_indexes.erase(std::unique(all_indexes.begin(), all_indexes.end()), all_indexes.end()); + for (int iw1l = 0; iw1l < all_indexes.size(); iw1l += npol) + { + const int iw1 = all_indexes[iw1l] / npol; + std::vector> nlm; + // nlm is a vector of vectors, but size of outer vector is only 1 here + // If we are calculating force, we need also to store the gradient + // and size of outer vector is then 4 + // inner loop : all projectors (L0,M0) +#ifdef USE_NEW_TWO_CENTER + //================================================================= + // new two-center integral (temporary) + //================================================================= + int L1 = atom1->iw2l[ iw1 ]; + int N1 = atom1->iw2n[ iw1 ]; + int m1 = atom1->iw2m[ iw1 ]; + + // convert m (0,1,...2l) to M (-l, -l+1, ..., l-1, l) + int M1 = (m1 % 2 == 0) ? -m1/2 : (m1+1)/2; + + ModuleBase::Vector3 dtau = tau0 - tau1; + uot.two_center_bundle->overlap_orb_onsite->snap( + T1, L1, N1, M1, T0, dtau * this->ucell->lat0, 0 /*cal_deri*/, nlm); +#else + ModuleBase::WARNING_QUIT("DFTUNew", "old two center integral method not implemented"); +#endif + // select the elements of nlm with target_L + std::vector nlm_target(tlp1); + for(int iw =0;iw < this->ucell->atoms[T0].nw; iw++) + { + const int L0 = this->ucell->atoms[T0].iw2l[iw]; + if(L0 == target_L) + { + for(int m = 0; m < 2*L0+1; m++) + { + nlm_target[m] = nlm[0][iw+m]; + } + break; + } + } + nlm_tot[iat0][ad].insert({all_indexes[iw1l], nlm_target}); + } + } + } + this->precal_nlm_done = true; + ModuleBase::timer::tick("DFTUNew", "cal_nlm_all"); +} + +template +void hamilt::DFTUNew>::calculate_HR() +{ + ModuleBase::TITLE("DFTUNew", "calculate_HR"); + if(this->dm_in_dftu == nullptr && this->dftu->initialed_locale == false) + {// skip the calculation if dm_in_dftu is nullptr + return; + } + else + { + //will update this->dftu->locale and this->dftu->EU + if(GlobalV::CURRENT_SPIN == 0) this->dftu->EU = 0.0; + } + ModuleBase::timer::tick("DFTUNew", "calculate_HR"); + + const Parallel_Orbitals* paraV = this->hR->get_atom_pair(0).get_paraV(); + const int npol = this->ucell->get_npol(); + // 1. calculate for each pair of atoms + this->cal_nlm_all(paraV); + // loop over all on-site atoms + int atom_index = 0; + for (int iat0 = 0; iat0 < this->ucell->nat; iat0++) + { + // skip the atoms without plus-U + auto tau0 = ucell->get_tau(iat0); + int T0, I0; + ucell->iat2iait(iat0, &I0, &T0); + const int target_L = this->dftu->orbital_corr[T0]; + if(target_L == -1) continue; + const int tlp1 = 2*target_L+1; + AdjacentAtomInfo& adjs = this->adjs_all[atom_index++]; + + ModuleBase::timer::tick("DFTUNew", "cal_occupations"); + //first iteration to calculate occupation matrix + const int spin_fold = (GlobalV::NSPIN == 4) ? 4 : 1; + std::vector occ(tlp1 * tlp1 * spin_fold, 0.0); + if(this->dftu->initialed_locale == false) + { + hamilt::HContainer* dmR_current = this->dm_in_dftu->get_DMR_pointer(GlobalV::CURRENT_SPIN+1); + for (int ad1 = 0; ad1 < adjs.adj_num + 1; ++ad1) + { + const int T1 = adjs.ntype[ad1]; + const int I1 = adjs.natom[ad1]; + const int iat1 = ucell->itia2iat(T1, I1); + ModuleBase::Vector3& R_index1 = adjs.box[ad1]; + const std::unordered_map>& nlm1 = nlm_tot[iat0][ad1]; + for (int ad2 = 0; ad2 < adjs.adj_num + 1; ++ad2) + { + const int T2 = adjs.ntype[ad2]; + const int I2 = adjs.natom[ad2]; + const int iat2 = ucell->itia2iat(T2, I2); + const std::unordered_map>& nlm2 = nlm_tot[iat0][ad2]; + ModuleBase::Vector3& R_index2 = adjs.box[ad2]; + ModuleBase::Vector3 R_vector(R_index2[0] - R_index1[0], + R_index2[1] - R_index1[1], + R_index2[2] - R_index1[2]); + const hamilt::BaseMatrix* tmp = dmR_current->find_matrix(iat1, iat2, R_vector[0], R_vector[1], R_vector[2]); + // if not found , skip this pair of atoms + if (tmp != nullptr) + { + this->cal_occupations(iat1, iat2, T0, paraV, nlm1, nlm2, tmp->get_pointer(), occ); + } + } + } + #ifdef __MPI + // sum up the occupation matrix + Parallel_Reduce::reduce_all(occ.data(), occ.size()); + #endif + // save occ to dftu + for(int i=0;idftu->locale[iat0][target_L][0][GlobalV::CURRENT_SPIN].c[i] = occ[i]; + } + } + else // use readin locale to calculate occupation matrix + { + for(int i=0;idftu->locale[iat0][target_L][0][GlobalV::CURRENT_SPIN].c[i]; + } + // set initialed_locale to false to avoid using readin locale in next iteration + } + ModuleBase::timer::tick("DFTUNew", "cal_occupations"); + + //calculate VU + ModuleBase::timer::tick("DFTUNew", "cal_vu"); + const double u_value = this->dftu->U[T0]; + std::vector VU_tmp(occ.size()); + this->cal_v_of_u(occ, tlp1, u_value, VU_tmp.data(), this->dftu->EU); + // transfer occ from pauli matrix format to normal format + std::vector VU(occ.size()); + this->transfer_vu(VU_tmp, VU); + + // second iteration to calculate Hamiltonian matrix + // calculate U*(1/2*delta(m, m')-occ(m, m')) for each pair of atoms + // 2. calculate D for each pair of atoms + for (int ad1 = 0; ad1 < adjs.adj_num + 1; ++ad1) + { + const int T1 = adjs.ntype[ad1]; + const int I1 = adjs.natom[ad1]; + const int iat1 = ucell->itia2iat(T1, I1); + ModuleBase::Vector3& R_index1 = adjs.box[ad1]; + const std::unordered_map>& nlm1 = nlm_tot[iat0][ad1]; + for (int ad2 = 0; ad2 < adjs.adj_num + 1; ++ad2) + { + const int T2 = adjs.ntype[ad2]; + const int I2 = adjs.natom[ad2]; + const int iat2 = ucell->itia2iat(T2, I2); + const std::unordered_map>& nlm2 = nlm_tot[iat0][ad2]; + ModuleBase::Vector3& R_index2 = adjs.box[ad2]; + ModuleBase::Vector3 R_vector(R_index2[0] - R_index1[0], + R_index2[1] - R_index1[1], + R_index2[2] - R_index1[2]); + hamilt::BaseMatrix* tmp = this->hR->find_matrix(iat1, iat2, R_vector[0], R_vector[1], R_vector[2]); + // if not found , skip this pair of atoms + if (tmp != nullptr) + { + this->cal_HR_IJR(iat1, iat2, T0, paraV, nlm1, nlm2, VU, tmp->get_pointer()); + } + } + } + ModuleBase::timer::tick("DFTUNew", "cal_vu"); + } + + //energy correction for NSPIN=1 + if(GlobalV::NSPIN==1) this->dftu->EU *= 2.0; + // for readin onsite_dm, set initialed_locale to false to avoid using readin locale in next iteration + if(GlobalV::CURRENT_SPIN == GlobalV::NSPIN-1 || GlobalV::NSPIN==4) this->dftu->initialed_locale = false; + + ModuleBase::timer::tick("DFTUNew", "calculate_HR"); +} + +// cal_HR_IJR() +template +void hamilt::DFTUNew>::cal_HR_IJR( + const int& iat1, + const int& iat2, + const int& T0, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const std::vector& VU, + TR* data_pointer) +{ + + // npol is the number of polarizations, + // 1 for non-magnetic (one Hamiltonian matrix only has spin-up or spin-down), + // 2 for magnetic (one Hamiltonian matrix has both spin-up and spin-down) + const int npol = this->ucell->get_npol(); + // --------------------------------------------- + // calculate the Nonlocal matrix for each pair of orbitals + // --------------------------------------------- + auto row_indexes = paraV->get_indexes_row(iat1); + auto col_indexes = paraV->get_indexes_col(iat2); + const int m_size = int(sqrt(VU.size())/npol); + // step_trace = 0 for NSPIN=1,2; ={0, 1, local_col, local_col+1} for NSPIN=4 + std::vector step_trace(npol*npol, 0); + for (int is = 0; is < npol; is++) + { + for (int is2 = 0; is2 < npol; is2++) + { + step_trace[is * npol + is2] = paraV->get_col_size(iat2) * is + is2; + } + } + // calculate the local matrix + const TR* tmp_d = nullptr; + for (int iw1l = 0; iw1l < row_indexes.size(); iw1l += npol) + { + const std::vector& nlm1 = nlm1_all.find(row_indexes[iw1l])->second; + for (int iw2l = 0; iw2l < col_indexes.size(); iw2l += npol) + { + const std::vector& nlm2 = nlm2_all.find(col_indexes[iw2l])->second; +#ifdef __DEBUG + assert(nlm1.size() == nlm2.size()); +#endif + for (int is = 0; is < npol*npol; ++is) + { + int start = is * m_size * m_size; + TR nlm_tmp = TR(0); + for (int m1 = 0; m1 < m_size; m1++) + { + for(int m2 = 0; m2 < m_size; m2++) + { + nlm_tmp += nlm1[m1] * nlm2[m2] * VU[m1 * m_size + m2 + start]; + } + } + data_pointer[step_trace[is]] += nlm_tmp; + } + data_pointer += npol; + } + data_pointer += (npol - 1) * col_indexes.size(); + } +} + +template +void hamilt::DFTUNew>::cal_occupations( + const int& iat1, + const int& iat2, + const int& T0, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const double* dm_pointer, + std::vector& occ) +{ + + // npol is the number of polarizations, + // 1 for non-magnetic (one Hamiltonian matrix only has spin-up or spin-down), + // 2 for magnetic (one Hamiltonian matrix has both spin-up and spin-down) + const int npol = this->ucell->get_npol(); + // --------------------------------------------- + // calculate the Nonlocal matrix for each pair of orbitals + // --------------------------------------------- + auto row_indexes = paraV->get_indexes_row(iat1); + auto col_indexes = paraV->get_indexes_col(iat2); + const int m_size = int(sqrt(occ.size())/npol); + const int m_size2 = m_size * m_size; +#ifdef __DEBUG + assert(m_size * m_size == occ.size()); +#endif + // step_trace = 0 for NSPIN=1,2; ={0, 1, local_col, local_col+1} for NSPIN=4 + std::vector step_trace(npol * npol, 0); + for (int is = 0; is < npol; is++) + { + for (int is2 = 0; is2 < npol; is2++) + { + step_trace[is * npol + is2] = paraV->get_col_size(iat2) * is + is2; + } + } + // calculate the local matrix + for (int iw1l = 0; iw1l < row_indexes.size(); iw1l += npol) + { + const std::vector& nlm1 = nlm1_all.find(row_indexes[iw1l])->second; + for (int iw2l = 0; iw2l < col_indexes.size(); iw2l += npol) + { + const std::vector& nlm2 = nlm2_all.find(col_indexes[iw2l])->second; +#ifdef __DEBUG + assert(nlm1.size() == nlm2.size()); +#endif + for (int is1 = 0; is1 < npol; ++is1) + { + for(int is2 = 0;is2 < npol; ++is2) + { + for (int m1 = 0; m1 < m_size; ++m1) + { + for(int m2 = 0; m2 < m_size; ++m2) + { + occ[m1 * m_size + m2 + (is1 * npol + is2) * m_size2] += + nlm1[m1] * nlm2[m2] * dm_pointer[step_trace[is1 * npol + is2]]; + } + } + } + } + dm_pointer += npol; + } + dm_pointer += (npol - 1) * col_indexes.size(); + } +} + +template +void hamilt::DFTUNew>::transfer_vu(std::vector& vu_tmp, std::vector& vu) +{ +#ifdef __DEBUG + assert(vu.size() == vu_tmp.size()); +#endif + for(int i=0;i +void hamilt::DFTUNew, std::complex>>::transfer_vu(std::vector& vu_tmp, std::vector>& vu) +{ +#ifdef __DEBUG + assert(vu.size() == vu_tmp.size()); +#endif + + // TR == std::complex transfer from double to std::complex + const int m_size = int(sqrt(vu.size())/2); + const int m_size2 = m_size * m_size; + vu.resize(vu_tmp.size()); + for(int m1=0;m1 type, but here we use double type for test + vu[index[1]] = 0.5 * (vu_tmp[index[1]] + std::complex(0.0, 1.0) * vu_tmp[index[2]]); + vu[index[2]] = 0.5 * (vu_tmp[index[1]] - std::complex(0.0, 1.0) * vu_tmp[index[2]]); + } + } +} + +template +void hamilt::DFTUNew>::cal_v_of_u( + const std::vector& occ, + const int m_size, + const double u_value, + double* VU, + double& EU) +{ + // calculate the local matrix + int spin_fold = occ.size() / m_size / m_size; + if(spin_fold < 4) + for(int is=0;is +void hamilt::DFTUNew>::contributeHR() +{ + ModuleBase::TITLE("DFTUNew", "contributeHR"); + ModuleBase::timer::tick("DFTUNew", "contributeHR"); + this->calculate_HR(); + ModuleBase::timer::tick("DFTUNew", "contributeHR"); + return; +} + +#include "dftu_force_stress.hpp" + +template class hamilt::DFTUNew>; +template class hamilt::DFTUNew, double>>; +template class hamilt::DFTUNew, std::complex>>; \ No newline at end of file diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_new.h b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_new.h new file mode 100644 index 0000000000..625244d8f6 --- /dev/null +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/dftu_new.h @@ -0,0 +1,171 @@ +#ifndef DFTUNEW_H +#define DFTUNEW_H +#include + +#include "module_basis/module_ao/parallel_orbitals.h" +#include "module_cell/module_neighbor/sltk_grid_driver.h" +#include "module_cell/unitcell.h" +#include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h" +#include "module_hamilt_lcao/module_hcontainer/hcontainer.h" +#include "module_elecstate/module_dm/density_matrix.h" +#include "module_hamilt_lcao/module_dftu/dftu.h" + +namespace hamilt +{ + +#ifndef __DFTUNEWTEMPLATE +#define __DFTUNEWTEMPLATE + +/// The DFTUNew class template inherits from class T +/// it is used to calculate the non-local pseudopotential of wavefunction basis +/// Template parameters: +/// - T: base class, it would be OperatorLCAO or OperatorPW +/// - TR: data type of real space Hamiltonian, it would be double or std::complex +template +class DFTUNew : public T +{ +}; + +#endif + +/// DFTUNew class template specialization for OperatorLCAO base class +/// It is used to calculate the non-local pseudopotential matrix in real space and fold it to k-space +/// HR = D_{p1, p2} +/// HK = D_{p1, p2} = \sum_{R} e^{ikR} HR +/// Template parameters: +/// - TK: data type of k-space Hamiltonian +/// - TR: data type of real space Hamiltonian +template +class DFTUNew> : public OperatorLCAO +{ + public: + DFTUNew>(LCAO_Matrix* LM_in, + const std::vector>& kvec_d_in, + hamilt::HContainer* hR_in, + std::vector* hK_in, + const UnitCell* ucell_in, + Grid_Driver* GridD_in, + ModuleDFTU::DFTU* dftu_in, + const Parallel_Orbitals* paraV); + ~DFTUNew>(); + + /** + * @brief contributeHR() is used to calculate the HR matrix + * D_{p1, p2} + */ + virtual void contributeHR() override; + + /// pointer of density matrix, it is a temporary implementation + static const elecstate::DensityMatrix* dm_in_dftu; + + /// calculate force and stress for DFT+U + void cal_force_stress( + const bool cal_force, + const bool cal_stress, + ModuleBase::matrix& force, + ModuleBase::matrix& stress); + + private: + const UnitCell* ucell = nullptr; + + ModuleDFTU::DFTU* dftu = nullptr; + + hamilt::HContainer* HR = nullptr; + + hamilt::HContainer* HR_fixed = nullptr; + + bool allocated = false; + + TK* HK_pointer = nullptr; + + bool HR_fixed_done = false; + + /** + * @brief initialize HR, search the nearest neighbor atoms + * HContainer is used to store the non-local pseudopotential matrix with specific atom-pairs + * the size of HR will be fixed after initialization + */ + void initialize_HR(Grid_Driver* GridD_in, const Parallel_Orbitals* paraV); + + /** + * @brief calculate the overlap values and save them in this->nlm_tot + * it will be reused in the calculation of calculate_HR() + */ + void cal_nlm_all(const Parallel_Orbitals* paraV); + + void cal_occupations(const int& iat1, + const int& iat2, + const int& T0, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const double* data_pointer, + std::vector& occupations); + + /// transfer VU format from pauli matrix to normal for non-collinear spin case + void transfer_vu(std::vector& vu_tmp, std::vector& vu); + /// VU_{m, m'} = sum_{m,m'} (1/2*delta_{m, m'} - occ_{m, m'}) * U + /// EU = sum_{m,m'} 1/2 * U * occ_{m, m'} * occ_{m', m} + void cal_v_of_u( + const std::vector& occ, + const int m_size, + const double u_value, + double* VU, + double& E); + + /** + * @brief calculate the non-local pseudopotential matrix with specific atom-pairs + * nearest neighbor atoms don't need to be calculated again + * loop the atom-pairs in HR and calculate the non-local pseudopotential matrix + */ + void calculate_HR(); + + /** + * @brief calculate the HR local matrix of atom pair + */ + void cal_HR_IJR(const int& iat1, + const int& iat2, + const int& T0, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const std::vector& vu_in, + TR* data_pointer); + + /** + * @brief calculate the atomic Force of atom pair + */ + void cal_force_IJR(const int& iat1, + const int& iat2, + const int& T0, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const std::vector& vu_in, + const hamilt::BaseMatrix** dmR_pointer, + const int nspin, + double* force1, + double* force2); + /** + * @brief calculate the Stress of atom pair + */ + void cal_stress_IJR(const int& iat1, + const int& iat2, + const int& T0, + const Parallel_Orbitals* paraV, + const std::unordered_map>& nlm1_all, + const std::unordered_map>& nlm2_all, + const std::vector& vu_in, + const hamilt::BaseMatrix** dmR_pointer, + const int nspin, + const ModuleBase::Vector3& dis1, + const ModuleBase::Vector3& dis2, + double* stress); + + std::vector adjs_all; + bool precal_nlm_done = false; + std::vector>>> nlm_tot; +}; + +} // namespace hamilt +#endif \ No newline at end of file diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.cpp index 2d4b3aaab4..aa5a7d134a 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.cpp @@ -5,6 +5,7 @@ #include "module_hamilt_general/module_xc/xc_functional.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" #include "module_ri/RI_2D_Comm.h" +#include "module_base/blacs_connector.h" namespace hamilt { @@ -21,77 +22,68 @@ void OperatorEXX>::contributeHR() } -// double and complex are the same temperarily template<> -void OperatorEXX>::contributeHk(int ik) +void OperatorEXX>::add_loaded_Hexx(const int ik) { - // Peize Lin add 2016-12-03 - if(XC_Functional::get_func_type()==4 || XC_Functional::get_func_type()==5) - { - if(GlobalC::exx_info.info_ri.real_number) - RI_2D_Comm::add_Hexx( - kv, - ik, - GlobalC::exx_info.info_global.hybrid_alpha, - this->Hexxd == nullptr ? *this->LM->Hexxd : *this->Hexxd, - *this->LM->ParaV, - *this->hK); - else - RI_2D_Comm::add_Hexx( - kv, - ik, - GlobalC::exx_info.info_global.hybrid_alpha, - this->Hexxc == nullptr ? *this->LM->Hexxc : *this->Hexxc, - *this->LM->ParaV, - *this->hK); - } + BlasConnector::axpy(this->LM->ParaV->get_local_size(), 1.0, this->LM->Hexxd_k_load[ik].data(), 1, this->LM->Hloc.data(), 1); } +template<> +void OperatorEXX, double>>::add_loaded_Hexx(const int ik) +{ + BlasConnector::axpy(this->LM->ParaV->get_local_size(), 1.0, this->LM->Hexxc_k_load[ik].data(), 1, this->LM->Hloc2.data(), 1); +} template<> -void OperatorEXX, double>>::contributeHk(int ik) +void OperatorEXX, std::complex>>::add_loaded_Hexx(const int ik) { - // Peize Lin add 2016-12-03 - if(XC_Functional::get_func_type()==4 || XC_Functional::get_func_type()==5) - { - if(GlobalC::exx_info.info_ri.real_number) - RI_2D_Comm::add_Hexx( - kv, - ik, - GlobalC::exx_info.info_global.hybrid_alpha, - *this->LM->Hexxd, - *this->LM->ParaV, - *this->hK); - else - RI_2D_Comm::add_Hexx( - kv, - ik, - GlobalC::exx_info.info_global.hybrid_alpha, - *this->LM->Hexxc, - *this->LM->ParaV, - *this->hK); - } + BlasConnector::axpy(this->LM->ParaV->get_local_size(), 1.0, this->LM->Hexxc_k_load[ik].data(), 1, this->LM->Hloc2.data(), 1); } -template<> -void OperatorEXX, std::complex>>::contributeHk(int ik) + +template +void OperatorEXX>::contributeHk(int ik) { // Peize Lin add 2016-12-03 - if(XC_Functional::get_func_type()==4 || XC_Functional::get_func_type()==5) + if (this->two_level_step != nullptr && *this->two_level_step == 0 && !this->restart) return; //in the non-exx loop, do nothing + if (XC_Functional::get_func_type() == 4 || XC_Functional::get_func_type() == 5) { - if(GlobalC::exx_info.info_ri.real_number) + if (this->restart && this->two_level_step != nullptr) + { + if (*this->two_level_step == 0) + { + add_loaded_Hexx(ik); + return; + } + else // clear loaded Hexx and release memory + { + if (this->LM->Hexxd_k_load.size() > 0) + { + this->LM->Hexxd_k_load.clear(); + this->LM->Hexxd_k_load.shrink_to_fit(); + } + else if (this->LM->Hexxc_k_load.size() > 0) + { + this->LM->Hexxc_k_load.clear(); + this->LM->Hexxc_k_load.shrink_to_fit(); + } + } + } + // cal H(k) from H(R) normally + + if (GlobalC::exx_info.info_ri.real_number) RI_2D_Comm::add_Hexx( kv, ik, - GlobalC::exx_info.info_global.hybrid_alpha, - *this->LM->Hexxd, + GlobalC::exx_info.info_global.hybrid_alpha, + this->Hexxd == nullptr ? *this->LM->Hexxd : *this->Hexxd, *this->LM->ParaV, *this->hK); - else + else RI_2D_Comm::add_Hexx( kv, ik, - GlobalC::exx_info.info_global.hybrid_alpha, - *this->LM->Hexxc, + GlobalC::exx_info.info_global.hybrid_alpha, + this->Hexxc == nullptr ? *this->LM->Hexxc : *this->Hexxc, *this->LM->ParaV, *this->hK); } diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.h b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.h index eb81825b87..603eb71180 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.h +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.h @@ -5,6 +5,7 @@ #include "operator_lcao.h" #ifdef __EXX #include +#include "module_hamilt_pw/hamilt_pwdft/global.h" namespace hamilt { @@ -28,10 +29,44 @@ class OperatorEXX> : public OperatorLCAO std::vector* hK_in, const K_Vectors& kv_in, std::vector>>>* Hexxd_in = nullptr, - std::vector>>>>* Hexxc_in = nullptr) - : kv(kv_in), Hexxd(Hexxd_in), Hexxc(Hexxc_in), OperatorLCAO(LM_in, kv_in.kvec_d, hR_in, hK_in) + std::vector>>>>* Hexxc_in = nullptr, + int* two_level_step = nullptr, + const bool restart_in = false) + : kv(kv_in), Hexxd(Hexxd_in), Hexxc(Hexxc_in), OperatorLCAO(LM_in, kv_in.kvec_d, hR_in, hK_in), + two_level_step(two_level_step), restart(restart_in) { this->cal_type = lcao_exx; + if (restart) + {/// Now only Hexx depends on DM, so we can directly read Hexx to reduce the computational cost. + /// If other operators depends on DM, we can also read DM and then calculate the operators to save the memory to store operator terms. + assert(two_level_step != nullptr); + /// read in Hexx + if (std::is_same::value) + { + this->LM->Hexxd_k_load.resize(this->kv.nks); + for (int ik = 0; ik < this->kv.nks; ik++) + { + this->LM->Hexxd_k_load[ik].resize(this->LM->ParaV->get_local_size(), 0.0); + restart = GlobalC::restart.load_disk("Hexx", ik, + this->LM->ParaV->get_local_size(), this->LM->Hexxd_k_load[ik].data(), false); + if (!restart) break; + } + } + else + { + this->LM->Hexxc_k_load.resize(this->kv.nks); + for (int ik = 0; ik < this->kv.nks; ik++) + { + this->LM->Hexxc_k_load[ik].resize(this->LM->ParaV->get_local_size(), 0.0); + restart = GlobalC::restart.load_disk("Hexx", ik, + this->LM->ParaV->get_local_size(), this->LM->Hexxc_k_load[ik].data(), false); + if (!restart) break; + } + } + if (!restart) std::cout << "WARNING: Hexx not found, restart from the non-exx loop. \n \ + If the loaded charge density is EXX-solved, this may lead to poor convergence." << std::endl; + GlobalC::restart.info_load.load_H_finish = restart; + } } virtual void contributeHR() override; @@ -45,6 +80,15 @@ class OperatorEXX> : public OperatorLCAO std::vector>>>* Hexxd = nullptr; std::vector>>>>* Hexxc = nullptr; + /// @brief the step of the outer loop. + /// nullptr: no dependence on the number of two_level_step, contributeHk will do enerything normally. + /// 0: the first outer loop. If restart, contributeHk will directly add Hexx to Hloc. else, do nothing. + /// >0: not the first outer loop. contributeHk will do enerything normally. + int* two_level_step = nullptr; + /// @brief if restart, read and save Hexx, and directly use it during the first outer loop. + bool restart = false; + + void add_loaded_Hexx(const int ik); const K_Vectors& kv; }; diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.cpp index 1ce2c5760a..2e6bfb4a4e 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.cpp @@ -177,7 +177,11 @@ void OperatorLCAO::init(const int ik_in) { //only HK should be updated when cal_type=lcao_dftu //in cal_type=lcao_dftu, HK only need to update from one node - this->contributeHk(ik_in); + if(!this->hr_done) + { + //in cal_type=lcao_deepks, HR should be updated + this->contributeHR(); + } break; } case lcao_sc_lambda: diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.cpp index 310e26205a..a0d159051c 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.cpp @@ -156,6 +156,7 @@ void Veff>::contributeHR() this->GG->transfer_pvpR(this->hR); this->new_e_iteration = false; + ModuleBase::timer::tick("Veff", "contributeHR"); } } \ No newline at end of file diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/record_adj.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/record_adj.cpp index c648e25fa3..a5fa9a54e3 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/record_adj.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/record_adj.cpp @@ -63,7 +63,6 @@ void Record_adj::for_2d(Parallel_Orbitals &pv, bool gamma_only) ModuleBase::GlobalFunc::ZEROS(na_each, na_proc); int iat = 0; -// std::cout << " in for_2d" << std::endl; for (int T1 = 0; T1 < GlobalC::ucell.ntype; ++T1) { diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.cpp b/source/module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.cpp index 1d0f480a32..7c7739dac9 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.cpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.cpp @@ -400,8 +400,10 @@ void Wavefunc_in_pw::produce_local_basis_in_pw(const int& ik, for(int m = 0;m<2*L+1;m++) { const int lm = L*L +m; - if (iwall + 2 * L + 1 > GlobalC::ucell.natomwfc) - ModuleBase::WARNING_QUIT("this->wf.atomic_wfc()", "error: too many wfcs"); + if (iwall + 2 * L + 1 > GlobalC::ucell.natomwfc) + { + ModuleBase::WARNING_QUIT("this->wf.atomic_wfc()", "error: too many wfcs"); + } for (int ig = 0; ig < npw; ig++) { aux[ig] = sk[ig] * ylm(lm,ig) * flq[ig]; @@ -430,7 +432,8 @@ void Wavefunc_in_pw::produce_local_basis_in_pw(const int& ik, } // end else GlobalC::ucell.atoms[it].has_so } // end for is_N } // end if GlobalV::NONCOLIN - else{//LSDA and nomagnet case + else + {//LSDA and nomagnet case for(int m=0; m<2*L+1; m++) { const int lm = L*L+m; @@ -455,241 +458,3 @@ void Wavefunc_in_pw::produce_local_basis_in_pw(const int& ik, delete[] gk; } -// void Wavefunc_in_pw::produce_local_basis_q_in_pw(const int &ik, -// ModuleBase::ComplexMatrix &psi, -// ModulePW::PW_Basis_K *wfc_basis, -// const ModuleBase::realArray &table_local, -// ModuleBase::Vector3 q) // pengfei 2016-11-23 -// { -// ModuleBase::TITLE("Wavefunc_in_pw","produce_local_basis_in_pw"); -// assert(ik>=0); -// const int npw = kv.ngk[ik]; -// const int total_lm = ( GlobalC::ucell.lmax + 1) * ( GlobalC::ucell.lmax + 1); -// ModuleBase::matrix ylm(total_lm, npw); -// std::complex *aux = new std::complex[npw]; -// double *chiaux = nullptr; - -// ModuleBase::Vector3 *gkq = new ModuleBase::Vector3[npw]; - -// for(int ig=0;iggetgpluskcar(ik, ig) + q; -// } - -// ModuleBase::YlmReal::Ylm_Real(total_lm, npw, gkq, ylm); - -// //int index = 0; -// double *flq = new double[npw]; -// int iwall=0; -// for (int it = 0;it < GlobalC::ucell.ntype;it++) -// { -// for (int ia = 0;ia < GlobalC::ucell.atoms[it].na;ia++) -// { -// std::complex *skq = GlobalC::sf.get_skq(ik, it, ia, wfc_basis, q); -// int ic=0; -// for(int L = 0; L < GlobalC::ucell.atoms[it].nwl+1; L++) -// { -// std::complex lphase = pow(ModuleBase::NEG_IMAG_UNIT, L); //mohan 2010-04-19 -// for(int N=0; N < GlobalC::ucell.atoms[it].l_nchi[L]; N++) -// { -// for(int ig=0; ig ((GlobalV::NQX-4) * GlobalV::DQ) ) -// { -// flq[ig] = 0.0; -// } -// else -// { -// flq[ig] = ModuleBase::PolyInt::Polynomial_Interpolation(table_local, it, ic, GlobalV::NQX, -// GlobalV::DQ, gkq[ig].norm() * GlobalC::ucell.tpiba ); -// } -// } - -// if(GlobalV::NSPIN==4) -// { -// Soc soc; -// soc.rot_ylm(GlobalC::ucell.atoms[it].nwl+1); -// for(int is_N = 0; is_N < 2; is_N++) -// { -// if(L==0&&is_N==1) continue; -// if(GlobalC::ucell.atoms[it].ncpp.has_so) -// { -// const double j = double(L+is_N) - 0.5; -// if ( !(GlobalV::DOMAG||GlobalV::DOMAG_Z)) -// {//atomic_wfc_so -// double fact[2]; -// for(int m=-L-1;m1e-8||fabs(fact[1])>1e-8) -// { -// for(int is=0;is<2;is++) -// { -// if(fabs(fact[is])>1e-8) -// { -// const int ind = GlobalC::ppcell.lmaxkb + soc.sph_ind(L,j,m,is); -// ModuleBase::GlobalFunc::ZEROS(aux, npw); -// for(int n1=0;n1<2*L+1;n1++){ -// const int lm = L*L +n1; -// if(std::abs(soc.rotylm(n1,ind))>1e-8) -// for(int ig=0; ignpwk_max*is ) = lphase * fact[is] * skq[ig] -// * aux[ig] -// * flq[ig]; -// } -// else -// for(int ig=0; ignpwk_max*is) = -// std::complex(0.0 , 0.0); -// }//is -// iwall++; -// }//if -// }//m -// }//if -// else -// {//atomic_wfc_so_mag - -// double alpha, gamma; -// std::complex fup,fdown; -// //int nc; -// //This routine creates two functions only in the case j=l+1/2 or exit in the other -// case if(fabs(j-L+0.5<1e-4)) continue; delete[] chiaux; chiaux = new double [npw]; -// //Find the functions j= l- 1/2 -// if(L==0) -// for(int ig=0;igGlobalC::ucell.natomwfc) -// ModuleBase::WARNING_QUIT("this->wf.atomic_wfc()","error: too many wfcs"); for(int ig = 0;ignpwk_max) = (cos(0.5 * gamma) - ModuleBase::IMAG_UNIT * -// sin(0.5*gamma)) -// * fdown; -// //second rotation with angle gamma around(OZ) -// fup = cos(0.5 * (alpha + ModuleBase::PI))*aux[ig]; -// fdown = ModuleBase::IMAG_UNIT * sin(0.5 * (alpha + ModuleBase::PI))*aux[ig]; -// psi(iwall+2*L+1,ig) = (cos(0.5*gamma) + -// ModuleBase::IMAG_UNIT*sin(0.5*gamma))*fup; psi(iwall+2*L+1,ig+ wfc_basis->npwk_max) -// = (cos(0.5*gamma) -// - ModuleBase::IMAG_UNIT*sin(0.5*gamma))*fdown; -// } -// iwall++; -// } -// iwall += 2*L +1; -// } -// } -// else -// {//atomic_wfc_nc -// double alpha, gamman; -// std::complex fup, fdown; -// //alpha = GlobalC::ucell.magnet.angle1_[it]; -// //gamman = -GlobalC::ucell.magnet.angle2_[it] + 0.5*ModuleBase::PI; -// alpha = GlobalC::ucell.atoms[it].angle1[ia]; -// gamman = -GlobalC::ucell.atoms[it].angle2[ia]+ 0.5*ModuleBase::PI; -// for(int m = 0;m<2*L+1;m++) -// { -// const int lm = L*L +m; -// // if(iwall+2*l+1>GlobalC::ucell.natomwfc) -// ModuleBase::WARNING_QUIT("this->wf.atomic_wfc()","error: too many wfcs"); for(int -// ig = 0;ignpwk_max) = (cos(0.5 * gamman) - ModuleBase::IMAG_UNIT * -// sin(0.5*gamman)) -// * fdown; -// //second rotation with angle gamma around(OZ) -// fup = cos(0.5 * (alpha + ModuleBase::PI)) * aux[ig]; -// fdown = ModuleBase::IMAG_UNIT * sin(0.5 * (alpha + ModuleBase::PI)) * aux[ig]; -// psi(iwall+2*L+1,ig) = (cos(0.5*gamman) + -// ModuleBase::IMAG_UNIT*sin(0.5*gamman))*fup; psi(iwall+2*L+1,ig+ wfc_basis->npwk_max) -// = (cos(0.5*gamman) -// - ModuleBase::IMAG_UNIT*sin(0.5*gamman))*fdown; -// } -// iwall++; -// } -// iwall += 2*L+1; -// } -// // iwall++; -// }//end is_N -// }//end if -// else{//LSDA and nomagnet case -// for(int m=0; m<2*L+1; m++) -// { -// const int lm = L*L+m; -// for(int ig=0; ig q); // pengfei 2016-11-23 } #endif diff --git a/source/module_hamilt_lcao/module_deltaspin/lambda_loop_helper.cpp b/source/module_hamilt_lcao/module_deltaspin/lambda_loop_helper.cpp index 40fd5bd281..54c2387c26 100644 --- a/source/module_hamilt_lcao/module_deltaspin/lambda_loop_helper.cpp +++ b/source/module_hamilt_lcao/module_deltaspin/lambda_loop_helper.cpp @@ -161,14 +161,14 @@ bool SpinConstrain, psi::DEVICE_CPU>::check_gradient_decay( std::cout << "maximum gradient: " << std::endl; for (int it = 0; it < ntype; it++) { - std::cout << max_gradient[it] << std::endl; + std::cout << max_gradient[it]/ModuleBase::Ry_to_eV << std::endl; } } for (int it = 0; it < ntype; it++) { if (this->decay_grad_[it] > 0 && std::abs(max_gradient[it]) < this->decay_grad_[it]) { - std::cout << "Reach limitation of current step ( maximum gradient < " << this->decay_grad_[it] + std::cout << "Reach limitation of current step ( maximum gradient < " << this->decay_grad_[it]/ModuleBase::Ry_to_eV // uB^2/Ry to uB^2/eV << " in atom type " << it << " ), exit." << std::endl; return true; } diff --git a/source/module_hamilt_lcao/module_dftu/dftu.h b/source/module_hamilt_lcao/module_dftu/dftu.h index 415479a6f3..f3d6893e67 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu.h +++ b/source/module_hamilt_lcao/module_dftu/dftu.h @@ -48,9 +48,9 @@ class DFTU int omc; // occupation matrix control int mixing_dftu; //whether to mix locale + double EU; //+U energy private: LCAO_Matrix* LM; - double EU; //+U energy int cal_type = 3; // 1:dftu_tpye=1, dc=1; 2:dftu_type=1, dc=2; 3:dftu_tpye=2, dc=1; 4:dftu_tpye=2, dc=2; // transform between iwt index and it, ia, L, N and m index @@ -77,20 +77,21 @@ class DFTU void cal_occup_m_k(const int iter, const std::vector>>& dm_k, const K_Vectors& kv, const double& mixing_beta, hamilt::Hamilt>* p_ham); void cal_occup_m_gamma(const int iter, const std::vector>& dm_gamma, const double& mixing_beta); - private: // dftu can be calculated only after locale has been initialed bool initialed_locale = false; + private: void copy_locale(); void zero_locale(); void mix_locale(const double& mixing_beta); +public: // local occupancy matrix of the correlated subspace // locale: the out put local occupation number matrix of correlated electrons in the current electronic step // locale_save: the input local occupation number matrix of correlated electrons in the current electronic step std::vector>>> locale; // locale[iat][l][n][spin](m1,m2) std::vector>>> locale_save; // locale_save[iat][l][n][spin](m1,m2) - +private: //============================================================= // In dftu_tools.cpp // For calculating onsite potential, which is used @@ -161,7 +162,7 @@ class DFTU void output(); private: - void write_occup_m(std::ofstream& ofs); + void write_occup_m(std::ofstream& ofs, bool diag=false); void read_occup_m(const std::string& fn); void local_occup_bcast(); diff --git a/source/module_hamilt_lcao/module_dftu/dftu_io.cpp b/source/module_hamilt_lcao/module_dftu/dftu_io.cpp index ac9176a3d4..58425dd915 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu_io.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu_io.cpp @@ -47,7 +47,7 @@ void DFTU::output() } GlobalV::ofs_running << "Local occupation matrices" << std::endl; - this->write_occup_m(GlobalV::ofs_running); + this->write_occup_m(GlobalV::ofs_running, 1); GlobalV::ofs_running << "//=======================================================//" << std::endl; //Write onsite.dm @@ -67,7 +67,10 @@ void DFTU::output() return; } -void DFTU::write_occup_m(std::ofstream &ofs) +// define the function calculate the eigenvalues of a matrix +std::vector CalculateEigenvalues(std::vector>& A, int n); + +void DFTU::write_occup_m(std::ofstream &ofs, bool diag) { ModuleBase::TITLE("DFTU", "write_occup_m"); @@ -106,8 +109,32 @@ void DFTU::write_occup_m(std::ofstream &ofs) if (GlobalV::NSPIN == 1 || GlobalV::NSPIN == 2) { + double sum0[2]; for (int is = 0; is < 2; is++) { + if(diag)// diagonalization for local occupation matrix and print the eigenvalues + { + std::vector> A(2 * l + 1, std::vector(2 * l + 1)); + for (int m0 = 0; m0 < 2 * l + 1; m0++) + { + for (int m1 = 0; m1 < 2 * l + 1; m1++) + { + A[m0][m1] = locale[iat][l][n][is](m0, m1); + } + } + std::vector eigenvalues = CalculateEigenvalues(A, 2 * l + 1); + sum0[is] = 0.0; + ofs<< "eigenvalues" + << " " << is << std::endl; + for (int i = 0; i < 2 * l + 1; i++) + { + ofs << std::setw(12) << std::setprecision(8) << std::fixed + << eigenvalues[i]; + sum0[is] += eigenvalues[i]; + } + ofs << std::setw(12) << std::setprecision(8) << std::fixed + << sum0[is] << std::endl; + } ofs << "spin" << " " << is << std::endl; for (int m0 = 0; m0 < 2 * l + 1; m0++) @@ -120,9 +147,44 @@ void DFTU::write_occup_m(std::ofstream &ofs) ofs << std::endl; } } + if(diag) + { + ofs << std::setw(12) << std::setprecision(8) << std::fixed<< "atomic mag: "<> A(2 * l + 1, std::vector(2 * l + 1)); + int index = 0; + for(int is=0;is<4;is++) + { + for (int m0 = 0; m0 < 2 * l + 1; m0++) + { + for (int m1 = 0; m1 < 2 * l + 1; m1++) + { + A[m0][m1] = locale[iat][l][n][0].c[index]; + index++; + } + } + std::vector eigenvalues = CalculateEigenvalues(A, 2 * l + 1); + sum0[is] = 0.0; + ofs<< "eigenvalues" + << " " << is << std::endl; + for (int i = 0; i < 2 * l + 1; i++) + { + ofs << std::setw(12) << std::setprecision(8) << std::fixed + << eigenvalues[i]; + sum0[is] += eigenvalues[i]; + } + ofs << std::setw(12) << std::setprecision(8) << std::fixed + << sum0[is] << std::endl; + } + ofs << std::setw(12) << std::setprecision(8) << std::fixed<< "atomic mag: "<>& A, int p, int q, int n) { + if (std::abs(A[p][q]) > 1e-10) { + double r = (A[q][q] - A[p][p]) / (2.0 * A[p][q]); + double t; + if (r >= 0) { + t = 1.0 / (r + sqrt(1.0 + r * r)); + } else { + t = -1.0 / (-r + sqrt(1.0 + r * r)); + } + double c = 1.0 / sqrt(1.0 + t * t); + double s = t * c; + + A[p][p] -= t * A[p][q]; + A[q][q] += t * A[p][q]; + A[p][q] = A[q][p] = 0.0; + + for (int k = 0; k < n; k++) { + if (k != p && k != q) { + double Akp = c * A[k][p] - s * A[k][q]; + double Akq = s * A[k][p] + c * A[k][q]; + A[k][p] = A[p][k] = Akp; + A[k][q] = A[q][k] = Akq; + } + } + } +} + +inline std::vector CalculateEigenvalues(std::vector>& A, int n) { + std::vector eigenvalues(n); + while (true) { + int p = 0, q = 1; + for (int i = 0; i < n; i++) { + for (int j = i + 1; j < n; j++) { + if (std::abs(A[i][j]) > std::abs(A[p][q])) { + p = i; + q = j; + } + } + } + + if (std::abs(A[p][q]) < 1e-10) { + for (int i = 0; i < n; i++) { + eigenvalues[i] = A[i][i]; + } + break; + } + + JacobiRotate(A, p, q, n); + } + return eigenvalues; +} } // namespace ModuleDFTU \ No newline at end of file diff --git a/source/module_hamilt_lcao/module_dftu/dftu_yukawa.cpp b/source/module_hamilt_lcao/module_dftu/dftu_yukawa.cpp index 3e6399e1b9..5c97fb5de0 100644 --- a/source/module_hamilt_lcao/module_dftu/dftu_yukawa.cpp +++ b/source/module_hamilt_lcao/module_dftu/dftu_yukawa.cpp @@ -34,6 +34,7 @@ void DFTU::cal_yukawa_lambda(double** rho, const int& nrxx) double sum_rho_lambda = 0.0; for (int is = 0; is < GlobalV::NSPIN; is++) { + if(GlobalV::NSPIN == 4 && is > 0) continue;// for non-collinear spin case, first spin contains the charge density for (int ir = 0; ir < nrxx; ir++) { double rho_ir = rho[is][ir]; @@ -173,6 +174,8 @@ void DFTU::cal_slater_UJ(double** rho, const int& nrxx) // Hartree to Rydeberg this->U_Yukawa[T][L][n] *= 2.0; this->J_Yukawa[T][L][n] *= 2.0; + // update current U with calculated U-J from Slater integrals + this->U[T] = this->U_Yukawa[T][L][n] - this->J_Yukawa[T][L][n]; } // end n } // end if } // end L diff --git a/source/module_hamilt_lcao/module_tddft/test/CMakeLists.txt b/source/module_hamilt_lcao/module_tddft/test/CMakeLists.txt index 675806ca8d..d37a98d217 100644 --- a/source/module_hamilt_lcao/module_tddft/test/CMakeLists.txt +++ b/source/module_hamilt_lcao/module_tddft/test/CMakeLists.txt @@ -1,6 +1,8 @@ remove_definitions(-D __MPI) add_library(tddft_test_lib tddft_test.cpp) +target_link_libraries(tddft_test_lib Threads::Threads GTest::gtest_main GTest::gmock_main) +#target_include_directories(tddft_test_lib PUBLIC $<$:${GTEST_INCLUDE_DIRS}>) AddTest( TARGET tddft_middle_hamilt_test diff --git a/source/module_hamilt_pw/hamilt_pwdft/forces.cpp b/source/module_hamilt_pw/hamilt_pwdft/forces.cpp index 976f0b539e..7c2c15321f 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/forces.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/forces.cpp @@ -420,16 +420,22 @@ void Forces::cal_force(ModuleBase::matrix& force, { ModuleIO::print_force(GlobalV::ofs_running, GlobalC::ucell, "PAW FORCE (eV/Angstrom)", forcepaw, 0); } - if (GlobalV::EFIELD_FLAG) - ModuleIO::print_force(GlobalV::ofs_running, GlobalC::ucell, "EFIELD FORCE (eV/Angstrom)", force_e, 0); - if (GlobalV::GATE_FLAG) - ModuleIO::print_force(GlobalV::ofs_running, - GlobalC::ucell, - "GATEFIELD FORCE (eV/Angstrom)", - force_gate, - 0); - if (GlobalV::imp_sol) - ModuleIO::print_force(GlobalV::ofs_running, GlobalC::ucell, "IMP_SOL FORCE (eV/Angstrom)", forcesol, 0); + if (GlobalV::EFIELD_FLAG) + { + ModuleIO::print_force(GlobalV::ofs_running, GlobalC::ucell, "EFIELD FORCE (eV/Angstrom)", force_e, 0); + } + if (GlobalV::GATE_FLAG) + { + ModuleIO::print_force(GlobalV::ofs_running, + GlobalC::ucell, + "GATEFIELD FORCE (eV/Angstrom)", + force_gate, + 0); + } + if (GlobalV::imp_sol) + { + ModuleIO::print_force(GlobalV::ofs_running, GlobalC::ucell, "IMP_SOL FORCE (eV/Angstrom)", forcesol, 0); + } } ModuleIO::print_force(GlobalV::ofs_running, GlobalC::ucell, "TOTAL-FORCE (eV/Angstrom)", force, 0); @@ -470,11 +476,11 @@ void Forces::cal_force_loc(ModuleBase::matrix& forcelc, aux[ir] = std::complex(chr->rho[0][ir], 0.0); } } - for (int is = 1; is < GlobalV::NSPIN; is++) + if(GlobalV::NSPIN == 2) { for (int ir = irb; ir < ir_end; ++ir) { // accumulate aux - aux[ir] += std::complex(chr->rho[is][ir], 0.0); + aux[ir] += std::complex(chr->rho[1][ir], 0.0); } } } @@ -1304,4 +1310,4 @@ void Forces::cal_force_scc(ModuleBase::matrix& forcescc, template class Forces; #if ((defined __CUDA) || (defined __ROCM)) template class Forces; -#endif \ No newline at end of file +#endif diff --git a/source/module_hamilt_pw/hamilt_pwdft/wavefunc.cpp b/source/module_hamilt_pw/hamilt_pwdft/wavefunc.cpp index cd66bd5fc9..ac16819967 100644 --- a/source/module_hamilt_pw/hamilt_pwdft/wavefunc.cpp +++ b/source/module_hamilt_pw/hamilt_pwdft/wavefunc.cpp @@ -779,23 +779,24 @@ int wavefunc::get_R(int ix, int iy, int iz) // pengfei 2016-11-23 } -int wavefunc::iw2it( int iw) // pengfei 2016-11-23 +int wavefunc::iw2it(int iw) // pengfei 2016-11-23 { int ic, type; - ic =0; - for(int it =0; it #include +#if ELPA_API_VERSION < 20221101 +extern "C" +{ +#endif + struct elpa_struct; typedef struct elpa_struct *elpa_t; @@ -19,9 +24,13 @@ typedef struct elpa_autotune_struct *elpa_autotune_t; // between C99 (e.g. double complex) and C++11 (std::complex). // Thus, we have to define a wrapper of complex over the c api // for compatiability. +#if ELPA_API_VERSION < 20221101 #define complex _Complex +#endif #include +#if ELPA_API_VERSION < 20221101 #undef complex +#endif #include #define ELPA_2STAGE_REAL_GPU ELPA_2STAGE_REAL_NVIDIA_GPU @@ -29,5 +38,9 @@ typedef struct elpa_autotune_struct *elpa_autotune_t; const char *elpa_strerr(int elpa_error); +#if ELPA_API_VERSION < 20221101 +}//extern "C" #endif -#endif + +#endif //__ELPA +#endif //ELPA_H diff --git a/source/module_hsolver/test/diago_elpa_utils.h b/source/module_hsolver/test/diago_elpa_utils.h index ae1befeeea..82aa09c7eb 100644 --- a/source/module_hsolver/test/diago_elpa_utils.h +++ b/source/module_hsolver/test/diago_elpa_utils.h @@ -13,10 +13,7 @@ #include #ifdef __ELPA -extern "C" -{ #include "module_hsolver/my_elpa.h" -} #endif namespace LCAO_DIAGO_TEST diff --git a/source/module_io/CMakeLists.txt b/source/module_io/CMakeLists.txt index bcc98f797f..38bd12f55e 100644 --- a/source/module_io/CMakeLists.txt +++ b/source/module_io/CMakeLists.txt @@ -61,8 +61,9 @@ if(ENABLE_LCAO) sparse_matrix.cpp file_reader.cpp csr_reader.cpp - to_qo.cpp - to_qo_tools.cpp + to_qo_kernel.cpp + to_qo_mpi.cpp + to_qo_structures.cpp ) list(APPEND objects_advanced unk_overlap_lcao.cpp diff --git a/source/module_io/berryphase.cpp b/source/module_io/berryphase.cpp index ad73c2b41d..3c1fd7abf2 100644 --- a/source/module_io/berryphase.cpp +++ b/source/module_io/berryphase.cpp @@ -239,8 +239,8 @@ double berryphase::stringPhase(int index_str, { std::complex zeta(1.0, 0.0); ModuleBase::ComplexMatrix mat(nbands,nbands); - int ik_1; - int ik_2; + int ik_1 = 0; + int ik_2 = 0; ModuleBase::Vector3 G(0.0,0.0,0.0); ModuleBase::Vector3 dk = kv.kvec_c[ k_index[index_str][1] ] - kv.kvec_c[ k_index[index_str][0] ]; //GlobalV::ofs_running << "the std::string index is " << index_str << std::endl; @@ -577,7 +577,7 @@ void berryphase::Macroscopic_polarization(const int npwx, // ion polarization end // calculate Macroscopic polarization modulus because berry phase - int modulus; + int modulus = 0; if( (!lodd) && (GlobalV::NSPIN==1) ) modulus = 2; else modulus = 1; diff --git a/source/module_io/cube_io.h b/source/module_io/cube_io.h index fef8a4b1ce..c5606329c2 100644 --- a/source/module_io/cube_io.h +++ b/source/module_io/cube_io.h @@ -12,7 +12,11 @@ bool read_cube( #ifdef __MPI Parallel_Grid* Pgrid, #endif + int my_rank, + std::string esolver_type, + int rank_in_stogroup, const int& is, + std::ofstream& ofs_running, const int& nspin, const std::string& fn, double* data, diff --git a/source/module_io/dm_io.h b/source/module_io/dm_io.h index 003b0d1a1c..346763b2a6 100644 --- a/source/module_io/dm_io.h +++ b/source/module_io/dm_io.h @@ -12,6 +12,9 @@ void read_dm( const int nnrg, const int* trace_lo, #endif + const bool gamma_only_local, + const int nlocal, + const int nspin, const int &is, const std::string &fn, double*** DM, @@ -30,7 +33,10 @@ void write_dm( int out_dm, double*** DM, const double& ef, - const UnitCell* ucell); + const UnitCell* ucell, + const int my_rank, + const int nspin, + const int nlocal); } diff --git a/source/module_io/input.cpp b/source/module_io/input.cpp index c68311c5ae..9588132f25 100644 --- a/source/module_io/input.cpp +++ b/source/module_io/input.cpp @@ -371,6 +371,7 @@ void Input::Default(void) lcao_dk = 0.01; lcao_dr = 0.01; lcao_rmax = 30; // (a.u.) + onsite_radius = 0; // (a.u.) //---------------------------------------------------------- // efield and dipole correction Yu Liu add 2022-05-18 //---------------------------------------------------------- @@ -552,7 +553,7 @@ void Input::Default(void) //========================================================== // DFT+U Xin Qu added on 2020-10-29 //========================================================== - dft_plus_u = false; // 1:DFT+U correction; 0: standard DFT calcullation + dft_plus_u = 0; // 2:DFT+U correction with dual occupations 1:DFT+U correction with full occupations; 0: standard DFT calcullation yukawa_potential = false; yukawa_lambda = -1.0; omc = 0; @@ -638,7 +639,7 @@ void Input::Default(void) // variables for Quasiatomic Orbital analysis //========================================================== qo_switch = false; - qo_basis = "hydrogen"; + qo_basis = "szv"; qo_strategy = {}; qo_thr = 1e-6; qo_screening_coeff = {}; @@ -1512,6 +1513,10 @@ bool Input::Read(const std::string& fn) { read_value(ifs, lcao_rmax); } + else if (strcmp("onsite_radius", word) == 0) + { + read_value(ifs, onsite_radius); + } //---------------------------------------------------------- // Molecule Dynamics // Yu Liu add 2021-07-30 @@ -2112,7 +2117,7 @@ bool Input::Read(const std::string& fn) //---------------------------------------------------------------------------------- else if (strcmp("dft_plus_u", word) == 0) { - read_bool(ifs, dft_plus_u); + read_value(ifs, dft_plus_u); } else if (strcmp("yukawa_potential", word) == 0) ifs.ignore(150, '\n'); @@ -2513,11 +2518,16 @@ bool Input::Read(const std::string& fn) } } - dft_plus_u = 0; + bool close_plus_u = 1; for (int i = 0; i < ntype; i++) { if (orbital_corr[i] != -1) - dft_plus_u = 1; + close_plus_u = 0; + } + if(close_plus_u) + { + dft_plus_u = 0; + GlobalV::ofs_running << "No atoms are correlated, DFT+U is closed!!!" << std::endl; } if (strcmp("lcao", basis_type.c_str()) != 0) @@ -3057,6 +3067,11 @@ void Input::Default_2(void) // jiyy add 2019-08-04 if (!bz) bz = 1; } + if(dft_plus_u == 1 && onsite_radius == 0.0) + { + //autoset onsite_radius to 5.0 as default + onsite_radius = 5.0; + } } if (basis_type == "pw" || basis_type == "lcao_in_pw") @@ -3155,7 +3170,13 @@ void Input::Default_2(void) // jiyy add 2019-08-04 } else { - std::string default_strategy = (qo_basis == "hydrogen")? "minimal-valence": "all"; + std::string default_strategy; + if(qo_basis == "hydrogen") default_strategy = "energy-valence"; + else if((qo_basis == "pswfc")||(qo_basis == "szv")) default_strategy = "all"; + else + { + ModuleBase::WARNING_QUIT("Input", "When setting default values for qo_strategy, unexpected/unknown qo_basis is found. Please check it."); + } qo_strategy.resize(ntype, default_strategy); } } @@ -3426,6 +3447,7 @@ void Input::Bcast() Parallel_Common::bcast_double(lcao_dk); Parallel_Common::bcast_double(lcao_dr); Parallel_Common::bcast_double(lcao_rmax); + Parallel_Common::bcast_double(onsite_radius); // zheng daye add 2014/5/5 Parallel_Common::bcast_string(mdp.md_type); Parallel_Common::bcast_string(mdp.md_thermostat); @@ -3609,7 +3631,7 @@ void Input::Bcast() //----------------------------------------------------------------------------------- // DFT+U (added by Quxin 2020-10-29) //----------------------------------------------------------------------------------- - Parallel_Common::bcast_bool(dft_plus_u); + Parallel_Common::bcast_int(dft_plus_u); Parallel_Common::bcast_bool(yukawa_potential); Parallel_Common::bcast_int(omc); Parallel_Common::bcast_double(yukawa_lambda); @@ -4265,6 +4287,10 @@ void Input::Check(void) { ModuleBase::WARNING_QUIT("INPUT", "sccut must > 0"); } + if (nupdown > 0.0) + { + ModuleBase::WARNING_QUIT("INPUT", "nupdown should not be set when sc_mag_switch > 0"); + } } if(qo_switch) { diff --git a/source/module_io/input.h b/source/module_io/input.h index ececbaeeaa..91f5347c20 100644 --- a/source/module_io/input.h +++ b/source/module_io/input.h @@ -307,6 +307,7 @@ class Input double lcao_rmax; // rmax(a.u.) to make table. double search_radius; // 11.1 bool search_pbc; // 11.2 + double onsite_radius; // the radius of on-site orbitals //========================================================== // molecular dynamics @@ -485,7 +486,7 @@ class Input //========================================================== // DFT+U Xin Qu added on 2020-10-29 //========================================================== - bool dft_plus_u; ///< true:DFT+U correction; false: standard DFT calculation(default) + int dft_plus_u; ///< 1:DFT+U correction; 2:old DFT+U method; 0:standard DFT calculation(default) int* orbital_corr = nullptr; ///< which correlated orbitals need corrected ; d:2 ,f:3, do not need correction:-1 double* hubbard_u = nullptr; ///< Hubbard Coulomb interaction parameter U(ev) int omc; ///< whether turn on occupation matrix control method or not diff --git a/source/module_io/input_conv.cpp b/source/module_io/input_conv.cpp index 604683120c..e18661e7f0 100644 --- a/source/module_io/input_conv.cpp +++ b/source/module_io/input_conv.cpp @@ -414,14 +414,16 @@ void Input_Conv::Convert(void) GlobalC::dftu.omc = INPUT.omc; GlobalC::dftu.orbital_corr = INPUT.orbital_corr; GlobalC::dftu.mixing_dftu = INPUT.mixing_dftu; - if (!INPUT.yukawa_potential) + if (INPUT.yukawa_potential && INPUT.hubbard_u == nullptr) { // Duradev's rotational invariant formulation is implemented // where only an effective U given by U-J is used // unit is in eV - GlobalC::dftu.U = INPUT.hubbard_u; + INPUT.hubbard_u = new double[GlobalC::ucell.ntype]; } + GlobalC::dftu.U = INPUT.hubbard_u; } + GlobalV::onsite_radius = INPUT.onsite_radius; #endif //-------------------------------------------- // added by zhengdy-soc @@ -444,12 +446,12 @@ void Input_Conv::Convert(void) if (INPUT.cal_force || INPUT.cal_stress) { - ModuleBase::WARNING_QUIT("input_conv", "force & stress not ready for soc yet!"); + ModuleBase::WARNING_QUIT("input_conv", "force & stress not ready for nspin=4(soc or noncollinear-spin) yet!"); } if(INPUT.gamma_only_local) { - ModuleBase::WARNING_QUIT("input_conv", "soc does not support gamma only calculation"); + ModuleBase::WARNING_QUIT("input_conv", "nspin=4(soc or noncollinear-spin) does not support gamma only calculation"); } } else @@ -555,11 +557,11 @@ void Input_Conv::Convert(void) || dft_functional_lower == "opt_orb" || dft_functional_lower == "scan0") { GlobalC::restart.info_load.load_charge = true; + GlobalC::restart.info_load.load_H = true; } else { GlobalC::restart.info_load.load_charge = true; - GlobalC::restart.info_load.load_H = true; } } diff --git a/source/module_io/istate_envelope.cpp b/source/module_io/istate_envelope.cpp index 1c46460e8d..1e369a36e3 100644 --- a/source/module_io/istate_envelope.cpp +++ b/source/module_io/istate_envelope.cpp @@ -21,7 +21,13 @@ void IState_Envelope::begin(const psi::Psi* psid, Gint_Gamma& gg, int& out_wfc_pw, int& out_wfc_r, - const K_Vectors& kv) + const K_Vectors& kv, + const double nelec, + const int nbands_istate, + const int nbands, + const int nspin, + const int nlocal, + const std::string& global_out_dir) { ModuleBase::TITLE("IState_Envelope", "begin"); @@ -32,11 +38,11 @@ void IState_Envelope::begin(const psi::Psi* psid, // if ucell is odd, it's correct, // if ucell is even, it's also correct. // +1.0e-8 in case like (2.999999999+1)/2 - int fermi_band = static_cast((GlobalV::nelec + 1) / 2 + 1.0e-8); - int bands_below = GlobalV::NBANDS_ISTATE; - int bands_above = GlobalV::NBANDS_ISTATE; + int fermi_band = static_cast((nelec + 1) / 2 + 1.0e-8); + int bands_below = nbands_istate; + int bands_above = nbands_istate; - std::cout << " number of electrons = " << GlobalV::nelec << std::endl; + std::cout << " number of electrons = " << nelec << std::endl; std::cout << " number of occupied bands = " << fermi_band << std::endl; std::cout << " plot band decomposed charge density below fermi surface with " << bands_below << " bands." << std::endl; @@ -53,9 +59,9 @@ void IState_Envelope::begin(const psi::Psi* psid, // get the charge density. // (2.3) output the charge density in .cub format. - this->bands_picked = new bool[GlobalV::NBANDS]; - ModuleBase::GlobalFunc::ZEROS(bands_picked, GlobalV::NBANDS); - for (int ib = 0; ib < GlobalV::NBANDS; ib++) + this->bands_picked = new bool[nbands]; + ModuleBase::GlobalFunc::ZEROS(bands_picked, nbands); + for (int ib = 0; ib < nbands; ib++) { if (ib >= fermi_band - bands_below) { @@ -67,11 +73,11 @@ void IState_Envelope::begin(const psi::Psi* psid, } //allocate grid wavefunction for gamma_only - std::vector wfc_gamma_grid(GlobalV::NSPIN); - for (int is = 0; is < GlobalV::NSPIN; ++is) + std::vector wfc_gamma_grid(nspin); + for (int is = 0; is < nspin; ++is) { - wfc_gamma_grid[is] = new double* [GlobalV::NBANDS]; - for (int ib = 0;ib < GlobalV::NBANDS; ++ib) + wfc_gamma_grid[is] = new double* [nbands]; + for (int ib = 0;ib < nbands; ++ib) wfc_gamma_grid[is][ib] = new double[gg.gridt->lgd]; } @@ -80,15 +86,15 @@ void IState_Envelope::begin(const psi::Psi* psid, if (out_wfc_pw || out_wfc_r) { - pw_wfc_g.resize(1, GlobalV::NBANDS, kv.ngk[0]); + pw_wfc_g.resize(1, nbands, kv.ngk[0]); } - for (int ib = 0; ib < GlobalV::NBANDS; ib++) + for (int ib = 0; ib < nbands; ib++) { if (bands_picked[ib]) { - for (int is = 0; is < GlobalV::NSPIN; ++is) + for (int is = 0; is < nspin; ++is) { std::cout << " Perform envelope function for band " << ib + 1 << std::endl; ModuleBase::GlobalFunc::ZEROS(pes->charge->rho[is], wfcpw->nrxx); @@ -97,9 +103,9 @@ void IState_Envelope::begin(const psi::Psi* psid, #ifdef __MPI lowf.wfc_2d_to_grid(-1, 0, psid->get_pointer(), wfc_gamma_grid[is], this->pes->ekb, this->pes->wg); #else - for (int i = 0;i < GlobalV::NBANDS;++i) + for (int i = 0;i < nbands;++i) { - for (int j = 0;j < GlobalV::NLOCAL;++j) + for (int j = 0;j < nlocal;++j) wfc_gamma_grid[is][i][j] = psid[0](i, j); } #endif @@ -108,7 +114,7 @@ void IState_Envelope::begin(const psi::Psi* psid, pes->charge->save_rho_before_sum_band(); //xiaohui add 2014-12-09 std::stringstream ss; - ss << GlobalV::global_out_dir << "BAND" << ib + 1 << "_s_" << is + 1 << "_ENV.cube"; + ss << global_out_dir << "BAND" << ib + 1 << "_s_" << is + 1 << "_ENV.cube"; const double ef_tmp = this->pes->eferm.get_efval(is); ModuleIO::write_rho( #ifdef __MPI @@ -119,7 +125,7 @@ void IState_Envelope::begin(const psi::Psi* psid, #endif pes->charge->rho_save[is], is, - GlobalV::NSPIN, + nspin, 0, ss.str(), rhopw->nx, @@ -130,7 +136,7 @@ void IState_Envelope::begin(const psi::Psi* psid, 3); if (out_wfc_pw || out_wfc_r) //only for gamma_only now - this->set_pw_wfc(wfcpw, 0, ib, GlobalV::NSPIN, + this->set_pw_wfc(wfcpw, 0, ib, nspin, pes->charge->rho_save, pw_wfc_g); } } @@ -139,9 +145,9 @@ void IState_Envelope::begin(const psi::Psi* psid, if (out_wfc_pw) { std::stringstream ssw; - ssw << GlobalV::global_out_dir << "WAVEFUNC"; + ssw << global_out_dir << "WAVEFUNC"; std::cout << " write G-space wavefunction into \"" << - GlobalV::global_out_dir << "/" << ssw.str() << "\" files." << std::endl; + global_out_dir << "/" << ssw.str() << "\" files." << std::endl; ModuleIO::write_wfc_pw(ssw.str(), pw_wfc_g, kv, wfcpw); } if (out_wfc_r) @@ -150,9 +156,9 @@ void IState_Envelope::begin(const psi::Psi* psid, } delete[] bands_picked; - for (int is = 0; is < GlobalV::NSPIN; ++is) + for (int is = 0; is < nspin; ++is) { - for (int ib = 0;ib < GlobalV::NBANDS; ++ib) + for (int ib = 0;ib < nbands; ++ib) delete[] wfc_gamma_grid[is][ib]; delete[] wfc_gamma_grid[is]; } @@ -167,7 +173,13 @@ void IState_Envelope::begin(const psi::Psi>* psi, Gint_k& gk, int& out_wf, int& out_wf_r, - const K_Vectors& kv) + const K_Vectors& kv, + const double nelec, + const int nbands_istate, + const int nbands, + const int nspin, + const int nlocal, + const std::string& global_out_dir) { ModuleBase::TITLE("IState_Envelope", "begin"); @@ -179,11 +191,11 @@ void IState_Envelope::begin(const psi::Psi>* psi, // if ucell is even, it's also correct. // +1.0e-8 in case like (2.999999999+1)/2 // if NSPIN=4, each band only one electron, fermi_band should be nelec - int fermi_band = GlobalV::NSPIN<4 ? static_cast((GlobalV::nelec + 1) / 2 + 1.0e-8) : GlobalV::nelec; - int bands_below = GlobalV::NBANDS_ISTATE; - int bands_above = GlobalV::NBANDS_ISTATE; + int fermi_band = nspin<4 ? static_cast((nelec + 1) / 2 + 1.0e-8) : nelec; + int bands_below = nbands_istate; + int bands_above = nbands_istate; - std::cout << " number of electrons = " << GlobalV::nelec << std::endl; + std::cout << " number of electrons = " << nelec << std::endl; std::cout << " number of occupied bands = " << fermi_band << std::endl; std::cout << " plot band decomposed charge density below fermi surface with " << bands_below << " bands." << std::endl; @@ -197,9 +209,9 @@ void IState_Envelope::begin(const psi::Psi>* psi, // get the charge density. // (2.3) output the charge density in .cub format. - this->bands_picked = new bool[GlobalV::NBANDS]; - ModuleBase::GlobalFunc::ZEROS(bands_picked, GlobalV::NBANDS); - for (int ib = 0; ib < GlobalV::NBANDS; ib++) + this->bands_picked = new bool[nbands]; + ModuleBase::GlobalFunc::ZEROS(bands_picked, nbands); + for (int ib = 0; ib < nbands; ib++) { if (ib >= fermi_band - bands_below) { @@ -215,14 +227,14 @@ void IState_Envelope::begin(const psi::Psi>* psi, if (out_wf || out_wf_r) { - pw_wfc_g.resize(kv.nks, GlobalV::NBANDS, wfcpw->npwk_max); + pw_wfc_g.resize(kv.nks, nbands, wfcpw->npwk_max); } - for (int ib = 0; ib < GlobalV::NBANDS; ib++) + for (int ib = 0; ib < nbands; ib++) { if (bands_picked[ib]) { - const int nspin0 = (GlobalV::NSPIN == 2) ? 2 : 1; + const int nspin0 = (nspin == 2) ? 2 : 1; for (int ik = 0; ik < kv.nks; ++ik) //the loop of nspin0 is included { const int ispin = kv.isk[ik]; @@ -241,9 +253,9 @@ void IState_Envelope::begin(const psi::Psi>* psi, this->pes->wg, kv.kvec_c); #else - for (int i = 0;i < GlobalV::NBANDS;++i) + for (int i = 0;i < nbands;++i) { - for (int j = 0;j < GlobalV::NLOCAL;++j) + for (int j = 0;j < nlocal;++j) lowf.wfc_k_grid[ik][i][j] = psi[0](i, j); } #endif @@ -251,7 +263,7 @@ void IState_Envelope::begin(const psi::Psi>* psi, gk.cal_env_k(ik, lowf.wfc_k_grid[ik][ib], pes->charge->rho[ispin], kv.kvec_c, kv.kvec_d); std::stringstream ss; - ss << GlobalV::global_out_dir << "BAND" << ib + 1 << "_k_" << ik / nspin0 + 1 << "_s_" << ispin + 1 << "_ENV.cube"; + ss << global_out_dir << "BAND" << ib + 1 << "_k_" << ik / nspin0 + 1 << "_s_" << ispin + 1 << "_ENV.cube"; const double ef_tmp = this->pes->eferm.get_efval(ispin); ModuleIO::write_rho( #ifdef __MPI @@ -262,7 +274,7 @@ void IState_Envelope::begin(const psi::Psi>* psi, #endif pes->charge->rho[ispin], ispin, - GlobalV::NSPIN, + nspin, 0, ss.str(), rhopw->nx, @@ -275,7 +287,7 @@ void IState_Envelope::begin(const psi::Psi>* psi, if (out_wf || out_wf_r) //only for gamma_only now { pw_wfc_g.fix_k(ik); - this->set_pw_wfc(wfcpw, ik, ib, GlobalV::NSPIN, + this->set_pw_wfc(wfcpw, ik, ib, nspin, pes->charge->rho, pw_wfc_g); } } @@ -287,9 +299,9 @@ void IState_Envelope::begin(const psi::Psi>* psi, if (out_wf) { std::stringstream ssw; - ssw << GlobalV::global_out_dir << "WAVEFUNC"; + ssw << global_out_dir << "WAVEFUNC"; std::cout << " write G-space wavefunction into \"" << - GlobalV::global_out_dir << "/" << ssw.str() << "\" files." << std::endl; + global_out_dir << "/" << ssw.str() << "\" files." << std::endl; ModuleIO::write_wfc_pw(ssw.str(), pw_wfc_g, kv, wfcpw); } if (out_wf_r) diff --git a/source/module_io/istate_envelope.h b/source/module_io/istate_envelope.h index 6328951b06..10e0dabcf7 100644 --- a/source/module_io/istate_envelope.h +++ b/source/module_io/istate_envelope.h @@ -24,7 +24,13 @@ class IState_Envelope Gint_Gamma& gg, int& out_wfc_pw, int& out_wfc_r, - const K_Vectors& kv); + const K_Vectors& kv, + const double nelec, + const int nbands_istate, + const int nbands, + const int nspin, + const int nlocal, + const std::string& global_out_dir); /// tmp, delete after Gint is refactored. @@ -36,7 +42,13 @@ class IState_Envelope Gint_k& gg, int& out_wfc_pw, int& out_wfc_r, - const K_Vectors& kv) { + const K_Vectors& kv, + const double nelec, + const int nbands_istate, + const int nbands, + const int nspin, + const int nlocal, + const std::string& global_out_dir) { throw std::logic_error("gint_k should use with complex psi."); }; /// for multi-k @@ -48,7 +60,13 @@ class IState_Envelope Gint_k& gk, int& out_wfc_pw, int& out_wfc_r, - const K_Vectors& kv); + const K_Vectors& kv, + const double nelec, + const int nbands_istate, + const int nbands, + const int nspin, + const int nlocal, + const std::string& global_out_dir); /// tmp, delete after Gint is refactored. void begin(const psi::Psi>* psi, @@ -59,7 +77,13 @@ class IState_Envelope Gint_Gamma& gk, int& out_wfc_pw, int& out_wfc_r, - const K_Vectors& kv) { + const K_Vectors& kv, + const double nelec, + const int nbands_istate, + const int nbands, + const int nspin, + const int nlocal, + const std::string& global_out_dir) { throw std::logic_error("gint_gamma should use with real psi."); }; diff --git a/source/module_io/json_output/CMakeLists.txt b/source/module_io/json_output/CMakeLists.txt index b54336fc4e..5368db4b1b 100644 --- a/source/module_io/json_output/CMakeLists.txt +++ b/source/module_io/json_output/CMakeLists.txt @@ -3,6 +3,7 @@ list(APPEND objects_json general_info.cpp init_info.cpp readin_info.cpp + output_info.cpp ) add_library( diff --git a/source/module_io/json_output/abacusjson.cpp b/source/module_io/json_output/abacusjson.cpp index edca00d975..ea6a59992e 100644 --- a/source/module_io/json_output/abacusjson.cpp +++ b/source/module_io/json_output/abacusjson.cpp @@ -4,15 +4,30 @@ #include #include #include - +#include namespace Json { #ifdef __RAPIDJSON rapidjson::Document AbacusJson::doc; -void AbacusJson::add_nested_member(std::vector::iterator begin, - std::vector::iterator end, +bool isNum(std::string str) +{ + std::stringstream sin; + sin<> d)) + return false; + + if (sin >> c) + return false; + return true; +} + + +void AbacusJson::add_nested_member(std::vector::iterator begin, + std::vector::iterator end, rapidjson::Value& val, rapidjson::Value& parent, rapidjson::Document::AllocatorType& allocator, @@ -21,11 +36,25 @@ void AbacusJson::add_nested_member(std::vector::iterator begin, { if (begin != end) { - rapidjson::Value key((*begin).c_str(), allocator); + jsonKeyNode keyNode = *begin; + rapidjson::Value key((*begin).key.c_str(), allocator); + + if (begin + 1 == end) { + + if( keyNode.key.empty() && parent.IsArray()){ + int index = keyNode.i; + if(index>=0){ + parent[index] = val; + } + else { + int arr_size = parent.Size(); + parent[arr_size+index] = val; + } + } // if key exists, then overwrite it - if (parent.HasMember(key)) + else if (parent.HasMember(key)) { if(parent[key].IsArray()){ parent[key].PushBack(val, allocator); @@ -33,7 +62,7 @@ void AbacusJson::add_nested_member(std::vector::iterator begin, // if key is an object, then warn the user if (parent[key].IsObject()) { - std::cout << "Warning: write to json, key " << *begin + std::cout << "Warning: write to json, key " << (*begin).key << " exist and is an object, and abacus will overwrite it with a value." << std::endl; } parent[key] = val; @@ -52,14 +81,25 @@ void AbacusJson::add_nested_member(std::vector::iterator begin, } else { + if( keyNode.key.empty()&&parent.IsArray()){ + int index = keyNode.i; + + if(index>=0){ + add_nested_member(begin + 1, end, val, parent[index], allocator,IsArray); + } + else { + int arr_size = parent.Size(); + add_nested_member(begin + 1, end, val, parent[arr_size+index], allocator,IsArray); + } + } // need to check if the key exists - if (parent.HasMember(key)) + else if (parent.HasMember(key)) { // this key should be an object - if (!parent[key].IsObject()) + if (!parent[key].IsObject()&&!parent[key].IsArray()) { - std::cout << "Warning: write to json, key " << *begin - << " exist and is not an object, and abacus will add it as a middle node." << std::endl; + std::cout << "Warning: write to json, key " << (*begin).key + << " exist and is not an object or array, and abacus will add it as a middle node." << std::endl; } add_nested_member(begin + 1, end, val, parent[key], allocator,IsArray); } @@ -84,7 +124,7 @@ void AbacusJson::write_to_json(std::string filename) ofs.close(); }; template <> - void AbacusJson::add_json(std::vector keys, const std::string& value,bool IsArray) + void AbacusJson::add_json(std::vector keys, const std::string& value,bool IsArray) { if (!doc.IsObject()) { @@ -97,7 +137,7 @@ void AbacusJson::write_to_json(std::string filename) // Overloaded template functions for json class objects template <> - void AbacusJson::add_json(std::vector keys, const rapidjson::Value& value,bool IsArray) + void AbacusJson::add_json(std::vector keys, const rapidjson::Value& value,bool IsArray) { if (!doc.IsObject()) diff --git a/source/module_io/json_output/abacusjson.h b/source/module_io/json_output/abacusjson.h index ab1c350fdb..7bc003bbc9 100644 --- a/source/module_io/json_output/abacusjson.h +++ b/source/module_io/json_output/abacusjson.h @@ -5,6 +5,8 @@ #include #include #include +#include "json_node.h" + #ifdef __RAPIDJSON #include "rapidjson/document.h" @@ -54,9 +56,45 @@ using jsonValue = rapidjson::Value; class AbacusJson { public: - // The template specialization method adds a key-val object to the doc tree + + + + // Output the json to a file + static void write_to_json(std::string filename); + + static rapidjson::Document::AllocatorType& allocator(){ + return doc.GetAllocator(); + } + + /** + * @brief: The template specialization method adds value to the doc tree + * + * @param: 'keys' is a vector string, represents the path to be added to the json tree. + * + * 'value' is the value that needs to be added to the json tree, which type can be + * Json::jsonValue or other common value type(such as int, double ,bool ,std::string). + * + * 'IsArray' is a bool value, means the whether the root node to which 'value' is added is an array. + * + * @usage: 1. Add/Modify a double val to object json node (key2 is a object node): + * Json::AbacusJson::add_json({"key1","key2"}, 3.1415,false); + * + * 2. Pushback a double val to array json node (key2 is a array node): + * Json::AbacusJson::add_json({"key1","key2"}, 3.1415,true); + * + * 3. Modify a doble val to array json node (key2 is a array node), when use this method, + * The index number of the array starts at 0, if it's negative, it's going from back to front. + * eg. If the index is -1, it means that the last element of the array is modified: + * If we have a json array: {"key":[1,2,3]} + * i). Json::AbacusJson::add_json({"key",0}, 4,true); => {"key":[4,2,3]} + * ii). Json::AbacusJson::add_json({"key",-1}, 4,true); => {"key":[1,2,4]} + * iii). Json::AbacusJson::add_json({"key",1}, 4,true); => {"key":[1,4,3]} + * iv). Json::AbacusJson::add_json({"key",2}, 4,true); => {"key":[1,2,4]} + * iv). Json::AbacusJson::add_json({"key",3}, 4,true); => error!, The array element corresponding + * to the index has no value. + */ template - static void add_json(std::vector keys, const T& value,bool IsArray) + static void add_json(std::vector keys, const T& value,bool IsArray) { if (!doc.IsObject()) { @@ -67,31 +105,25 @@ class AbacusJson } - // Output the json to a file - static void write_to_json(std::string filename); - - static rapidjson::Document::AllocatorType& allocator(){ - return doc.GetAllocator(); - } - private: static rapidjson::Document doc; - static void add_nested_member(std::vector::iterator begin, - std::vector::iterator end, - rapidjson::Value& val, - rapidjson::Value& parent, - rapidjson::Document::AllocatorType& allocator, - bool IsArray = false - ); -}; + static void add_nested_member(std::vector::iterator begin, + std::vector::iterator end, + rapidjson::Value& val, + rapidjson::Value& parent, + rapidjson::Document::AllocatorType& allocator, + bool IsArray + ); + }; + template <> -void AbacusJson::add_json(std::vector keys, const std::string& value,bool IsArray); +void AbacusJson::add_json(std::vector keys, const std::string& value,bool IsArray); template <> -void AbacusJson::add_json(std::vector keys, const rapidjson::Value& value,bool IsArray); +void AbacusJson::add_json(std::vector keys, const rapidjson::Value& value,bool IsArray); } // namespace Json diff --git a/source/module_io/json_output/general_info.cpp b/source/module_io/json_output/general_info.cpp index 479ff5fd16..ae400a10f0 100644 --- a/source/module_io/json_output/general_info.cpp +++ b/source/module_io/json_output/general_info.cpp @@ -55,6 +55,18 @@ void gen_general_info(Input *input) AbacusJson::add_json({"general_info", "kpt_file"}, input->kpoint_file,false); AbacusJson::add_json({"general_info", "start_time"}, start_time_str,false); AbacusJson::add_json({"general_info", "end_time"}, end_time_str,false); + + // AbacusJson::add_Json(version,false,"general_info", "version"); + // AbacusJson::add_Json(commit,false,"general_info", "commit"); + // AbacusJson::add_Json(input->device,false,"general_info", "device"); + // AbacusJson::add_Json(mpi_num,false,"general_info", "mpi_num"); + // AbacusJson::add_Json(omp_num,false,"general_info", "omp_num"); + // AbacusJson::add_Json(input->pseudo_dir,false,"general_info", "pseudo_dir"); + // AbacusJson::add_Json(input->orbital_dir,false,"general_info", "orbital_dir"); + // AbacusJson::add_Json(input->stru_file,false,"general_info", "stru_file"); + // AbacusJson::add_Json(input->kpoint_file,false,"general_info", "kpt_file"); + // AbacusJson::add_Json(start_time_str,false,"general_info", "start_time"); + // AbacusJson::add_Json(end_time_str,false,"general_info", "end_time"); } #endif } // namespace Json \ No newline at end of file diff --git a/source/module_io/json_output/general_info.h b/source/module_io/json_output/general_info.h index 7bee072098..3dcecf2c67 100644 --- a/source/module_io/json_output/general_info.h +++ b/source/module_io/json_output/general_info.h @@ -1,3 +1,5 @@ +#ifndef GENERAL_INFO_H +#define GENERAL_INFO_H #include "module_io/input.h" /** @@ -8,4 +10,5 @@ namespace Json #ifdef __RAPIDJSON void gen_general_info(Input *input); #endif -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/source/module_io/json_output/init_info.cpp b/source/module_io/json_output/init_info.cpp index 3a8e469cbe..4b5e68d653 100644 --- a/source/module_io/json_output/init_info.cpp +++ b/source/module_io/json_output/init_info.cpp @@ -18,35 +18,48 @@ void gen_init(UnitCell *ucell){ AbacusJson::add_json({"init", "point_group"}, pgname,false); AbacusJson::add_json({"init", "point_group_in_space"}, spgname,false); + // Json::AbacusJson::add_Json(pgname,false,"init", "point_group"); + // Json::AbacusJson::add_Json(spgname,false,"init","point_group_in_space"); - int numAtoms = ucell->atoms->na; + int numAtoms = ucell->nat; AbacusJson::add_json({"init", "natom"}, numAtoms,false); AbacusJson::add_json({"init", "nband"}, GlobalV::NBANDS,false); + // Json::AbacusJson::add_Json(numAtoms,false,"init", "natom"); + // Json::AbacusJson::add_Json(GlobalV::NBANDS,false,"init", "nband"); + int ntype = ucell->ntype,nelec_total=0; - AbacusJson::add_json({"init", "nelectron"}, 0,false); for (int it = 0; it < ntype; it++) { std::string label = ucell->atoms[it].label; + int atom_number = ucell->atoms[it].na; int number = ucell->atoms[it].ncpp.zv; nelec_total+=ucell->atoms[it].ncpp.zv * ucell->atoms[it].na; + AbacusJson::add_json({"init", "natom_each_type",label}, atom_number,false); AbacusJson::add_json({"init", "nelectron_each_type",label}, number,false); + + + //Json::AbacusJson::add_Json(number,false,"init", "nelectron_each_type",label); } AbacusJson::add_json({"init", "nelectron"}, nelec_total,false); - + // Json::AbacusJson::add_Json(nelec_total,false,"init", "nelectron"); } void add_nkstot(int nkstot,int nkstot_ibz){ Json::AbacusJson::add_json({"init", "nkstot"}, nkstot,false); Json::AbacusJson::add_json({"init", "nkstot_ibz"}, nkstot_ibz,false); + + // Json::AbacusJson::add_Json(nkstot,false,"init", "nkstot"); + // Json::AbacusJson::add_Json(nkstot_ibz,false,"init", "nkstot_ibz"); } void gen_stru(UnitCell *ucell){ + AbacusJson::add_json({"comment"},"Unless otherwise specified, the unit of energy is eV and the unit of length is Angstrom",false); int ntype = ucell->ntype; @@ -65,22 +78,25 @@ void gen_stru(UnitCell *ucell){ std::string atom_element = ucell->atoms[i].ncpp.psd; - Json::jsonValue element_obj(JobjectType); - element_obj.JaddStringKV(atom_label,atom_element); - Json::AbacusJson::add_json({"init","element"}, element_obj,false); - + Json::AbacusJson::add_json({"init","element",atom_label}, atom_element,false); + std::string orbital_str = GlobalV::global_orbital_dir + orbital_fn[i]; if(!orbital_str.compare("")){ Json::jsonValue nullValue; nullValue.SetNull(); Json::AbacusJson::add_json({"init","orb",atom_label}, nullValue,false); + + // Json::AbacusJson::add_Json(nullValue,false,"init","orb",atom_label); + }else { Json::AbacusJson::add_json({"init","orb",atom_label}, orbital_str,false); + // Json::AbacusJson::add_Json(orbital_str,false,"init","orb",atom_label); } std::string pseudo_str = pseudo_fn[i]; Json::AbacusJson::add_json({"init","pp",atom_label}, pseudo_str,false); - + + // Json::AbacusJson::add_Json(pseudo_str,false,"init","pp",atom_label); } @@ -97,11 +113,15 @@ void gen_stru(UnitCell *ucell){ coordinateArray.JPushBack(tau[j][1]*lat0); coordinateArray.JPushBack(tau[j][2]*lat0); Json::AbacusJson::add_json({"init","coordinate"}, coordinateArray,true); - + // Json::AbacusJson::add_Json(coordinateArray,true,"init","coordinate"); + Json::AbacusJson::add_json({"init","mag"}, ucell->atoms[i].mag[j],true); - std::string str = label[i]; - Json::AbacusJson::add_json({"init","label"}, str,true); + // Json::AbacusJson::add_Json(ucell->atoms[i].mag[j],true,"init","mag"); + + std::string str = label[i]; + Json::AbacusJson::add_json({"init","label"}, str,true); + // Json::AbacusJson::add_Json(str,true,"init","label"); } } @@ -124,6 +144,10 @@ void gen_stru(UnitCell *ucell){ Json::AbacusJson::add_json({"init","cell"}, cellArray1,true); Json::AbacusJson::add_json({"init","cell"}, cellArray2,true); Json::AbacusJson::add_json({"init","cell"}, cellArray3,true); + + // Json::AbacusJson::add_Json(cellArray1,true,"init","cell"); + // Json::AbacusJson::add_Json(cellArray2,true,"init","cell"); + // Json::AbacusJson::add_Json(cellArray3,true,"init","cell"); } return; } diff --git a/source/module_io/json_output/init_info.h b/source/module_io/json_output/init_info.h index 324d8e498c..5bf4aa328d 100644 --- a/source/module_io/json_output/init_info.h +++ b/source/module_io/json_output/init_info.h @@ -1,3 +1,5 @@ +#ifndef INIT_INFO_H +#define INIT_INFO_H #include "module_cell/module_symmetry/symmetry.h" #include "module_cell/atom_spec.h" #include "module_cell/unitcell.h" @@ -26,4 +28,5 @@ void add_nkstot(int nkstot,int nkstot_ibz); */ void gen_stru(UnitCell *ucell); #endif -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/source/module_io/json_output/json_node.h b/source/module_io/json_output/json_node.h new file mode 100644 index 0000000000..3ac988e95f --- /dev/null +++ b/source/module_io/json_output/json_node.h @@ -0,0 +1,21 @@ +#ifndef JSON_NODE_H +#define JSON_NODE_H + +namespace Json +{ + + class jsonKeyNode{ + public: + jsonKeyNode(int i): i(i) {}; + jsonKeyNode(const std::string& s): key(s) {}; + + template + jsonKeyNode(const char (&s)[N]): key(s) {}; + + int i; + std::string key; + }; + +} + +#endif \ No newline at end of file diff --git a/source/module_io/json_output/output_info.cpp b/source/module_io/json_output/output_info.cpp new file mode 100644 index 0000000000..02a73058f4 --- /dev/null +++ b/source/module_io/json_output/output_info.cpp @@ -0,0 +1,166 @@ +#include "output_info.h" +#include "module_io/input.h" +#include "../para_json.h" +#include "abacusjson.h" + + +//Add json objects to init +namespace Json +{ + +#ifdef __RAPIDJSON + + + // Adjust the position of the json object and set the initial value + void init_output_array_obj(){ + + + + jsonValue scf_obj(JobjectType); + + Json::jsonValue nullValue; + nullValue.SetNull(); + scf_obj.JaddNormal("e_fermi",nullValue); + scf_obj.JaddNormal("energy",nullValue); + scf_obj.JaddNormal("scf_converge",nullValue); + + jsonValue force(JobjectType); + jsonValue stress(JobjectType); + jsonValue coordinate(JarrayType); + jsonValue mag(JarrayType); + jsonValue cell(JarrayType); + + scf_obj.JaddNormal("force",nullValue); + scf_obj.JaddNormal("stress",nullValue); + scf_obj.JaddNormal("coordinate",coordinate); + scf_obj.JaddNormal("mag",mag); + scf_obj.JaddNormal("cell",cell); + + + AbacusJson::add_json({"output"},scf_obj,true); + } + + void add_output_cell_coo_stress_force( + UnitCell *ucell, + ModuleBase::matrix force, double fac, + ModuleBase::matrix stress, double unit_transform + ) { + int iat = 0; + const double output_acc = 1.0e-8; + + if (GlobalV::CAL_FORCE){ + //add force + Json::jsonValue force_array(JarrayType); + for (int it = 0; it < ucell->ntype; it++) + { + for (int ia = 0; ia < ucell->atoms[it].na; ia++) + { + Json::jsonValue force_subarray(JarrayType); + double fx = std::abs(force(iat, 0)) > output_acc ? force(iat, 0) * fac : 0.0; + double fy = std::abs(force(iat, 1)) > output_acc ? force(iat, 1) * fac : 0.0; + double fz = std::abs(force(iat, 2)) > output_acc ? force(iat, 2) * fac : 0.0; + + force_subarray.JPushBack(fx); + force_subarray.JPushBack(fy); + force_subarray.JPushBack(fz); + force_array.JPushBack(force_subarray); + iat++; + } + } + Json::AbacusJson::add_json({"output",-1,"force"}, force_array,false); + + // AbacusJson::add_Json(force_array,false,"output",-1,"force"); + } + + if (GlobalV::CAL_STRESS){ + //add stress + Json::jsonValue stress_array(JarrayType); + for (int i = 0; i < 3; i++) + { + Json::jsonValue stress_subarray(JarrayType); + double sx = stress(i, 0) * unit_transform; + double sy = stress(i, 1) * unit_transform; + double sz = stress(i, 2) * unit_transform; + stress_subarray.JPushBack(sx); + stress_subarray.JPushBack(sy); + stress_subarray.JPushBack(sz); + stress_array.JPushBack(stress_subarray); + } + Json::AbacusJson::add_json({"output",-1,"stress"}, stress_array,false); + + // AbacusJson::add_Json(stress_array,false,"output",-1,"stress"); + } + //add coordinate + int ntype = ucell->ntype; + double lat0 = ucell->lat0; + for(int i=0;i* tau = ucell->atoms[i].tau; + int na = ucell->atoms[i].na; + for(int j=0;jatoms[i].mag[j],true); + } + } + + //add cell + { + Json::jsonValue cellArray1(JarrayType); + Json::jsonValue cellArray2(JarrayType); + Json::jsonValue cellArray3(JarrayType); + cellArray1.JPushBack(ucell->latvec.e11); + cellArray1.JPushBack(ucell->latvec.e12); + cellArray1.JPushBack(ucell->latvec.e13); + cellArray2.JPushBack(ucell->latvec.e21); + cellArray2.JPushBack(ucell->latvec.e22); + cellArray2.JPushBack(ucell->latvec.e23); + cellArray3.JPushBack(ucell->latvec.e31); + cellArray3.JPushBack(ucell->latvec.e32); + cellArray3.JPushBack(ucell->latvec.e33); + Json::AbacusJson::add_json({"output",-1,"cell"}, cellArray1,true); + Json::AbacusJson::add_json({"output",-1,"cell"}, cellArray2,true); + Json::AbacusJson::add_json({"output",-1,"cell"}, cellArray3,true); + + // Json::AbacusJson::add_Json(cellArray1,true,"output",-1,"cell"); + // Json::AbacusJson::add_Json(cellArray2,true,"output",-1,"cell"); + // Json::AbacusJson::add_Json(cellArray2,true,"output",-1,"cell"); + } + + } + + void add_output_efermi_energy_converge(double efermi, double energy ,bool scf_converge ){ + Json::AbacusJson::add_json({"output",-1,"e_fermi"}, efermi,false); + Json::AbacusJson::add_json({"output",-1,"energy"}, energy,false); + Json::AbacusJson::add_json({"output",-1,"scf_converge"}, scf_converge,false); + + // Json::AbacusJson::add_Json(efermi,false,"output",-1,"e_fermi"); + // Json::AbacusJson::add_Json(energy,false,"output",-1,"energy"); + // Json::AbacusJson::add_Json(scf_converge,false,"output",-1,"scf_converge"); + + } + + void add_output_scf_mag( + double total_mag, double absolute_mag, + double energy, double ediff, double drho,double time + ){ + Json::AbacusJson::add_json({"output",-1,"total_mag"}, total_mag,false); + Json::AbacusJson::add_json({"output",-1,"absolute_mag"}, absolute_mag,false); + + // Json::AbacusJson::add_Json(total_mag,false,"output",-1,"total_mag"); + // Json::AbacusJson::add_Json(absolute_mag,false,"output",-1,"absolute_mag"); + + Json::jsonValue scf_obj(JobjectType); + scf_obj.JaddNormal("energy",energy); + scf_obj.JaddNormal("ediff",ediff); + scf_obj.JaddNormal("drho",drho); + scf_obj.JaddNormal("time",time); + Json::AbacusJson::add_json({"output",-1,"scf"}, scf_obj,true); + + // Json::AbacusJson::add_Json(scf_obj,true,"output",-1,"scf"); + } + +#endif +} // namespace Json \ No newline at end of file diff --git a/source/module_io/json_output/output_info.h b/source/module_io/json_output/output_info.h new file mode 100644 index 0000000000..7254092ac9 --- /dev/null +++ b/source/module_io/json_output/output_info.h @@ -0,0 +1,35 @@ +#ifndef OUTPUT_INFO_H +#define OUTPUT_INFO_H + +#include "module_cell/module_symmetry/symmetry.h" +#include "module_cell/atom_spec.h" +#include "module_cell/unitcell.h" +#include "module_base/matrix.h" + + +/** +* @brief In this part of the code to complete the output part of the json tree. +* @param ucell: ucell for reading json parameters +*/ +namespace Json +{ +#ifdef __RAPIDJSON + + void init_output_array_obj(); + + void add_output_cell_coo_stress_force( + UnitCell *ucell, + ModuleBase::matrix force, double fac, + ModuleBase::matrix stress, double unit_transform + ); + + void add_output_efermi_energy_converge(double efermi, double energy ,bool scf_converge ); + + void add_output_scf_mag( + double total_mag, double absolute_mag, + double energy, double ediff, double drho,double time + ); + +#endif +} +#endif \ No newline at end of file diff --git a/source/module_io/json_output/readin_info.h b/source/module_io/json_output/readin_info.h index 8c8dfb3321..a6a98100e9 100644 --- a/source/module_io/json_output/readin_info.h +++ b/source/module_io/json_output/readin_info.h @@ -1,3 +1,5 @@ +#ifndef READIN_INFO_H +#define READIN_INFO_H #include "module_cell/module_symmetry/symmetry.h" #include "module_cell/atom_spec.h" #include "module_cell/unitcell.h" @@ -15,4 +17,5 @@ namespace Json #endif -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/source/module_io/json_output/test/para_json_test.cpp b/source/module_io/json_output/test/para_json_test.cpp index 2e40d14654..bf0f94123d 100644 --- a/source/module_io/json_output/test/para_json_test.cpp +++ b/source/module_io/json_output/test/para_json_test.cpp @@ -64,10 +64,7 @@ TEST(AbacusJsonTest, AddJson) // modify a value Json::AbacusJson::add_json({"key4"}, 4.56,false); ASSERT_EQ(Json::AbacusJson::doc["key4"].GetDouble(), 4.56); - - // modify a value - Json::AbacusJson::add_json({"key4"}, 4.56,false); - + //array test Json::AbacusJson::add_json({"key6","key7"}, true,true); @@ -88,6 +85,10 @@ TEST(AbacusJsonTest, AddJson) object.JaddNormal("double", 0.01*i); Json::AbacusJson::add_json({"array"}, object,true); } + Json::AbacusJson::add_json({"array",1,"new_add_notLast"}, "correct1",false); + Json::AbacusJson::add_json({"array",-1,"new_add_Last"}, "correct2",false); + + // Validate json parameters in doc objects @@ -95,6 +96,9 @@ TEST(AbacusJsonTest, AddJson) ASSERT_STREQ(Json::AbacusJson::doc["array"][0]["string"].GetString(), "0"); ASSERT_STREQ(Json::AbacusJson::doc["array"][0]["0"].GetString(), "string"); ASSERT_STREQ(Json::AbacusJson::doc["array"][0]["Kstring"].GetString(), "0"); + ASSERT_STREQ(Json::AbacusJson::doc["array"][1]["new_add_notLast"].GetString(), "correct1"); + + ASSERT_EQ(Json::AbacusJson::doc["array"][0]["double"].GetDouble(), 0.0); @@ -112,9 +116,9 @@ TEST(AbacusJsonTest, AddJson) ASSERT_STREQ(Json::AbacusJson::doc["array"][2]["200"].GetString(), "string"); ASSERT_STREQ(Json::AbacusJson::doc["array"][2]["Kstring"].GetString(), "200"); ASSERT_EQ(Json::AbacusJson::doc["array"][2]["double"].GetDouble(), 0.02); - - - + + + ASSERT_STREQ(Json::AbacusJson::doc["array"][2]["new_add_Last"].GetString(), "correct2"); @@ -153,13 +157,18 @@ TEST(AbacusJsonTest, AddJson) Json::AbacusJson::add_json({"Darray"}, object2,true); Json::AbacusJson::add_json({"Darray"}, object3,true); + Json::AbacusJson::add_json({"Darray",1,0}, "new_add_method",false); + Json::AbacusJson::add_json({"Darray",1,-2}, 40,false); + + ASSERT_EQ(Json::AbacusJson::doc["Darray"][1][0].GetString(), "new_add_method"); + ASSERT_EQ(Json::AbacusJson::doc["Darray"][0][0].GetInt(), 1); ASSERT_EQ(Json::AbacusJson::doc["Darray"][0][1].GetInt(), 2); ASSERT_EQ(Json::AbacusJson::doc["Darray"][0][2].GetInt(), 3); - ASSERT_EQ(Json::AbacusJson::doc["Darray"][1][0].GetDouble(), 2.1); - ASSERT_EQ(Json::AbacusJson::doc["Darray"][1][1].GetDouble(), 3.1); + + ASSERT_EQ(Json::AbacusJson::doc["Darray"][1][1].GetDouble(), 40); ASSERT_EQ(Json::AbacusJson::doc["Darray"][1][2].GetDouble(), 4.1); ASSERT_STREQ(Json::AbacusJson::doc["Darray"][2][0].GetString(), "str1"); @@ -171,6 +180,8 @@ TEST(AbacusJsonTest, AddJson) ASSERT_STREQ(Json::AbacusJson::doc["Darray"][3][1].GetString(), "string2"); ASSERT_STREQ(Json::AbacusJson::doc["Darray"][3][2].GetString(), "string3"); + + } TEST(AbacusJsonTest, OutputJson) @@ -183,12 +194,22 @@ TEST(AbacusJsonTest, OutputJson) Json::AbacusJson::add_json({"key4"}, 0.1,false); Json::AbacusJson::add_json({"key5"}, true,false); + + + Json::jsonValue object(JobjectType); + object.JaddNormal("int",1); + Json::jsonValue object2(JarrayType); + + object.JaddNormal("arr",object2); + + //array test - Json::AbacusJson::add_json({"key6","key7"}, true,true); - Json::AbacusJson::add_json({"key6","key7"}, false,true); + Json::AbacusJson::add_json({"key6","key7"}, object,true); + Json::AbacusJson::add_json({"key6","key7",0,"arr"}, 13,true); + Json::AbacusJson::add_json({"key6","key7",0,"arr"}, 14,true); + Json::AbacusJson::add_json({"key6","key7",0,"arr",0}, 1,true); - std::string filename = "test.json"; Json::AbacusJson::write_to_json(filename); @@ -268,16 +289,24 @@ TEST(AbacusJsonTest, InitInfo) ucell.symm.pgname = "T_d"; ucell.symm.spgname = "O_h"; ucell.atoms =atomlist; - ucell.atoms->na = 100; ucell.ntype = 3; GlobalV::NBANDS = 10; - for(int i=0;i<1;i++){ - ucell.atoms[i].label = "Si"; - ucell.atoms[i].ncpp.zv = 3; - } - + + ucell.atoms[0].label = "Si"; + ucell.atoms[0].ncpp.zv = 3; + ucell.atoms[0].na = 1; + ucell.atoms[1].label = "C"; + ucell.atoms[1].ncpp.zv = 4; + ucell.atoms[1].na = 2; + ucell.atoms[2].label = "O"; + ucell.atoms[2].ncpp.zv = 5; + ucell.atoms[2].na = 3; + ucell.nat = 0; + for(int i=0;i,double>* DM) - : _nspin(nspin), _istep(istep), _LOC(LOC), _RA(RA), _kv(kv), _DM(DM) +Output_DM1::Output_DM1( + int nspin, + int istep, + Local_Orbital_Charge& LOC, + Record_adj &RA, + K_Vectors& kv, + const elecstate::DensityMatrix,double>* DM) + : _nspin(nspin), _istep(istep), loc(LOC), _RA(RA), _kv(kv), _DM(DM) { } -void Output_DM1::write() +void Output_DM1::write(void) { double** dm2d; dm2d = new double*[_nspin]; for (int is = 0; is < _nspin; is++) { - dm2d[is] = new double[_LOC.ParaV->nnr]; - ModuleBase::GlobalFunc::ZEROS(dm2d[is], _LOC.ParaV->nnr); + dm2d[is] = new double[loc.ParaV->nnr]; + ModuleBase::GlobalFunc::ZEROS(dm2d[is], loc.ParaV->nnr); } + // get DMK from DM - _LOC.dm_k.resize(_kv.nks); + loc.dm_k.resize(_kv.nks); for (int ik = 0; ik < _kv.nks; ++ik) { - _LOC.set_dm_k(ik,_DM->get_DMK_pointer(ik)); + loc.set_dm_k(ik,_DM->get_DMK_pointer(ik)); } + // cal DMR in LOC - _LOC.cal_dm_R(_LOC.dm_k, _RA, dm2d, _kv); + loc.cal_dm_R(loc.dm_k, _RA, dm2d, _kv); for (int is = 0; is < _nspin; is++) { - write_dm1(is, _istep, dm2d, _LOC.ParaV, _LOC.DMR_sparse); + write_dm1(is, _istep, dm2d, loc.ParaV, loc.DMR_sparse); } for (int is = 0; is < _nspin; is++) @@ -40,4 +47,4 @@ void Output_DM1::write() delete[] dm2d; } -} // namespace ModuleIO \ No newline at end of file +} // namespace ModuleIO diff --git a/source/module_io/output_dm1.h b/source/module_io/output_dm1.h index fd0e39723f..1e835077d8 100644 --- a/source/module_io/output_dm1.h +++ b/source/module_io/output_dm1.h @@ -14,18 +14,27 @@ namespace ModuleIO class Output_DM1 : public Output_Interface { public: - Output_DM1(int nspin, int istep, Local_Orbital_Charge& LOC, Record_adj& RA, K_Vectors& kv, const elecstate::DensityMatrix,double>* DM); - void write() override; + Output_DM1( + int nspin, + int istep, + Local_Orbital_Charge& LOC, + Record_adj& RA, + K_Vectors& kv, + const elecstate::DensityMatrix,double>* DM); + + void write() override; private: - int _nspin; - int _istep; - Local_Orbital_Charge& _LOC; - Record_adj& _RA; - K_Vectors& _kv; - const elecstate::DensityMatrix,double>* _DM; + + int _nspin; + int _istep; + Local_Orbital_Charge& loc; + Record_adj& _RA; + K_Vectors& _kv; + const elecstate::DensityMatrix,double>* _DM; + }; } // namespace ModuleIO -#endif \ No newline at end of file +#endif diff --git a/source/module_io/output_mat_sparse.cpp b/source/module_io/output_mat_sparse.cpp index 693528a43e..0c82f71a35 100644 --- a/source/module_io/output_mat_sparse.cpp +++ b/source/module_io/output_mat_sparse.cpp @@ -7,7 +7,8 @@ namespace ModuleIO { template - Output_Mat_Sparse::Output_Mat_Sparse(int out_mat_hsR, + Output_Mat_Sparse::Output_Mat_Sparse( + int out_mat_hsR, int out_mat_dh, int out_mat_t, int out_mat_r, @@ -15,6 +16,7 @@ namespace ModuleIO const ModuleBase::matrix& v_eff, const Parallel_Orbitals& pv, LCAO_Hamilt& UHM, + Gint_k& gint_k, // mohan add 2024-04-01 LCAO_Matrix& LM, const K_Vectors& kv, hamilt::Hamilt* p_ham) @@ -26,15 +28,21 @@ namespace ModuleIO _v_eff(v_eff), _pv(pv), _UHM(UHM), + _gint_k(gint_k), // mohan add 2024-04-01 _LM(LM), _kv(kv), _p_ham(p_ham) { - } - template<> - void Output_Mat_Sparse::write() {} - template<> - void Output_Mat_Sparse>::write() +} + +template<> +void Output_Mat_Sparse::write(void) +{ +} + + +template<> +void Output_Mat_Sparse>::write(void) { if (_out_mat_hsR) { @@ -48,8 +56,14 @@ namespace ModuleIO if (_out_mat_dh) { - output_dH_R(_istep, this->_v_eff, this->_UHM, _kv); // LiuXh add 2019-07-15 - } + output_dH_R( + _istep, + this->_v_eff, + this->_UHM, + this->_gint_k, // mohan add 2024-04-01 + this->_LM, + _kv); // LiuXh add 2019-07-15 + } // add by jingan for out r_R matrix 2019.8.14 if (_out_mat_r) @@ -67,6 +81,7 @@ namespace ModuleIO } } - template class Output_Mat_Sparse; - template class Output_Mat_Sparse>; -} // namespace ModuleIO \ No newline at end of file +template class Output_Mat_Sparse; +template class Output_Mat_Sparse>; + +} // namespace ModuleIO diff --git a/source/module_io/output_mat_sparse.h b/source/module_io/output_mat_sparse.h index 4d5bcde5c2..8012b108bc 100644 --- a/source/module_io/output_mat_sparse.h +++ b/source/module_io/output_mat_sparse.h @@ -4,6 +4,7 @@ #include "module_basis/module_ao/parallel_orbitals.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.h" #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.h" +#include "module_hamilt_lcao/module_gint/gint_k.h" #include "module_hsolver/hsolver_lcao.h" #include "output_interface.h" @@ -22,9 +23,11 @@ namespace ModuleIO const ModuleBase::matrix& v_eff, const Parallel_Orbitals& pv, LCAO_Hamilt& UHM, + Gint_k &gint_k, // mohan add 2024-04-01 LCAO_Matrix& LM, const K_Vectors& kv, hamilt::Hamilt* p_ham); + void write() override; private: @@ -36,10 +39,11 @@ namespace ModuleIO const ModuleBase::matrix& _v_eff; const Parallel_Orbitals& _pv; LCAO_Hamilt& _UHM; + Gint_k& _gint_k; // mohan add 2024-04-01 LCAO_Matrix& _LM; const K_Vectors& _kv; hamilt::Hamilt* _p_ham; }; } // namespace ModuleIO -#endif // OUTPUT_MAT_SPARSE_H \ No newline at end of file +#endif // OUTPUT_MAT_SPARSE_H diff --git a/source/module_io/parameter_pool.cpp b/source/module_io/parameter_pool.cpp index 3590c38eee..23f77d4448 100644 --- a/source/module_io/parameter_pool.cpp +++ b/source/module_io/parameter_pool.cpp @@ -1421,11 +1421,11 @@ void input_parameters_set(std::map input_parameters } else if (input_parameters.count("dft_plus_u") != 0) { - INPUT.dft_plus_u = *static_cast(input_parameters["dft_plus_u"].get()); + INPUT.dft_plus_u = *static_cast(input_parameters["dft_plus_u"].get()); } else if (input_parameters.count("orbital_corr") != 0) { - INPUT.dft_plus_u = 0; + bool close_plus_u = true; bool dmft_flag = false; SimpleVector vec_D = *static_cast*>(input_parameters["orbital_corr"].get()); for (int i = 0; i < INPUT.ntype; i++) @@ -1440,9 +1440,14 @@ void input_parameters_set(std::map input_parameters if (INPUT.orbital_corr[i] != -1) { dmft_flag = true; - INPUT.dft_plus_u = 1; + close_plus_u = false; } } + if(close_plus_u) + { + std::cout << "No atoms are correlated!!!" << std::endl; + INPUT.dft_plus_u = 0; + } if (!dmft_flag) { std::cout << "No atoms are correlated!!!" << std::endl; @@ -1468,6 +1473,10 @@ void input_parameters_set(std::map input_parameters } } } + else if (input_parameters.count("onsite_radius") != 0) + { + INPUT.onsite_radius = *static_cast(input_parameters["onsite_radius"].get()); + } else if (input_parameters.count("omc") != 0) { INPUT.omc = *static_cast(input_parameters["omc"].get()); diff --git a/source/module_io/read_cube.cpp b/source/module_io/read_cube.cpp index 25b1fd64d4..286a5e7f2d 100644 --- a/source/module_io/read_cube.cpp +++ b/source/module_io/read_cube.cpp @@ -1,11 +1,15 @@ #include "module_io/cube_io.h" -#include "module_base/global_variable.h" +// #include "module_base/global_variable.h" // GlobalV reference removed bool ModuleIO::read_cube( #ifdef __MPI Parallel_Grid* Pgrid, #endif + int my_rank, + std::string esolver_type, + int rank_in_stogroup, const int& is, + std::ofstream& ofs_running, const int& nspin, const std::string& fn, double* data, @@ -23,12 +27,12 @@ bool ModuleIO::read_cube( { std::string tmp_warning_info = "!!! Couldn't find the charge file of "; tmp_warning_info += fn; - GlobalV::ofs_running << tmp_warning_info << std::endl; + ofs_running << tmp_warning_info << std::endl; return false; } else { - GlobalV::ofs_running << " Find the file, try to read charge from file." << std::endl; + ofs_running << " Find the file, try to read charge from file." << std::endl; } bool quit=false; @@ -52,7 +56,7 @@ bool ModuleIO::read_cube( ifs.ignore(150, ')'); ifs >> ef; - GlobalV::ofs_running << " read in fermi energy = " << ef << std::endl; + ofs_running << " read in fermi energy = " << ef << std::endl; ifs.ignore(150, '\n'); @@ -114,7 +118,7 @@ bool ModuleIO::read_cube( const int nxy = nx * ny; double* zpiece = nullptr; double** read_rho = nullptr; - if (GlobalV::MY_RANK == 0 || (GlobalV::ESOLVER_TYPE == "sdft" && GlobalV::RANK_IN_STOGROUP == 0)) + if (my_rank == 0 || (esolver_type == "sdft" && rank_in_stogroup == 0)) { read_rho = new double*[nz]; for (int iz = 0; iz < nz; iz++) @@ -147,14 +151,14 @@ bool ModuleIO::read_cube( for (int iz = 0; iz < nz; iz++) { - if (GlobalV::MY_RANK == 0 || (GlobalV::ESOLVER_TYPE == "sdft" && GlobalV::RANK_IN_STOGROUP == 0)) + if (my_rank == 0 || (esolver_type == "sdft" && rank_in_stogroup == 0)) { zpiece = read_rho[iz]; } Pgrid->zpiece_to_all(zpiece, iz, data); } // iz - if (GlobalV::MY_RANK == 0 || (GlobalV::ESOLVER_TYPE == "sdft" && GlobalV::RANK_IN_STOGROUP == 0)) + if (my_rank == 0 || (esolver_type == "sdft" && rank_in_stogroup == 0)) { for (int iz = 0; iz < nz; iz++) { @@ -167,7 +171,7 @@ bool ModuleIO::read_cube( delete[] zpiece; } #else - GlobalV::ofs_running << " Read SPIN = " << is + 1 << " charge now." << std::endl; + ofs_running << " Read SPIN = " << is + 1 << " charge now." << std::endl; if (same) { for (int i = 0; i < nx; i++) @@ -187,7 +191,7 @@ bool ModuleIO::read_cube( } #endif - if (GlobalV::MY_RANK == 0 || (GlobalV::ESOLVER_TYPE == "sdft" && GlobalV::RANK_IN_STOGROUP == 0)) + if (my_rank == 0 || (esolver_type == "sdft" && rank_in_stogroup == 0)) ifs.close(); return true; } diff --git a/source/module_io/read_dm.cpp b/source/module_io/read_dm.cpp index d2a7624793..1acc150795 100644 --- a/source/module_io/read_dm.cpp +++ b/source/module_io/read_dm.cpp @@ -8,6 +8,9 @@ void ModuleIO::read_dm( const int nnrg, const int* trace_lo, #endif + const bool gamma_only_local, + const int nlocal, + const int nspin, const int &is, const std::string &fn, double*** DM, @@ -77,10 +80,10 @@ void ModuleIO::read_dm( } } - ModuleBase::CHECK_INT(ifs, GlobalV::NSPIN); + ModuleBase::CHECK_INT(ifs, nspin); ModuleBase::GlobalFunc::READ_VALUE(ifs, ef); - ModuleBase::CHECK_INT(ifs, GlobalV::NLOCAL); - ModuleBase::CHECK_INT(ifs, GlobalV::NLOCAL); + ModuleBase::CHECK_INT(ifs, nlocal); + ModuleBase::CHECK_INT(ifs, nlocal); }// If file exist, read in data. } // Finish reading the first part of density matrix. @@ -88,11 +91,11 @@ void ModuleIO::read_dm( #ifndef __MPI GlobalV::ofs_running << " Read SPIN = " << is+1 << " density matrix now." << std::endl; - if(GlobalV::GAMMA_ONLY_LOCAL) + if(gamma_only_local) { - for(int i=0; i> DM[is][i][j]; } @@ -125,27 +128,27 @@ void ModuleIO::read_dm( Parallel_Common::bcast_double(ef); - if(GlobalV::GAMMA_ONLY_LOCAL) + if(gamma_only_local) { - double *tmp = new double[GlobalV::NLOCAL]; - for(int i=0; i* psid, elecstate::ElecState* pelec) @@ -218,12 +229,12 @@ int ModuleIO::read_wfc_nao( if(GlobalV::GAMMA_ONLY_LOCAL) { // read wave functions - ss << GlobalV::global_readin_dir << "LOWF_GAMMA_S" << is+1 <<".txt"; + ss << global_readin_dir << "LOWF_GAMMA_S" << is+1 <<".txt"; std::cout << " name is = " << ss.str() << std::endl; } else { - ss << GlobalV::global_readin_dir << "LOWF_K.txt"; + ss << global_readin_dir << "LOWF_K.txt"; } std::ifstream ifs; @@ -254,27 +265,27 @@ int ModuleIO::read_wfc_nao( ModuleBase::GlobalFunc::READ_VALUE(ifs, nbands); ModuleBase::GlobalFunc::READ_VALUE(ifs, nlocal); - if (nbands!=GlobalV::NBANDS) + if (nbands!=nbands_g) { GlobalV::ofs_warning << " read in nbands=" << nbands; - GlobalV::ofs_warning << " NBANDS=" << GlobalV::NBANDS << std::endl; + GlobalV::ofs_warning << " NBANDS=" << nbands_g << std::endl; error = 2; } - else if (nlocal != GlobalV::NLOCAL) + else if (nlocal != nlocal_g) { GlobalV::ofs_warning << " read in nlocal=" << nlocal; - GlobalV::ofs_warning << " NLOCAL=" << GlobalV::NLOCAL << std::endl; + GlobalV::ofs_warning << " NLOCAL=" << nlocal_g << std::endl; error = 3; } - ctot = new double*[GlobalV::NBANDS]; - for (int i=0; iwg(is, i)); assert( (i+1)==ib); //std::cout << " ib=" << ib << std::endl; - for (int j=0; j> ctot[i][j]; //std::cout << ctot[i][j] << " "; @@ -294,13 +305,13 @@ int ModuleIO::read_wfc_nao( #ifdef __MPI Parallel_Common::bcast_int(error); - Parallel_Common::bcast_double( &(pelec->ekb(is, 0)), GlobalV::NBANDS); - Parallel_Common::bcast_double( &(pelec->wg(is, 0)), GlobalV::NBANDS); + Parallel_Common::bcast_double( &(pelec->ekb(is, 0)), nbands_g); + Parallel_Common::bcast_double( &(pelec->wg(is, 0)), nbands_g); #endif if(error==2) return 2; if(error==3) return 3; - ModuleIO::distri_wfc_nao(ctot, is, ParaV, psid); + ModuleIO::distri_wfc_nao(ctot, is, nb2d, nbands_g, nlocal_g,ParaV, psid); // mohan add 2012-02-15, // still have bugs, but can solve it later. @@ -310,7 +321,7 @@ int ModuleIO::read_wfc_nao( if (GlobalV::MY_RANK==0) { // delte the ctot - for (int i=0; i* psid) +void ModuleIO::distri_wfc_nao(double** ctot, const int& is, const int& nb2d, const int& nbands_g, + const int& nlocal_g, const Parallel_Orbitals* ParaV, psi::Psi* psid) { ModuleBase::TITLE("ModuleIO","distri_wfc_nao"); #ifdef __MPI @@ -340,9 +351,9 @@ void ModuleIO::distri_wfc_nao(double** ctot, const int& is, double *work=new double[maxnloc]; // work/buffer matrix #ifdef __DEBUG -assert(GlobalV::NB2D > 0); +assert(nb2d > 0); #endif - int nb = GlobalV::NB2D; + int nb = nb2d; int info; int naroc[2]; // maximum number of row or column @@ -363,7 +374,7 @@ assert(GlobalV::NB2D > 0); info=MPI_Bcast(naroc, 2, MPI_INT, src_rank, ParaV->comm_2D); //2.2 copy from ctot to work, then bcast work - info=CTOT2q(myid, naroc, nb, ParaV->dim0, ParaV->dim1, iprow, ipcol, work, ctot); + info=CTOT2q(myid, naroc, nb, ParaV->dim0, ParaV->dim1, iprow, ipcol, nbands_g, work, ctot); info=MPI_Bcast(work, maxnloc, MPI_DOUBLE, 0, ParaV->comm_2D); //GlobalV::ofs_running << "iprow, ipcow : " << iprow << ipcol << std::endl; //for (int i=0; i 0); delete[] work; #else - for (int i=0; i 0); return; } -void ModuleIO::distri_wfc_nao_complex(std::complex** ctot, const int& ik, - const Parallel_Orbitals* ParaV, psi::Psi>* psi) +void ModuleIO::distri_wfc_nao_complex(std::complex** ctot, const int& ik, const int& nb2d, + const int& nbands_g, const Parallel_Orbitals* ParaV, psi::Psi>* psi) { ModuleBase::TITLE("ModuleIO","distri_wfc_nao_complex"); #ifdef __MPI @@ -412,9 +423,9 @@ void ModuleIO::distri_wfc_nao_complex(std::complex** ctot, const int& ik std::complex *work=new std::complex[maxnloc]; // work/buffer matrix #ifdef __DEBUG -assert(GlobalV::NB2D > 0); +assert(nb2d > 0); #endif - int nb = GlobalV::NB2D; + int nb = nb2d; int info; int naroc[2]; // maximum number of row or column @@ -435,7 +446,7 @@ assert(GlobalV::NB2D > 0); info=MPI_Bcast(naroc, 2, MPI_INT, src_rank, ParaV->comm_2D); //2.2 copy from ctot to work, then bcast work - info=CTOT2q_c(myid, naroc, nb, ParaV->dim0, ParaV->dim1, iprow, ipcol, work, ctot); + info=CTOT2q_c(myid, naroc, nb, ParaV->dim0, ParaV->dim1, iprow, ipcol, nbands_g, work, ctot); info=MPI_Bcast(work, maxnloc, MPI_DOUBLE_COMPLEX, 0, ParaV->comm_2D); //ofs_running << "iprow, ipcow : " << iprow << ipcol << std::endl; //for (int i=0; i* psid); - void distri_wfc_nao_complex(std::complex** ctot, const int& ik, - const Parallel_Orbitals* ParaV, psi::Psi>* psi); + void distri_wfc_nao(double** ctot, const int& is, const int& nb2d,const int& nbands_g, + const int& nlocal_g, const Parallel_Orbitals* ParaV, psi::Psi* psid); + void distri_wfc_nao_complex(std::complex** ctot, const int& ik,const int& nb2d, const int& nbands_g, + const Parallel_Orbitals* ParaV, psi::Psi>* psi); int read_wfc_nao( double** ctot, const int& is, + const bool& gamma_only_local, + const int& nb2d, + const int& nbands_g, + const int& nlocal_g, + const std::string& global_readin_dir, const Parallel_Orbitals* ParaV, psi::Psi* psid, elecstate::ElecState* pelec); @@ -26,6 +31,10 @@ namespace ModuleIO int read_wfc_nao_complex( std::complex** ctot, const int& ik, + const int& nb2d, + const int& nbands_g, + const int& nlocal_g, + const std::string& global_readin_dir, const ModuleBase::Vector3 kvec_c, const Parallel_Orbitals* ParaV, psi::Psi>* psi, diff --git a/source/module_io/restart.cpp b/source/module_io/restart.cpp index cd54e11ed2..773408746d 100644 --- a/source/module_io/restart.cpp +++ b/source/module_io/restart.cpp @@ -20,72 +20,34 @@ void Restart::read_file1(const std::string &file_name, void*const ptr, const siz ifs.read(static_cast(ptr),size); } -void Restart::write_file2(const std::string &file_name, const void*const ptr, const size_t size) const +bool Restart::write_file2(const std::string& file_name, const void* const ptr, const size_t size, const bool error_quit) const { const int file = open(file_name.c_str(), O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR); - if(-1==file) throw std::runtime_error("can't open restart save file. \nerrno="+ModuleBase::GlobalFunc::TO_STRING(errno)+".\n"+ModuleBase::GlobalFunc::TO_STRING(__FILE__)+" line "+ModuleBase::GlobalFunc::TO_STRING(__LINE__)); - auto error = write(file, ptr, size); - if(-1==error) throw std::runtime_error("can't write restart save file. \nerrno="+ModuleBase::GlobalFunc::TO_STRING(errno)+".\n"+ModuleBase::GlobalFunc::TO_STRING(__FILE__)+" line "+ModuleBase::GlobalFunc::TO_STRING(__LINE__) ); - close(file); + if (-1 == file) + if (error_quit) + throw std::runtime_error("can't open restart save file. \nerrno=" + ModuleBase::GlobalFunc::TO_STRING(errno) + ".\n" + ModuleBase::GlobalFunc::TO_STRING(__FILE__) + " line " + ModuleBase::GlobalFunc::TO_STRING(__LINE__)); + else return false; + auto error = write(file, ptr, size); + if (-1 == error) + if (error_quit) + throw std::runtime_error("can't write restart save file. \nerrno=" + ModuleBase::GlobalFunc::TO_STRING(errno) + ".\n" + ModuleBase::GlobalFunc::TO_STRING(__FILE__) + " line " + ModuleBase::GlobalFunc::TO_STRING(__LINE__)); + else return false; + close(file); + return true; } -void Restart::read_file2(const std::string &file_name, void*const ptr, const size_t size) const +bool Restart::read_file2(const std::string& file_name, void* const ptr, const size_t size, const bool error_quit) const { const int file = open(file_name.c_str(), O_RDONLY); - if(-1==file) throw std::runtime_error("can't open restart load file. \nerrno="+ModuleBase::GlobalFunc::TO_STRING(errno)+".\n"+ModuleBase::GlobalFunc::TO_STRING(__FILE__)+" line "+ModuleBase::GlobalFunc::TO_STRING(__LINE__)); - auto error = read(file, ptr, size); - if(-1==error) throw std::runtime_error("can't read restart load file. \nerrno="+ModuleBase::GlobalFunc::TO_STRING(errno)+".\n"+ModuleBase::GlobalFunc::TO_STRING(__FILE__)+" line "+ModuleBase::GlobalFunc::TO_STRING(__LINE__)); - close(file); -} - -void Restart::save_disk(const std::string mode, const int is, const int nrxx, double** rho) const -{ - if("charge"==mode) - write_file2(folder + "charge_" + ModuleBase::GlobalFunc::TO_STRING(GlobalV::MY_RANK) + "_" - + ModuleBase::GlobalFunc::TO_STRING(is), - rho[is], - nrxx * sizeof(double)); -} - -void Restart::load_disk(const std::string mode, const int is, const int nrxx, double** rho) const -{ - if("charge"==mode) - read_file2(folder + "charge_" + ModuleBase::GlobalFunc::TO_STRING(GlobalV::MY_RANK) + "_" - + ModuleBase::GlobalFunc::TO_STRING(is), - rho[is], - nrxx * sizeof(double)); -} - -#ifdef __LCAO -void Restart::save_disk(LCAO_Matrix& lm, const std::string mode, const int is, const int nrxx, double** rho) const -{ - if("charge"==mode) - write_file2(folder + "charge_" + ModuleBase::GlobalFunc::TO_STRING(GlobalV::MY_RANK) + "_" - + ModuleBase::GlobalFunc::TO_STRING(is), - rho[is], - nrxx * sizeof(double)); - if("H"==mode) - { - if(GlobalV::GAMMA_ONLY_LOCAL) - write_file2(folder+"Hgamma_"+ModuleBase::GlobalFunc::TO_STRING(GlobalV::MY_RANK)+"_"+ModuleBase::GlobalFunc::TO_STRING(is), lm.Hloc.data(), lm.ParaV->nloc*sizeof(double)); - else - write_file2(folder+"Hk_"+ModuleBase::GlobalFunc::TO_STRING(GlobalV::MY_RANK)+"_"+ModuleBase::GlobalFunc::TO_STRING(is), lm.Hloc2.data(), lm.ParaV->nloc*sizeof(std::complex)); - } -} - -void Restart::load_disk(LCAO_Matrix& lm, const std::string mode, const int is, const int nrxx, double** rho) const -{ - if("charge"==mode) - read_file2(folder + "charge_" + ModuleBase::GlobalFunc::TO_STRING(GlobalV::MY_RANK) + "_" - + ModuleBase::GlobalFunc::TO_STRING(is), - rho[is], - nrxx * sizeof(double)); - if("H"==mode) - { - if(GlobalV::GAMMA_ONLY_LOCAL) - read_file2(folder+"Hgamma_"+ModuleBase::GlobalFunc::TO_STRING(GlobalV::MY_RANK)+"_"+ModuleBase::GlobalFunc::TO_STRING(is), lm.Hloc.data(), lm.ParaV->nloc*sizeof(double)); - else - read_file2(folder+"Hk_"+ModuleBase::GlobalFunc::TO_STRING(GlobalV::MY_RANK)+"_"+ModuleBase::GlobalFunc::TO_STRING(is), lm.Hloc2.data(), lm.ParaV->nloc*sizeof(std::complex)); - } -} -#endif \ No newline at end of file + if (-1 == file) + if (error_quit) + throw std::runtime_error("can't open restart load file. \nerrno=" + ModuleBase::GlobalFunc::TO_STRING(errno) + ".\n" + ModuleBase::GlobalFunc::TO_STRING(__FILE__) + " line " + ModuleBase::GlobalFunc::TO_STRING(__LINE__)); + else return false; + auto error = read(file, ptr, size); + if (-1 == error) + if (error_quit) + throw std::runtime_error("can't read restart load file. \nerrno=" + ModuleBase::GlobalFunc::TO_STRING(errno) + ".\n" + ModuleBase::GlobalFunc::TO_STRING(__FILE__) + " line " + ModuleBase::GlobalFunc::TO_STRING(__LINE__)); + else return false; + close(file); + return true; +} \ No newline at end of file diff --git a/source/module_io/restart.h b/source/module_io/restart.h index 3ebd4ca122..4de577a29f 100644 --- a/source/module_io/restart.h +++ b/source/module_io/restart.h @@ -2,6 +2,7 @@ #define RESTART_H #include +#include "module_base/global_function.h" #ifdef __LCAO #include "module_hamilt_lcao/hamilt_lcaodft/LCAO_matrix.h" #endif @@ -11,7 +12,7 @@ class Restart struct Info_Save { bool save_charge = false; - bool save_H = false; + bool save_H = false; // save H means save Hexx now, will be changed in the future. }; Info_Save info_save; @@ -21,23 +22,35 @@ class Restart bool load_charge_finish = false; bool load_H = false; bool load_H_finish = false; - bool restart_exx = false; + bool restart_exx = false; // to avoid the repeated load in MD/Relax }; Info_Load info_load; std::string folder; - - void save_disk(const std::string mode, const int is, const int nrxx, double** rho) const; - void load_disk(const std::string mode, const int is, const int nrxx, double** rho) const; -#ifdef __LCAO - void save_disk(LCAO_Matrix &lm, const std::string mode, const int is, const int nrxx, double** rho) const; - void load_disk(LCAO_Matrix &lm, const std::string mode, const int is, const int nrxx, double** rho) const; -#endif + + template + bool save_disk(const std::string label, const int index, const int size, T* data, const bool error_quit = true) const + { + return write_file2(folder + label + "_" + ModuleBase::GlobalFunc::TO_STRING(GlobalV::MY_RANK) + "_" + + ModuleBase::GlobalFunc::TO_STRING(index), + data, + size * sizeof(T), + error_quit); + } + template + bool load_disk(const std::string label, const int index, const int size, T* data, const bool error_quit = true) const + { + return read_file2(folder + label + "_" + ModuleBase::GlobalFunc::TO_STRING(GlobalV::MY_RANK) + "_" + + ModuleBase::GlobalFunc::TO_STRING(index), + data, + size * sizeof(T), + error_quit); + } private: void write_file1(const std::string &file_name, const void*const ptr, const size_t size) const; void read_file1(const std::string &file_name, void*const ptr, const size_t size) const; - void write_file2(const std::string &file_name, const void*const ptr, const size_t size) const; - void read_file2(const std::string &file_name, void*const ptr, const size_t size) const; + bool write_file2(const std::string& file_name, const void* const ptr, const size_t size, const bool error_quit = true) const; + bool read_file2(const std::string& file_name, void* const ptr, const size_t size, const bool error_quit = true) const; }; #endif \ No newline at end of file diff --git a/source/module_io/rho_io.h b/source/module_io/rho_io.h index a84f080ff2..d219bfe837 100644 --- a/source/module_io/rho_io.h +++ b/source/module_io/rho_io.h @@ -10,9 +10,13 @@ namespace ModuleIO { bool read_rho( #ifdef __MPI - Parallel_Grid* Pgrid, + Parallel_Grid* Pgrid, #endif - const int &is, + int my_rank, + std::string esolver_type, + int rank_in_stogroup, + const int& is, + std::ofstream& ofs_running, const int &nspin, const std::string &fn, double* rho, diff --git a/source/module_io/test/CMakeLists.txt b/source/module_io/test/CMakeLists.txt index 35cac76c0b..640912fac3 100644 --- a/source/module_io/test/CMakeLists.txt +++ b/source/module_io/test/CMakeLists.txt @@ -154,8 +154,9 @@ AddTest( LIBS base ${math_libs} device numerical_atomic_orbitals container orb SOURCES to_qo_test.cpp - ../to_qo.cpp - ../to_qo_tools.cpp + ../to_qo_kernel.cpp + ../to_qo_mpi.cpp + ../to_qo_structures.cpp ../../module_cell/atom_spec.cpp ../../module_cell/parallel_kpoints.cpp ../../module_cell/test/support/mock_unitcell.cpp diff --git a/source/module_io/test/input_conv_test.cpp b/source/module_io/test/input_conv_test.cpp index b9742c6819..eebc50d91a 100644 --- a/source/module_io/test/input_conv_test.cpp +++ b/source/module_io/test/input_conv_test.cpp @@ -275,9 +275,9 @@ TEST_F(InputConvTest, dftplus) INPUT.Default(); std::string input_file = "./support/INPUT"; INPUT.Read(input_file); - INPUT.dft_plus_u=true; + INPUT.dft_plus_u=1; Input_Conv::Convert(); - EXPECT_EQ(GlobalV::dft_plus_u,true); + EXPECT_EQ(GlobalV::dft_plus_u,1); EXPECT_EQ(GlobalC::dftu.Yukawa,false); EXPECT_EQ(GlobalC::dftu.omc,false);// EXPECT_EQ(GlobalC::dftu.orbital_corr,INPUT.orbital_corr); @@ -315,7 +315,7 @@ TEST_F(InputConvTest, nspinbeta) output2 = testing::internal::GetCapturedStdout(); EXPECT_THAT(output2,testing::HasSubstr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")); EXPECT_THAT(output2,testing::HasSubstr(" NOTICE ")); - EXPECT_THAT(output2,testing::HasSubstr("force & stress not ready for soc yet!")); + EXPECT_THAT(output2,testing::HasSubstr("force & stress not ready for nspin=4(soc or noncollinear-spin) yet!")); EXPECT_THAT(output2,testing::HasSubstr("CHECK IN FILE : warning.log")); EXPECT_THAT(output2,testing::HasSubstr("TIME STATISTICS")); } @@ -367,7 +367,8 @@ TEST_F(InputConvTest, restart_load) INPUT.dft_functional = "hf"; Input_Conv::Convert(); EXPECT_EQ( GlobalC::restart.folder,GlobalV::global_readin_dir + "restart/"); - EXPECT_EQ(GlobalC::restart.info_load.load_charge,true); + EXPECT_EQ(GlobalC::restart.info_load.load_charge, true); + EXPECT_EQ(GlobalC::restart.info_load.load_H, true); } TEST_F(InputConvTest,restart_load2 ) @@ -378,8 +379,7 @@ TEST_F(InputConvTest,restart_load2 ) INPUT.restart_load=true; INPUT.dft_functional="b3lyp"; Input_Conv::Convert(); - EXPECT_EQ(GlobalC::restart.info_load.load_charge,true); - EXPECT_EQ(GlobalC::restart.info_load.load_H,true); + EXPECT_EQ(GlobalC::restart.info_load.load_charge, true); } TEST_F(InputConvTest,cell_factor ) diff --git a/source/module_io/test/input_test.cpp b/source/module_io/test/input_test.cpp index decb59fdec..40a56b3548 100644 --- a/source/module_io/test/input_test.cpp +++ b/source/module_io/test/input_test.cpp @@ -306,9 +306,10 @@ TEST_F(InputTest, Default) EXPECT_FALSE(INPUT.restart_save); EXPECT_FALSE(INPUT.restart_load); EXPECT_FALSE(INPUT.test_skip_ewald); - EXPECT_FALSE(INPUT.dft_plus_u); + EXPECT_EQ(INPUT.dft_plus_u, 0); EXPECT_FALSE(INPUT.yukawa_potential); EXPECT_DOUBLE_EQ(INPUT.yukawa_lambda,-1.0); + EXPECT_EQ(INPUT.onsite_radius, 0.0); EXPECT_EQ(INPUT.omc,0); EXPECT_FALSE(INPUT.dft_plus_dmft); EXPECT_FALSE(INPUT.rpa); @@ -670,9 +671,10 @@ TEST_F(InputTest, Read) EXPECT_FALSE(INPUT.restart_save); EXPECT_FALSE(INPUT.restart_load); EXPECT_FALSE(INPUT.test_skip_ewald); - EXPECT_FALSE(INPUT.dft_plus_u); + EXPECT_EQ(INPUT.dft_plus_u, 0); EXPECT_FALSE(INPUT.yukawa_potential); EXPECT_DOUBLE_EQ(INPUT.yukawa_lambda,-1.0); + EXPECT_EQ(INPUT.onsite_radius, 0.0); EXPECT_EQ(INPUT.omc,0); EXPECT_FALSE(INPUT.dft_plus_dmft); EXPECT_FALSE(INPUT.rpa); @@ -1627,6 +1629,13 @@ TEST_F(InputTest, Check) output = testing::internal::GetCapturedStdout(); EXPECT_THAT(output,testing::HasSubstr("sc_scf_nmin must >= 2")); INPUT.sc_scf_nmin = 2; + // warning 10 of Deltaspin + INPUT.nupdown = 4; + testing::internal::CaptureStdout(); + EXPECT_EXIT(INPUT.Check(),::testing::ExitedWithCode(0), ""); + output = testing::internal::GetCapturedStdout(); + EXPECT_THAT(output,testing::HasSubstr("nupdown should not be set when sc_mag_switch > 0")); + INPUT.nupdown = 0; // restore to default values INPUT.nspin = 1; INPUT.sc_file = "none"; diff --git a/source/module_io/test/input_test_para.cpp b/source/module_io/test/input_test_para.cpp index 46e9c5d729..4a661bf582 100644 --- a/source/module_io/test/input_test_para.cpp +++ b/source/module_io/test/input_test_para.cpp @@ -314,7 +314,7 @@ TEST_F(InputParaTest, Bcast) EXPECT_FALSE(INPUT.restart_save); EXPECT_FALSE(INPUT.restart_load); EXPECT_FALSE(INPUT.test_skip_ewald); - EXPECT_FALSE(INPUT.dft_plus_u); + EXPECT_EQ(INPUT.dft_plus_u, 0); EXPECT_FALSE(INPUT.yukawa_potential); EXPECT_DOUBLE_EQ(INPUT.yukawa_lambda, -1.0); EXPECT_EQ(INPUT.omc, 0); @@ -392,7 +392,7 @@ TEST_F(InputParaTest, Bcast) EXPECT_EQ(INPUT.qo_strategy.size(), 0); EXPECT_EQ(INPUT.qo_screening_coeff.size(), 0); EXPECT_EQ(INPUT.qo_thr, 1e-6); - EXPECT_EQ(INPUT.qo_basis, "hydrogen"); + EXPECT_EQ(INPUT.qo_basis, "szv"); } TEST_F(InputParaTest, Init) diff --git a/source/module_io/test/parameter_pool_test.cpp b/source/module_io/test/parameter_pool_test.cpp index d37378725b..5fc6def8bb 100644 --- a/source/module_io/test/parameter_pool_test.cpp +++ b/source/module_io/test/parameter_pool_test.cpp @@ -295,7 +295,7 @@ // EXPECT_FALSE(INPUT.restart_save); // EXPECT_FALSE(INPUT.restart_load); // EXPECT_FALSE(INPUT.test_skip_ewald); -// EXPECT_FALSE(INPUT.dft_plus_u); +// EXPECT_EQ(INPUT.dft_plus_u, 0); // EXPECT_FALSE(INPUT.yukawa_potential); // EXPECT_DOUBLE_EQ(INPUT.yukawa_lambda, -1.0); // EXPECT_EQ(INPUT.omc, 0); diff --git a/source/module_io/test/support/QO_ovlpR_0.dat b/source/module_io/test/support/QO_ovlpR_0.dat new file mode 100644 index 0000000000..0265bf0a82 --- /dev/null +++ b/source/module_io/test/support/QO_ovlpR_0.dat @@ -0,0 +1,9 @@ +SUPERCELL_COORDINATE: 0 0 0 + 9.95330157042009e-01 -7.71640245637438e-02 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 9.93363417688277e-01 0.00000000000000e+00 0.00000000000000e+00 -7.55891200149997e-02 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 9.93363417688277e-01 0.00000000000000e+00 0.00000000000000e+00 -7.55891200149997e-02 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 + 0.00000000000000e+00 0.00000000000000e+00 9.93363417688277e-01 0.00000000000000e+00 0.00000000000000e+00 -7.55891200149997e-02 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 9.93363417688277e-01 0.00000000000000e+00 0.00000000000000e+00 -7.55891200149997e-02 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 9.93363417688277e-01 0.00000000000000e+00 0.00000000000000e+00 -7.55891200149997e-02 2.32940220946083e-01 3.12427888919456e-01 + 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 9.93363417688277e-01 0.00000000000000e+00 0.00000000000000e+00 -7.55891200149997e-02 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 9.93363417688277e-01 0.00000000000000e+00 0.00000000000000e+00 -7.55891200149997e-02 2.32940220946083e-01 3.12427888919456e-01 2.26670648341119e-01 -2.26670648341119e-01 -2.26670648341119e-01 2.24394059582262e-01 -2.24394059582262e-01 -2.24394059582262e-01 -2.07892037913866e-01 -3.77149318383241e-02 + 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 9.93363417688277e-01 0.00000000000000e+00 0.00000000000000e+00 -7.55891200149997e-02 2.32940220946083e-01 3.12427888919456e-01 2.26670648341119e-01 -2.26670648341119e-01 -2.26670648341119e-01 2.24394059582262e-01 -2.24394059582262e-01 -2.24394059582262e-01 -2.07892037913866e-01 -3.77149318383241e-02 2.49657219237144e-02 1.92152864865442e-01 1.92152864865442e-01 1.63696083551827e-01 6.24455824684642e-02 6.24455824684642e-02 2.07892037913866e-01 3.77149318383241e-02 + 2.32940220946083e-01 3.12427888919456e-01 2.26670648341119e-01 -2.26670648341119e-01 -2.26670648341119e-01 2.24394059582262e-01 -2.24394059582262e-01 -2.24394059582262e-01 -2.07892037913866e-01 -3.77149318383241e-02 2.49657219237144e-02 1.92152864865442e-01 1.92152864865442e-01 1.63696083551827e-01 6.24455824684642e-02 6.24455824684642e-02 2.07892037913866e-01 3.77149318383241e-02 1.92152864865442e-01 2.49657219237144e-02 -1.92152864865442e-01 6.24455824684642e-02 1.63696083551827e-01 -6.24455824684642e-02 2.07892037913866e-01 3.77149318383241e-02 + -2.07892037913866e-01 -3.77149318383241e-02 2.49657219237144e-02 1.92152864865442e-01 1.92152864865442e-01 1.63696083551827e-01 6.24455824684642e-02 6.24455824684642e-02 2.07892037913866e-01 3.77149318383241e-02 1.92152864865442e-01 2.49657219237144e-02 -1.92152864865442e-01 6.24455824684642e-02 1.63696083551827e-01 -6.24455824684642e-02 2.07892037913866e-01 3.77149318383241e-02 1.92152864865442e-01 -1.92152864865442e-01 2.49657219237143e-02 6.24455824684642e-02 -6.24455824684642e-02 1.63696083551827e-01 6.25659449773200e-02 -1.44907194227481e-01 + 2.07892037913866e-01 3.77149318383241e-02 1.92152864865442e-01 2.49657219237144e-02 -1.92152864865442e-01 6.24455824684642e-02 1.63696083551827e-01 -6.24455824684642e-02 2.07892037913866e-01 3.77149318383241e-02 1.92152864865442e-01 -1.92152864865442e-01 2.49657219237143e-02 6.24455824684642e-02 -6.24455824684642e-02 1.63696083551827e-01 6.25659449773200e-02 -1.44907194227481e-01 -3.65397987032044e-02 1.08367395524277e-01 3.65397987032044e-02 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 9.93363417688277e-01 + 2.07892037913866e-01 3.77149318383241e-02 1.92152864865442e-01 -1.92152864865442e-01 2.49657219237143e-02 6.24455824684642e-02 -6.24455824684642e-02 1.63696083551827e-01 6.25659449773200e-02 -1.44907194227481e-01 -3.65397987032044e-02 1.08367395524277e-01 3.65397987032044e-02 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 9.93363417688277e-01 0.00000000000000e+00 0.00000000000000e+00 -7.55891200149997e-02 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 0.00000000000000e+00 diff --git a/source/module_io/test/to_qo_test.cpp b/source/module_io/test/to_qo_test.cpp index 2d792913e1..40b53e7cd8 100644 --- a/source/module_io/test/to_qo_test.cpp +++ b/source/module_io/test/to_qo_test.cpp @@ -61,6 +61,8 @@ void define_fcc_cell(UnitCell& ucell) GlobalV::qo_screening_coeff = {0.1, 0.1}; GlobalV::qo_thr = 1e-6; GlobalV::ofs_running = std::ofstream("unittest.log"); + GlobalV::MY_RANK = 0; + GlobalV::NPROC = 1; } void define_sc_cell(UnitCell& ucell) @@ -96,6 +98,8 @@ void define_sc_cell(UnitCell& ucell) GlobalV::qo_screening_coeff = {0.1}; GlobalV::qo_thr = 1e-6; GlobalV::ofs_running = std::ofstream("unittest.log"); + GlobalV::MY_RANK = 0; + GlobalV::NPROC = 1; } class toQOTest : public testing::Test @@ -114,44 +118,37 @@ class toQOTest : public testing::Test TEST_F(toQOTest, Constructor) { define_fcc_cell(ucell); - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); EXPECT_EQ(tqo.qo_basis(), "hydrogen"); EXPECT_EQ(tqo.strategy(0), "minimal-nodeless"); EXPECT_EQ(tqo.strategy(1), "minimal-nodeless"); - EXPECT_EQ(tqo.nkpts(), 0); + EXPECT_EQ(tqo.nks(), 0); EXPECT_EQ(tqo.p_ucell(), nullptr); } -TEST_F(toQOTest, OrbitalFilter) +TEST_F(toQOTest, ReadStructures) { define_fcc_cell(ucell); - toQO tqo("pswfc", {"s", "spd", "all", "dfps"}); - EXPECT_TRUE(tqo.orbital_filter(0, tqo.strategy(0))); // whether l=0 is possible for stratgy of type 0 - EXPECT_FALSE(tqo.orbital_filter(1, tqo.strategy(0))); // whether l=1 is possible for stratgy of type 0 - EXPECT_FALSE(tqo.orbital_filter(2, tqo.strategy(0))); // whether l=2 is possible for stratgy of type 0 - EXPECT_TRUE(tqo.orbital_filter(0, tqo.strategy(1))); // whether l=0 is possible for stratgy of type 1 - EXPECT_TRUE(tqo.orbital_filter(1, tqo.strategy(1))); // whether l=1 is possible for stratgy of type 1 - EXPECT_TRUE(tqo.orbital_filter(2, tqo.strategy(1))); // whether l=2 is possible for stratgy of type 1 - EXPECT_FALSE(tqo.orbital_filter(3, tqo.strategy(1))); // whether l=3 is possible for stratgy of type 1 - EXPECT_TRUE(tqo.orbital_filter(0, tqo.strategy(2))); // whether l=0 is possible for stratgy of type 2 - EXPECT_TRUE(tqo.orbital_filter(1, tqo.strategy(2))); // whether l=1 is possible for stratgy of type 2 - EXPECT_TRUE(tqo.orbital_filter(2, tqo.strategy(2))); // whether l=2 is possible for stratgy of type 2 - EXPECT_TRUE(tqo.orbital_filter(3, tqo.strategy(2))); // whether l=3 is possible for stratgy of type 2 - EXPECT_TRUE(tqo.orbital_filter(4, tqo.strategy(2))); // whether l=4 is possible for stratgy of type 2 - EXPECT_TRUE(tqo.orbital_filter(5, tqo.strategy(2))); // whether l=5 is possible for stratgy of type 2 - EXPECT_TRUE(tqo.orbital_filter(6, tqo.strategy(2))); // whether l=6 is possible for stratgy of type 2 - EXPECT_TRUE(tqo.orbital_filter(0, tqo.strategy(3))); // whether l=0 is possible for stratgy of type 3 - EXPECT_TRUE(tqo.orbital_filter(1, tqo.strategy(3))); // whether l=1 is possible for stratgy of type 3 - EXPECT_TRUE(tqo.orbital_filter(2, tqo.strategy(3))); // whether l=2 is possible for stratgy of type 3 - EXPECT_TRUE(tqo.orbital_filter(3, tqo.strategy(3))); // whether l=3 is possible for stratgy of type 3 - EXPECT_FALSE(tqo.orbital_filter(4, tqo.strategy(3))); // whether l=4 is possible for stratgy of type 3 -} - -TEST_F(toQOTest, UnwrapUnitcell) -{ - define_fcc_cell(ucell); - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); - tqo.unwrap_unitcell(&ucell); + + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(-0.25, -0.25, -0.25)); // pair 1 + kvecs_d.push_back(ModuleBase::Vector3(0.25, 0.25, 0.25)); + kvecs_d.push_back(ModuleBase::Vector3(-0.25, 0.25, 0.25)); // pair 2 + kvecs_d.push_back(ModuleBase::Vector3(0.25, -0.25, -0.25)); + kvecs_d.push_back(ModuleBase::Vector3(-0.25, -0.25, 0.25)); // pair 3 + kvecs_d.push_back(ModuleBase::Vector3(0.25, 0.25, -0.25)); + kvecs_d.push_back(ModuleBase::Vector3(-0.25, 0.25, -0.25)); // pair 4 + kvecs_d.push_back(ModuleBase::Vector3(0.25, -0.25, 0.25)); + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma + + tqo.read_structures(&ucell, kvecs_d, 0, 1); EXPECT_EQ(tqo.ntype(), ucell.ntype); EXPECT_EQ(tqo.symbols().size(), ucell.ntype); EXPECT_EQ(tqo.charges().size(), ucell.ntype); @@ -159,23 +156,210 @@ TEST_F(toQOTest, UnwrapUnitcell) EXPECT_EQ(tqo.symbols()[1], "C"); EXPECT_EQ(tqo.charges()[0], 14.0); EXPECT_EQ(tqo.charges()[1], 6.0); + EXPECT_EQ(tqo.nks(), tqo.kvecs_d().size()); + EXPECT_EQ(tqo.kvecs_d().size(), kvecs_d.size()); + EXPECT_EQ(tqo.kvecs_d()[0], ModuleBase::Vector3(-0.25, -0.25, -0.25)); + EXPECT_EQ(tqo.kvecs_d()[1], ModuleBase::Vector3(0.25, 0.25, 0.25)); + EXPECT_EQ(tqo.kvecs_d()[2], ModuleBase::Vector3(-0.25, 0.25, 0.25)); + EXPECT_EQ(tqo.kvecs_d()[3], ModuleBase::Vector3(0.25, -0.25, -0.25)); + EXPECT_EQ(tqo.kvecs_d()[4], ModuleBase::Vector3(-0.25, -0.25, 0.25)); + EXPECT_EQ(tqo.kvecs_d()[5], ModuleBase::Vector3(0.25, 0.25, -0.25)); + EXPECT_EQ(tqo.kvecs_d()[6], ModuleBase::Vector3(-0.25, 0.25, -0.25)); + EXPECT_EQ(tqo.kvecs_d()[7], ModuleBase::Vector3(0.25, -0.25, 0.25)); + EXPECT_EQ(tqo.kvecs_d()[8], ModuleBase::Vector3(0.0, 0.0, 0.0)); } TEST_F(toQOTest, BuildNao) { define_fcc_cell(ucell); - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); tqo.build_nao(ucell.ntype, "./", ucell.orbital_fn, 0); EXPECT_EQ(tqo.p_nao()->nchi(), 10); // not (l, m)-resoluted EXPECT_EQ(tqo.nphi(), 26); // (l, m)-resoluted } +TEST_F(toQOTest, RadialCollectionIndexing) +{ + define_fcc_cell(ucell); + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); + tqo.build_nao(ucell.ntype, "./", ucell.orbital_fn, 0); + // ucell.orbital_fn[0] = "../../../../tests/PP_ORB/Si_gga_8au_100Ry_2s2p1d.orb"; + // ucell.orbital_fn[1] = "../../../../tests/PP_ORB/C_gga_8au_100Ry_2s2p1d.orb"; + // test1 1Si, 1C + std::vector natoms = {1, 1}; + std::map,int> index; + std::map> index_reverse; + tqo.radialcollection_indexing(*(tqo.p_nao()), natoms, false, index, index_reverse); + EXPECT_EQ(index.size(), 26); // 2*1 + 2*3 + 1*5 + 2*1 + 2*3 + 1*5 = 26 + EXPECT_EQ(index_reverse.size(), 26); + // it, ia, l, izeta, m + // it = 0 + // ia = 0 + // l = 0 + // izeta = 0 + EXPECT_EQ(index[std::make_tuple(0,0,0,0,0)], 0); // Si, 1st atom, 1s + // izeta = 1 + EXPECT_EQ(index[std::make_tuple(0,0,0,1,0)], 1); // Si, 1st atom, 2s + // l = 1 + // izeta = 0 + EXPECT_EQ(index[std::make_tuple(0,0,1,0,0)], 2); // Si, 1st atom, 1p, m = 0 + EXPECT_EQ(index[std::make_tuple(0,0,1,0,1)], 3); // Si, 1st atom, 1p, m = 1 + EXPECT_EQ(index[std::make_tuple(0,0,1,0,-1)], 4); // Si, 1st atom, 1p, m = -1 + // izeta = 1 + EXPECT_EQ(index[std::make_tuple(0,0,1,1,0)], 5); // Si, 1st atom, 2p, m = 0 + EXPECT_EQ(index[std::make_tuple(0,0,1,1,1)], 6); // Si, 1st atom, 2p, m = 1 + EXPECT_EQ(index[std::make_tuple(0,0,1,1,-1)], 7); // Si, 1st atom, 2p, m = -1 + // l = 2 + // izeta = 0 + EXPECT_EQ(index[std::make_tuple(0,0,2,0,0)], 8); // Si, 1st atom, 1d, m = 0 + EXPECT_EQ(index[std::make_tuple(0,0,2,0,1)], 9); // Si, 1st atom, 1d, m = 1 + EXPECT_EQ(index[std::make_tuple(0,0,2,0,-1)], 10); // Si, 1st atom, 1d, m = -1 + EXPECT_EQ(index[std::make_tuple(0,0,2,0,2)], 11); // Si, 1st atom, 1d, m = 2 + EXPECT_EQ(index[std::make_tuple(0,0,2,0,-2)], 12); // Si, 1st atom, 1d, m = -2 + // it = 1 + // ia = 0 + // l = 0 + // izeta = 0 + EXPECT_EQ(index[std::make_tuple(1,0,0,0,0)], 13); // C, 1st atom, 1s + // izeta = 1 + EXPECT_EQ(index[std::make_tuple(1,0,0,1,0)], 14); // C, 1st atom, 2s + // l = 1 + // izeta = 0 + EXPECT_EQ(index[std::make_tuple(1,0,1,0,0)], 15); // C, 1st atom, 1p, m = 0 + EXPECT_EQ(index[std::make_tuple(1,0,1,0,1)], 16); // C, 1st atom, 1p, m = 1 + EXPECT_EQ(index[std::make_tuple(1,0,1,0,-1)], 17); // C, 1st atom, 1p, m = -1 + // izeta = 1 + EXPECT_EQ(index[std::make_tuple(1,0,1,1,0)], 18); // C, 1st atom, 2p, m = 0 + EXPECT_EQ(index[std::make_tuple(1,0,1,1,1)], 19); // C, 1st atom, 2p, m = 1 + EXPECT_EQ(index[std::make_tuple(1,0,1,1,-1)], 20); // C, 1st atom, 2p, m = -1 + // l = 2 + // izeta = 0 + EXPECT_EQ(index[std::make_tuple(1,0,2,0,0)], 21); // C, 1st atom, 1d, m = 0 + EXPECT_EQ(index[std::make_tuple(1,0,2,0,1)], 22); // C, 1st atom, 1d, m = 1 + EXPECT_EQ(index[std::make_tuple(1,0,2,0,-1)], 23); // C, 1st atom, 1d, m = -1 + EXPECT_EQ(index[std::make_tuple(1,0,2,0,2)], 24); // C, 1st atom, 1d, m = 2 + EXPECT_EQ(index[std::make_tuple(1,0,2,0,-2)], 25); // C, 1st atom, 1d, m = -2 + // reverse + EXPECT_EQ(index_reverse[0], std::make_tuple(0,0,0,0,0)); // Si, 1st atom, 1s + EXPECT_EQ(index_reverse[1], std::make_tuple(0,0,0,1,0)); // Si, 1st atom, 2s + EXPECT_EQ(index_reverse[2], std::make_tuple(0,0,1,0,0)); // Si, 1st atom, 1p, m = 0 + EXPECT_EQ(index_reverse[3], std::make_tuple(0,0,1,0,1)); // Si, 1st atom, 1p, m = 1 + EXPECT_EQ(index_reverse[4], std::make_tuple(0,0,1,0,-1)); // Si, 1st atom, 1p, m = -1 + EXPECT_EQ(index_reverse[5], std::make_tuple(0,0,1,1,0)); // Si, 1st atom, 2p, m = 0 + EXPECT_EQ(index_reverse[6], std::make_tuple(0,0,1,1,1)); // Si, 1st atom, 2p, m = 1 + EXPECT_EQ(index_reverse[7], std::make_tuple(0,0,1,1,-1)); // Si, 1st atom, 2p, m = -1 + EXPECT_EQ(index_reverse[8], std::make_tuple(0,0,2,0,0)); // Si, 1st atom, 1d, m = 0 + EXPECT_EQ(index_reverse[9], std::make_tuple(0,0,2,0,1)); // Si, 1st atom, 1d, m = 1 + EXPECT_EQ(index_reverse[10], std::make_tuple(0,0,2,0,-1)); // Si, 1st atom, 1d, m = -1 + EXPECT_EQ(index_reverse[11], std::make_tuple(0,0,2,0,2)); // Si, 1st atom, 1d, m = 2 + EXPECT_EQ(index_reverse[12], std::make_tuple(0,0,2,0,-2)); // Si, 1st atom, 1d, m = -2 + EXPECT_EQ(index_reverse[13], std::make_tuple(1,0,0,0,0)); // C, 1st atom, 1s + EXPECT_EQ(index_reverse[14], std::make_tuple(1,0,0,1,0)); // C, 1st atom, 2s + EXPECT_EQ(index_reverse[15], std::make_tuple(1,0,1,0,0)); // C, 1st atom, 1p, m = 0 + EXPECT_EQ(index_reverse[16], std::make_tuple(1,0,1,0,1)); // C, 1st atom, 1p, m = 1 + EXPECT_EQ(index_reverse[17], std::make_tuple(1,0,1,0,-1)); // C, 1st atom, 1p, m = -1 + EXPECT_EQ(index_reverse[18], std::make_tuple(1,0,1,1,0)); // C, 1st atom, 2p, m = 0 + EXPECT_EQ(index_reverse[19], std::make_tuple(1,0,1,1,1)); // C, 1st atom, 2p, m = 1 + EXPECT_EQ(index_reverse[20], std::make_tuple(1,0,1,1,-1)); // C, 1st atom, 2p, m = -1 + EXPECT_EQ(index_reverse[21], std::make_tuple(1,0,2,0,0)); // C, 1st atom, 1d, m = 0 + EXPECT_EQ(index_reverse[22], std::make_tuple(1,0,2,0,1)); // C, 1st atom, 1d, m = 1 + EXPECT_EQ(index_reverse[23], std::make_tuple(1,0,2,0,-1)); // C, 1st atom, 1d, m = -1 + EXPECT_EQ(index_reverse[24], std::make_tuple(1,0,2,0,2)); // C, 1st atom, 1d, m = 2 + EXPECT_EQ(index_reverse[25], std::make_tuple(1,0,2,0,-2)); // C, 1st atom, 1d, m = -2 + // test2 2Si, 3C + natoms = {2, 3}; + tqo.radialcollection_indexing(*(tqo.p_nao()), natoms, false, index, index_reverse); + EXPECT_EQ(index.size(), 65); // (2*1 + 2*3 + 1*5)*2 + (2*1 + 2*3 + 1*5)*3 = 65 + EXPECT_EQ(index_reverse.size(), 65); + // it, ia, l, izeta, m + EXPECT_EQ(index[std::make_tuple(0,0,0,0,0)], 0); // Si, 1st atom, 1s + EXPECT_EQ(index[std::make_tuple(0,0,2,0,-2)], 12); // Si, 1st atom, 1d, m = -2 + EXPECT_EQ(index[std::make_tuple(0,1,0,0,0)], 13); // Si, 2nd atom, 1s + EXPECT_EQ(index[std::make_tuple(0,1,2,0,-2)], 25); // Si, 2nd atom, 1d, m = -2 + EXPECT_EQ(index[std::make_tuple(1,0,0,0,0)], 26); // C, 1st atom, 1s + EXPECT_EQ(index[std::make_tuple(1,0,2,0,-2)], 38); // C, 1st atom, 1d, m = -2 + EXPECT_EQ(index[std::make_tuple(1,1,0,0,0)], 39); // C, 2nd atom, 1s + EXPECT_EQ(index[std::make_tuple(1,1,2,0,-2)], 51); // C, 2nd atom, 1d, m = -2 + EXPECT_EQ(index[std::make_tuple(1,2,0,0,0)], 52); // C, 3rd atom, 1s + EXPECT_EQ(index[std::make_tuple(1,2,2,0,-2)], 64); // C, 3rd atom, 1d, m = -2 + // reverse + EXPECT_EQ(index_reverse[0], std::make_tuple(0,0,0,0,0)); // Si, 1st atom, 1s + EXPECT_EQ(index_reverse[12], std::make_tuple(0,0,2,0,-2)); // Si, 1st atom, 1d, m = -2 + EXPECT_EQ(index_reverse[13], std::make_tuple(0,1,0,0,0)); // Si, 2nd atom, 1s + EXPECT_EQ(index_reverse[25], std::make_tuple(0,1,2,0,-2)); // Si, 2nd atom, 1d, m = -2 + EXPECT_EQ(index_reverse[26], std::make_tuple(1,0,0,0,0)); // C, 1st atom, 1s + EXPECT_EQ(index_reverse[38], std::make_tuple(1,0,2,0,-2)); // C, 1st atom, 1d, m = -2 + EXPECT_EQ(index_reverse[39], std::make_tuple(1,1,0,0,0)); // C, 2nd atom, 1s + EXPECT_EQ(index_reverse[51], std::make_tuple(1,1,2,0,-2)); // C, 2nd atom, 1d, m = -2 + EXPECT_EQ(index_reverse[52], std::make_tuple(1,2,0,0,0)); // C, 3rd atom, 1s + EXPECT_EQ(index_reverse[64], std::make_tuple(1,2,2,0,-2)); // C, 3rd atom, 1d, m = -2 + + tqo.build_ao(ucell.ntype, + "./", + ucell.pseudo_fn, + {}, + GlobalV::qo_thr, + GlobalV::ofs_running, + 0); + EXPECT_EQ(tqo.p_ao()->nchi(), 5); // Si: 1s, 2p, 3d, C: 1s, 2p + EXPECT_EQ(tqo.nchi(), 13); // Si: 1s, 2px, 2py, 2pz, 3dz2, 3dxz, 3dyz, 3dx2-y2, 3dxy, C: 1s, 2px, 2py, 2pz + index.clear(); + index_reverse.clear(); + tqo.radialcollection_indexing(*(tqo.p_ao()), natoms, true, index, index_reverse); + EXPECT_EQ(index.size(), 30); // minimal-nodeless, Si: 1s, 2p, 3d, C: 1s, 2p, Si2C3 + // (1 + 3)*3 + (1 + 3 + 5)*2 = 12 + 18 = 30 + EXPECT_EQ(index_reverse.size(), 30); + // it, ia, l, izeta, m + EXPECT_EQ(index[std::make_tuple(0,0,0,0,0)], 0); // Si, 1st atom, 1s + EXPECT_EQ(index[std::make_tuple(0,0,1,0,0)], 1); // Si, 1st atom, 2px + EXPECT_EQ(index[std::make_tuple(0,0,1,0,1)], 2); // Si, 1st atom, 2py + EXPECT_EQ(index[std::make_tuple(0,0,1,0,-1)], 3); // Si, 1st atom, 2pz + EXPECT_EQ(index[std::make_tuple(0,0,2,0,0)], 4); // Si, 1st atom, 3dz2 + EXPECT_EQ(index[std::make_tuple(0,0,2,0,1)], 5); // Si, 1st atom, 3dxz + EXPECT_EQ(index[std::make_tuple(0,0,2,0,-1)], 6); // Si, 1st atom, 3dyz + EXPECT_EQ(index[std::make_tuple(0,0,2,0,2)], 7); // Si, 1st atom, 3dx2-y2 + EXPECT_EQ(index[std::make_tuple(0,0,2,0,-2)], 8); // Si, 1st atom, 3dxy + EXPECT_EQ(index[std::make_tuple(0,1,0,0,0)], 9); // Si, 2nd atom, 1s + EXPECT_EQ(index[std::make_tuple(0,1,1,0,0)], 10); // Si, 2nd atom, 2px + EXPECT_EQ(index[std::make_tuple(0,1,1,0,1)], 11); // Si, 2nd atom, 2py + EXPECT_EQ(index[std::make_tuple(0,1,1,0,-1)], 12); // Si, 2nd atom, 2pz + EXPECT_EQ(index[std::make_tuple(0,1,2,0,0)], 13); // Si, 2nd atom, 3dz2 + EXPECT_EQ(index[std::make_tuple(0,1,2,0,1)], 14); // Si, 2nd atom + EXPECT_EQ(index[std::make_tuple(0,1,2,0,-1)], 15); + EXPECT_EQ(index[std::make_tuple(0,1,2,0,2)], 16); + EXPECT_EQ(index[std::make_tuple(0,1,2,0,-2)], 17); + EXPECT_EQ(index[std::make_tuple(1,0,0,0,0)], 18); + EXPECT_EQ(index[std::make_tuple(1,0,1,0,0)], 19); + EXPECT_EQ(index[std::make_tuple(1,0,1,0,1)], 20); + EXPECT_EQ(index[std::make_tuple(1,0,1,0,-1)], 21); + EXPECT_EQ(index[std::make_tuple(1,1,0,0,0)], 22); + EXPECT_EQ(index[std::make_tuple(1,1,1,0,0)], 23); + EXPECT_EQ(index[std::make_tuple(1,1,1,0,1)], 24); + EXPECT_EQ(index[std::make_tuple(1,1,1,0,-1)], 25); +} + TEST_F(toQOTest, BuildHydrogenMinimal) { define_fcc_cell(ucell); - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); tqo.build_ao(ucell.ntype, "./", ucell.pseudo_fn, @@ -187,12 +371,18 @@ TEST_F(toQOTest, BuildHydrogenMinimal) EXPECT_EQ(tqo.nchi(), 13); // Si: 1s, 2px, 2py, 2pz, 3dz2, 3dxz, 3dyz, 3dx2-y2, 3dxy, C: 1s, 2px, 2py, 2pz tqo.p_ao()->to_file("special_use_unittest"); } + // the scan_supercell_for_atom() calls TEST_F(toQOTest, Norm2RijSupercell) { define_fcc_cell(ucell); - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); ModuleBase::Vector3 rij(1.0, 0.0, 0.0); EXPECT_EQ(tqo.norm2_rij_supercell(rij, 0, 0, 0), 1.0); // R = 0, 0, 0 EXPECT_EQ(tqo.norm2_rij_supercell(rij, 1, 0, 0), 145.0); @@ -207,8 +397,13 @@ TEST_F(toQOTest, Norm2RijSupercell) TEST_F(toQOTest, ScanSupercellForAtom) { define_fcc_cell(ucell); - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); tqo.build_nao(ucell.ntype, // ntype "./", // orbital_dir ucell.orbital_fn,// orbital_fn @@ -245,7 +440,10 @@ TEST_F(toQOTest, EliminateDuplicateVector3) v.push_back(ModuleBase::Vector3(1, 1, 1)); v.push_back(ModuleBase::Vector3(1, 1, 1)); v.push_back(ModuleBase::Vector3(1, 1, 1)); - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); tqo.eliminate_duplicate_vector3(v); EXPECT_EQ(v.size(), 4); } @@ -253,8 +451,13 @@ TEST_F(toQOTest, EliminateDuplicateVector3) TEST_F(toQOTest, ScanSupercellFCC) { define_fcc_cell(ucell); - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); tqo.build_nao(ucell.ntype, "./", ucell.orbital_fn, @@ -266,15 +469,20 @@ TEST_F(toQOTest, ScanSupercellFCC) GlobalV::qo_thr, GlobalV::ofs_running, 0); - tqo.scan_supercell(); + tqo.scan_supercell(0, 1); EXPECT_EQ(tqo.nR(), 13); } TEST_F(toQOTest, ScanSupercellSC1) { define_sc_cell(ucell); - toQO tqo("hydrogen", {"minimal-nodeless"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("hydrogen", + {"minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); tqo.build_nao(ucell.ntype, "./", ucell.orbital_fn, @@ -287,15 +495,20 @@ TEST_F(toQOTest, ScanSupercellSC1) GlobalV::qo_thr, GlobalV::ofs_running, 0); - tqo.scan_supercell(); + tqo.scan_supercell(0, 1); EXPECT_EQ(tqo.nR(), 19); // 3*3*3 - 8 (corner 111, -1-1-1, etc) } TEST_F(toQOTest, AllocateOvlpMinimal) { define_fcc_cell(ucell); - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); tqo.build_nao(ucell.ntype, "./", ucell.orbital_fn, @@ -312,30 +525,18 @@ TEST_F(toQOTest, AllocateOvlpMinimal) GlobalV::qo_thr, GlobalV::ofs_running, 0); - tqo.scan_supercell(); + tqo.scan_supercell(0, 1); tqo.allocate_ovlp(true); tqo.allocate_ovlp(false); - EXPECT_EQ(tqo.ovlp_R().size(), 1); // in total 25 Rs, therefore 25 ovlp_R. but save_mem, so 1 - EXPECT_EQ(tqo.ovlp_k().size(), tqo.nchi()); // for single kpoint, ao*nao matrix - EXPECT_EQ(tqo.ovlp_R()[0].size(), tqo.nchi()); // for single cell, ao*nao matrix - EXPECT_EQ(tqo.ovlp_k()[0].size(), tqo.nphi()); // for each atomic orbital at single kpoint, get number of nao - EXPECT_EQ(tqo.ovlp_R()[0][0].size(), tqo.nphi()); // similarly + EXPECT_EQ(tqo.ovlpk().size(), tqo.nchi()*tqo.nphi()); // for single kpoint, ao*nao matrix + EXPECT_EQ(tqo.ovlpR().size(), tqo.nchi()*tqo.nphi()); // for single cell, ao*nao matrix // all values in them should be zero or complex zero - for(int iR = 0; iR < tqo.ovlp_R().size(); iR++) - { - for(int i = 0; i < tqo.ovlp_R()[iR].size(); i++) - { - for(int j = 0; j < tqo.ovlp_R()[iR][i].size(); j++) - { - EXPECT_EQ(tqo.ovlp_R()[iR][i][j], 0.0); - } - } - } - for(int i = 0; i < tqo.ovlp_k().size(); i++) + for(int i = 0; i < tqo.nchi(); i++) { - for(int j = 0; j < tqo.ovlp_k()[i].size(); j++) + for(int j = 0; j < tqo.nphi(); j++) { - EXPECT_EQ(tqo.ovlp_k()[i][j], std::complex(0.0, 0.0)); + EXPECT_EQ(tqo.ovlpR(i, j), 0.0); + EXPECT_EQ(tqo.ovlpk(i, j), std::complex(0.0, 0.0)); } } } @@ -344,10 +545,52 @@ TEST_F(toQOTest, Initialize) { define_fcc_cell(ucell); GlobalV::qo_screening_coeff = {}; - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); - std::vector> kvecs_c; - kvecs_c.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point - tqo.initialize(&ucell, kvecs_c); + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.initialize(GlobalV::global_out_dir, + "", + "", + &ucell, + kvecs_d, + GlobalV::ofs_running, + 0, 1); +} + +TEST_F(toQOTest, ReadOvlp) +{ + define_fcc_cell(ucell); + GlobalV::qo_screening_coeff = {}; + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.initialize(GlobalV::global_out_dir, + "", + "", + &ucell, + kvecs_d, + GlobalV::ofs_running, + 0, 1); + int nrows = tqo.nchi(); + int ncols = tqo.nphi(); + tqo.read_ovlp("./support/", nrows, ncols, true, 0); + std::vector ovlpR = tqo.ovlpR(); + EXPECT_EQ(ovlpR.size(), nrows*ncols); + EXPECT_EQ(ovlpR[0], 9.95330157042009e-01); + EXPECT_EQ(ovlpR[1], -7.71640245637438e-02); + EXPECT_EQ(ovlpR[2], 0.00000000000000e+00); + EXPECT_EQ(ovlpR[28], 9.93363417688277e-01); + EXPECT_EQ(ovlpR[55], 9.93363417688277e-01); + EXPECT_EQ(ovlpR[82], 9.93363417688277e-01); + EXPECT_EQ(ovlpR[104], 2.32940220946083e-01); + EXPECT_EQ(ovlpR[105], 3.12427888919456e-01); + EXPECT_EQ(ovlpR[106], 2.26670648341119e-01); } TEST_F(toQOTest, CalculateOvlpR) @@ -355,29 +598,39 @@ TEST_F(toQOTest, CalculateOvlpR) define_fcc_cell(ucell); GlobalV::qo_screening_coeff = {}; GlobalV::qo_thr = 1e-10; - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); - std::vector> kvecs_c; - kvecs_c.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point - tqo.initialize(&ucell, kvecs_c); + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.initialize(GlobalV::global_out_dir, + "", + "", + &ucell, + kvecs_d, + GlobalV::ofs_running, + 0, 1); // find the R = 0,0,0 for(int iR = 0; iR < tqo.nR(); iR++) { - if(tqo.supercells()[iR].x == 0 && tqo.supercells()[iR].y == 0 && tqo.supercells()[iR].z == 0) + if(tqo.supercells()[iR].x == 0 + && tqo.supercells()[iR].y == 0 + && tqo.supercells()[iR].z == 0) { - tqo.calculate_ovlp_R(iR); + tqo.calculate_ovlpR(iR); break; } } + int nrows = tqo.nchi(); + int ncols = tqo.nphi(); // not all elements are zero bool all_zero = true; - for(int i = 0; i < tqo.ovlp_R()[0].size(); i++) + for(int i = 0; i < nrows; i++) { - for(int j = 0; j < tqo.ovlp_R()[0][i].size(); j++) + for(int j = 0; j < ncols; j++) { - if(tqo.ovlp_R()[0][i][j] != 0.0) - { - all_zero = false; - } + if(tqo.ovlpR(i, j) != 0.0) all_zero = false; } } EXPECT_EQ(all_zero, false); @@ -388,30 +641,70 @@ TEST_F(toQOTest, CalculateSelfOvlpRMinimal) define_fcc_cell(ucell); GlobalV::qo_screening_coeff = {}; GlobalV::qo_thr = 1e-10; - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); - std::vector> kvecs_c; - kvecs_c.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point ucell.orbital_fn[0] = "Si_special_use_unittest.orb"; // generated in unittest BuildAo ucell.orbital_fn[1] = "C_special_use_unittest.orb"; // generated in unittest BuildAo ucell.atoms[1].nwl = 1; // only s and p for C - tqo.initialize(&ucell, kvecs_c); + tqo.initialize(GlobalV::global_out_dir, + "", + "", + &ucell, + kvecs_d, + GlobalV::ofs_running, + 0, 1); // find the R = 0,0,0 for(int iR = 0; iR < tqo.nR(); iR++) { if(tqo.supercells()[iR].x == 0 && tqo.supercells()[iR].y == 0 && tqo.supercells()[iR].z == 0) { - tqo.calculate_ovlp_R(iR); + tqo.calculate_ovlpR(iR); break; } } // check if diagonal elements are 1 for(int i = 0; i < tqo.nphi(); i++) { - EXPECT_NEAR(tqo.ovlp_R()[0][i][i], 1.0, 1e-3); // this is too tight for 1s orbital, which fluctuates a lot in narrow region + EXPECT_NEAR(tqo.ovlpR(i, i), 1.0, 1e-3); // this is too tight for 1s orbital, which fluctuates a lot in narrow region } //std::remove("Si_special_use_unittest.orb"); //std::remove("C_special_use_unittest.orb"); - //tqo.write_ovlp(tqo.ovlp_R()[0], "QO_self_ovlp.dat"); + //tqo.write_ovlp(tqo.ovlpR()[0], "QO_self_ovlp.dat"); +} + +TEST_F(toQOTest, AppendOvlpReiRk) +{ + define_fcc_cell(ucell); + GlobalV::qo_screening_coeff = {}; + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.initialize(GlobalV::global_out_dir, + "", + "", + &ucell, + kvecs_d, + GlobalV::ofs_running, + 0, 1); + int nrows = tqo.nchi(); + int ncols = tqo.nphi(); + tqo.read_ovlp("./support/", nrows, ncols, true, 0); + std::vector ovlpR = tqo.ovlpR(); + tqo.zero_out_ovlps(false); + tqo.append_ovlpR_eiRk(0, 0); + std::vector> ovlpk = tqo.ovlpk(); + for(int i = 0; i < nrows*ncols; i++) + { + EXPECT_NEAR(ovlpk[i].real(), ovlpR[i], 1e-10); + EXPECT_NEAR(ovlpk[i].imag(), 0.0, 1e-10); + } } TEST_F(toQOTest, CalculateSelfOvlpKSymmetrical) @@ -419,37 +712,52 @@ TEST_F(toQOTest, CalculateSelfOvlpKSymmetrical) define_fcc_cell(ucell); GlobalV::qo_thr = 1e-10; GlobalV::qo_screening_coeff = {}; - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); - std::vector> kvecs_c; - kvecs_c.push_back(ModuleBase::Vector3(-0.25, -0.25, -0.25)); // pair 1 - kvecs_c.push_back(ModuleBase::Vector3(0.25, 0.25, 0.25)); - kvecs_c.push_back(ModuleBase::Vector3(-0.25, 0.25, 0.25)); // pair 2 - kvecs_c.push_back(ModuleBase::Vector3(0.25, -0.25, -0.25)); - kvecs_c.push_back(ModuleBase::Vector3(-0.25, -0.25, 0.25)); // pair 3 - kvecs_c.push_back(ModuleBase::Vector3(0.25, 0.25, -0.25)); - kvecs_c.push_back(ModuleBase::Vector3(-0.25, 0.25, -0.25)); // pair 4 - kvecs_c.push_back(ModuleBase::Vector3(0.25, -0.25, 0.25)); - kvecs_c.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); ucell.orbital_fn[0] = "Si_special_use_unittest.orb"; // generated in unittest BuildAo ucell.orbital_fn[1] = "C_special_use_unittest.orb"; // generated in unittest BuildAo ucell.atoms[1].nwl = 1; // only s and p for C - tqo.initialize(&ucell, kvecs_c); - // test symmetry cancellation on pair1 - tqo.calculate_ovlp_k(0); - std::vector>> ovlp_k_1 = tqo.ovlp_k(); - tqo.calculate_ovlp_k(1); - std::vector>> ovlp_k_2 = tqo.ovlp_k(); + + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(-0.25, -0.25, -0.25)); // pair 1 + kvecs_d.push_back(ModuleBase::Vector3(0.25, 0.25, 0.25)); + kvecs_d.push_back(ModuleBase::Vector3(-0.25, 0.25, 0.25)); // pair 2 + kvecs_d.push_back(ModuleBase::Vector3(0.25, -0.25, -0.25)); + kvecs_d.push_back(ModuleBase::Vector3(-0.25, -0.25, 0.25)); // pair 3 + kvecs_d.push_back(ModuleBase::Vector3(0.25, 0.25, -0.25)); + kvecs_d.push_back(ModuleBase::Vector3(-0.25, 0.25, -0.25)); // pair 4 + kvecs_d.push_back(ModuleBase::Vector3(0.25, -0.25, 0.25)); + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma + + tqo.initialize(GlobalV::global_out_dir, + "", + "", + &ucell, + kvecs_d, + GlobalV::ofs_running, + 0, 1); + // test symmetry cancellation on pair1s + int nrows = tqo.nchi(); + int ncols = tqo.nphi(); + + tqo.calculate_ovlpk(0); + std::vector> ovlpk_1 = tqo.ovlpk(); + tqo.calculate_ovlpk(1); + std::vector> ovlpk_2 = tqo.ovlpk(); + bool all_zero = true; // check if all imaginary parts are cancelled - for(int i = 0; i < ovlp_k_1.size(); i++) + for(int i = 0; i < nrows; i++) { - for(int j = 0; j < ovlp_k_1[i].size(); j++) + for(int j = 0; j < ncols; j++) { // R = 0, 0, 0, then unfolding kphase would be e-ikR = 1, // becomes direct summation over kpoints - std::complex ovlp_R_ij = ovlp_k_1[i][j] + ovlp_k_2[i][j]; - EXPECT_NEAR(ovlp_R_ij.imag(), 0.0, 1e-10); - if(ovlp_R_ij.real() > 1e-10) + std::complex ovlpR_ij = ovlpk_1[i*ncols+j] + ovlpk_2[i*ncols+j]; + EXPECT_NEAR(ovlpR_ij.imag(), 0.0, 1e-10); + if(ovlpR_ij.real() > 1e-10) { all_zero = false; } @@ -457,21 +765,21 @@ TEST_F(toQOTest, CalculateSelfOvlpKSymmetrical) } EXPECT_FALSE(all_zero); // test symmetry cancellation on pair2 - tqo.calculate_ovlp_k(2); - std::vector>> ovlp_k_3 = tqo.ovlp_k(); - tqo.calculate_ovlp_k(3); - std::vector>> ovlp_k_4 = tqo.ovlp_k(); + tqo.calculate_ovlpk(2); + std::vector> ovlpk_3 = tqo.ovlpk(); + tqo.calculate_ovlpk(3); + std::vector> ovlpk_4 = tqo.ovlpk(); all_zero = true; // check if all imaginary parts are cancelled - for(int i = 0; i < ovlp_k_3.size(); i++) + for(int i = 0; i < nrows; i++) { - for(int j = 0; j < ovlp_k_3[i].size(); j++) + for(int j = 0; j < ncols; j++) { // R = 0, 0, 0, then unfolding kphase would be e-ikR = 1, // becomes direct summation over kpoints - std::complex ovlp_R_ij = ovlp_k_3[i][j] + ovlp_k_4[i][j]; - EXPECT_NEAR(ovlp_R_ij.imag(), 0.0, 1e-10); - if(ovlp_R_ij.real() > 1e-10) + std::complex ovlpR_ij = ovlpk_3[i*ncols+j] + ovlpk_4[i*ncols+j]; + EXPECT_NEAR(ovlpR_ij.imag(), 0.0, 1e-10); + if(ovlpR_ij.real() > 1e-10) { all_zero = false; } @@ -479,21 +787,21 @@ TEST_F(toQOTest, CalculateSelfOvlpKSymmetrical) } EXPECT_FALSE(all_zero); // test symmetry cancellation on pair3 - tqo.calculate_ovlp_k(4); - std::vector>> ovlp_k_5 = tqo.ovlp_k(); - tqo.calculate_ovlp_k(5); - std::vector>> ovlp_k_6 = tqo.ovlp_k(); + tqo.calculate_ovlpk(4); + std::vector> ovlpk_5 = tqo.ovlpk(); + tqo.calculate_ovlpk(5); + std::vector> ovlpk_6 = tqo.ovlpk(); all_zero = true; // check if all imaginary parts are cancelled - for(int i = 0; i < ovlp_k_5.size(); i++) + for(int i = 0; i < nrows; i++) { - for(int j = 0; j < ovlp_k_5[i].size(); j++) + for(int j = 0; j < ncols; j++) { // R = 0, 0, 0, then unfolding kphase would be e-ikR = 1, // becomes direct summation over kpoints - std::complex ovlp_R_ij = ovlp_k_5[i][j] + ovlp_k_6[i][j]; - EXPECT_NEAR(ovlp_R_ij.imag(), 0.0, 1e-10); - if(ovlp_R_ij.real() > 1e-10) + std::complex ovlpR_ij = ovlpk_5[i*ncols+j] + ovlpk_6[i*ncols+j]; + EXPECT_NEAR(ovlpR_ij.imag(), 0.0, 1e-10); + if(ovlpR_ij.real() > 1e-10) { all_zero = false; } @@ -501,21 +809,21 @@ TEST_F(toQOTest, CalculateSelfOvlpKSymmetrical) } EXPECT_FALSE(all_zero); // test symmetry cancellation on pair4 - tqo.calculate_ovlp_k(6); - std::vector>> ovlp_k_7 = tqo.ovlp_k(); - tqo.calculate_ovlp_k(7); - std::vector>> ovlp_k_8 = tqo.ovlp_k(); + tqo.calculate_ovlpk(6); + std::vector> ovlpk_7 = tqo.ovlpk(); + tqo.calculate_ovlpk(7); + std::vector> ovlpk_8 = tqo.ovlpk(); all_zero = true; // check if all imaginary parts are cancelled - for(int i = 0; i < ovlp_k_7.size(); i++) + for(int i = 0; i < nrows; i++) { - for(int j = 0; j < ovlp_k_7[i].size(); j++) + for(int j = 0; j < ncols; j++) { // R = 0, 0, 0, then unfolding kphase would be e-ikR = 1, // becomes direct summation over kpoints - std::complex ovlp_R_ij = ovlp_k_7[i][j] + ovlp_k_8[i][j]; - EXPECT_NEAR(ovlp_R_ij.imag(), 0.0, 1e-10); - if(ovlp_R_ij.real() > 1e-10) + std::complex ovlpR_ij = ovlpk_7[i*ncols+j] + ovlpk_8[i*ncols+j]; + EXPECT_NEAR(ovlpR_ij.imag(), 0.0, 1e-10); + if(ovlpR_ij.real() > 1e-10) { all_zero = false; } @@ -523,18 +831,18 @@ TEST_F(toQOTest, CalculateSelfOvlpKSymmetrical) } EXPECT_FALSE(all_zero); // test symmetry cancellation on pair5 - tqo.calculate_ovlp_k(8); - std::vector>> ovlp_k_9 = tqo.ovlp_k(); + tqo.calculate_ovlpk(8); + std::vector> ovlpk_9 = tqo.ovlpk(); all_zero = true; // check if all imaginary parts are cancelled - for(int i = 0; i < ovlp_k_9.size(); i++) + for(int i = 0; i < nrows; i++) { - for(int j = 0; j < ovlp_k_9[i].size(); j++) + for(int j = 0; j < ncols; j++) { // R = 0, 0, 0, then unfolding kphase would be e-ikR = 1, // becomes direct summation over kpoints - EXPECT_NEAR(ovlp_k_9[i][j].imag(), 0.0, 1e-10); - if(ovlp_k_9[i][j].real() > 1e-10) + EXPECT_NEAR(ovlpk_9[i*ncols+j].imag(), 0.0, 1e-10); + if(ovlpk_9[i*ncols+j].real() > 1e-10) { all_zero = false; } @@ -543,15 +851,24 @@ TEST_F(toQOTest, CalculateSelfOvlpKSymmetrical) EXPECT_FALSE(all_zero); std::remove("Si_special_use_unittest.orb"); std::remove("C_special_use_unittest.orb"); - //tqo.write_ovlp(tqo.ovlp_R()[0], "QO_self_ovlp.dat"); + for(int iR = 0; iR < tqo.nR(); iR++) + { + std::string fovlpR = "QO_ovlpR_" + std::to_string(iR) + ".dat"; + std::remove(fovlpR.c_str()); + } + //tqo.write_ovlp(tqo.ovlpR()[0], "QO_self_ovlp.dat"); } TEST_F(toQOTest, BuildHydrogenFull) { define_fcc_cell(ucell); GlobalV::qo_thr = 1e-10; - toQO tqo("hydrogen", {"full", "full"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("hydrogen", {"full", "full"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); GlobalV::qo_thr = 1e-10; tqo.build_ao(ucell.ntype, "./", @@ -570,48 +887,174 @@ TEST_F(toQOTest, CalculateSelfOvlpRFull) define_fcc_cell(ucell); GlobalV::qo_thr = 1e-10; GlobalV::qo_screening_coeff = {}; - toQO tqo("hydrogen", {"full", "full"}); - std::vector> kvecs_c; - kvecs_c.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + toQO tqo("hydrogen", {"full", "full"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point ucell.orbital_fn[0] = "Si_special_use_unittest.orb"; // generated in unittest BuildAo ucell.orbital_fn[1] = "C_special_use_unittest.orb"; // generated in unittest BuildAo ucell.atoms[1].nwl = 1; // only s and p for C GlobalV::qo_thr = 1e-10; - tqo.initialize(&ucell, kvecs_c); + tqo.initialize(GlobalV::global_out_dir, + "", + "", + &ucell, + kvecs_d, + GlobalV::ofs_running, + 0, 1); // find the R = 0,0,0 for(int iR = 0; iR < tqo.nR(); iR++) { if(tqo.supercells()[iR].x == 0 && tqo.supercells()[iR].y == 0 && tqo.supercells()[iR].z == 0) { - tqo.calculate_ovlp_R(iR); + tqo.calculate_ovlpR(iR); break; } } // check if diagonal elements are 1 for(int i = 0; i < tqo.nphi(); i++) { - EXPECT_NEAR(tqo.ovlp_R()[0][i][i], 1.0, 5e-4); // this is too tight for 1s orbital, which fluctuates a lot in narrow region + EXPECT_NEAR(tqo.ovlpR(i, i), 1.0, 5e-4); // this is too tight for 1s orbital, which fluctuates a lot in narrow region } // check if symmetrical for(int i = 0; i < tqo.nchi(); i++) { for(int j = 0; j < tqo.nphi(); j++) { - EXPECT_NEAR(tqo.ovlp_R()[0][i][j], tqo.ovlp_R()[0][j][i], 1e-8); + EXPECT_NEAR(tqo.ovlpR(i, j), tqo.ovlpR(j, i), 1e-8); } } std::remove("Si_special_use_unittest.orb"); std::remove("C_special_use_unittest.orb"); - //tqo.write_ovlp(tqo.ovlp_R()[0], "QO_self_ovlp.dat"); + //tqo.write_ovlp(tqo.ovlpR()[0], "QO_self_ovlp.dat"); } /* Si_dojo_soc.upf is special: two p orbitals, one s orbital */ +/* Prerequisite: orbital filter, filters out not needed orbitals */ +TEST_F(toQOTest, OrbitalFilterOut) +{ + define_fcc_cell(ucell); + GlobalV::qo_thr = 1e-10; + GlobalV::qo_screening_coeff = {}; + // because qo_basis hydrogen doesnot have needs to filter out any orbitals, it should be always true + toQO tqo("hydrogen", {"full", "full"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + EXPECT_FALSE(tqo.orbital_filter_out(0, 0, 0)); // Si 1s + EXPECT_FALSE(tqo.orbital_filter_out(0, 0, 1)); // Si 2s + EXPECT_FALSE(tqo.orbital_filter_out(0, 1, 0)); // Si 2p -> 3 + EXPECT_FALSE(tqo.orbital_filter_out(0, 0, 2)); // Si 3s + EXPECT_FALSE(tqo.orbital_filter_out(0, 1, 1)); // Si 3p -> 3 + EXPECT_FALSE(tqo.orbital_filter_out(0, 2, 0)); // Si 3d -> 5 + EXPECT_FALSE(tqo.orbital_filter_out(1, 0, 0)); // C 1s + EXPECT_FALSE(tqo.orbital_filter_out(1, 0, 1)); // C 2s + EXPECT_FALSE(tqo.orbital_filter_out(1, 1, 0)); // C 2p -> 3 + // therefore in total we should have 1 + 1 + 3 + 1 + 3 + 5 + 1 + 1 + 3 = 19 orbitals + // distinguished by (it, ia, l, zeta, m) + + // if change to pswfc, then it should filter out some orbitals according to qo_strategy + GlobalV::qo_screening_coeff = {0.5, 0.5}; + toQO tqo2("pswfc", {"s", "s"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + // for pswfc specifying l, filter does not care about number of zeta + for(int it = 0; it < 2; it++) + { + for(int l = 0; l < 100; l++) // any number of l are okay, because filter just want l = 0 + { + for(int z = 0; z < 100; z++) + { + if(l == 0) EXPECT_FALSE(tqo2.orbital_filter_out(it, l, z)); + else EXPECT_TRUE(tqo2.orbital_filter_out(it, l, z)); + } + } + } + // next test with random ordered arranged names of subshell + toQO tqo3("pswfc", {"sfdp", "pdf"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + for(int l = 0; l < 100; l++) + { + for(int z = 0; z < 100; z++) + { + if(l == 0) + { + EXPECT_FALSE(tqo3.orbital_filter_out(0, l, z)); + EXPECT_TRUE(tqo3.orbital_filter_out(1, l, z)); + } + else if(l < 4) + { + EXPECT_FALSE(tqo3.orbital_filter_out(0, l, z)); + EXPECT_FALSE(tqo3.orbital_filter_out(1, l, z)); + } + else + { + EXPECT_TRUE(tqo3.orbital_filter_out(0, l, z)); + EXPECT_TRUE(tqo3.orbital_filter_out(1, l, z)); + } + } + } + // test combination `all` with `s` + toQO tqo4("pswfc", {"all", "p"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + for(int l = 0; l < 100; l++) + { + for(int z = 0; z < 100; z++) + { + if(l == 1) EXPECT_FALSE(tqo4.orbital_filter_out(1, l, z)); + else EXPECT_TRUE(tqo4.orbital_filter_out(1, l, z)); + EXPECT_FALSE(tqo4.orbital_filter_out(0, l, z)); // do not filter out anything + } + } + // test szv, which controls both l and zeta + toQO tqo5("szv", {"sdp", "spdfg"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + // for 2 is given as lmax, l can only be 0, 1 and 2, izeta can only be 0 + for(int l = 0; l < 100; l++) + { + for(int z = 0; z < 100; z++) + { + // any not single zeta orbitals are not valid + if(z != 0) + { + EXPECT_TRUE(tqo5.orbital_filter_out(0, l, z)); + EXPECT_TRUE(tqo5.orbital_filter_out(1, l, z)); + } + else + { + if(l <= 2) + { + EXPECT_FALSE(tqo5.orbital_filter_out(0, l, z)); + EXPECT_FALSE(tqo5.orbital_filter_out(1, l, z)); + } + else if(l <= 4) + { + EXPECT_TRUE(tqo5.orbital_filter_out(0, l, z)); + EXPECT_FALSE(tqo5.orbital_filter_out(1, l, z)); + } + else + { + EXPECT_TRUE(tqo5.orbital_filter_out(0, l, z)); + EXPECT_TRUE(tqo5.orbital_filter_out(1, l, z)); + } + } + } + } +} + TEST_F(toQOTest, BuildPswfcPartial1) { define_fcc_cell(ucell); - toQO tqo("pswfc", {"s", "s"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("pswfc", {"s", "s"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); tqo.build_ao(ucell.ntype, "./", ucell.pseudo_fn, @@ -626,8 +1069,12 @@ TEST_F(toQOTest, BuildPswfcPartial1) TEST_F(toQOTest, BuildPswfcPartial2) { define_fcc_cell(ucell); - toQO tqo("pswfc", {"ps", "s"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("pswfc", {"ps", "s"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); tqo.build_ao(ucell.ntype, "./", ucell.pseudo_fn, @@ -642,8 +1089,12 @@ TEST_F(toQOTest, BuildPswfcPartial2) TEST_F(toQOTest, BuildPswfcPartial3) { define_fcc_cell(ucell); - toQO tqo("pswfc", {"all", "p"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("pswfc", {"all", "p"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); tqo.build_ao(ucell.ntype, "./", ucell.pseudo_fn, @@ -652,15 +1103,19 @@ TEST_F(toQOTest, BuildPswfcPartial3) GlobalV::ofs_running, 0); EXPECT_EQ(tqo.p_ao()->nchi(), 5); // AO will always read and import all orbitals - EXPECT_EQ(tqo.nchi(), 10); + EXPECT_EQ(tqo.nchi(), 10); // (3+3+1)+(3) = 10 } TEST_F(toQOTest, BuildPswfcAll) { define_fcc_cell(ucell); GlobalV::qo_thr = 1e-10; - toQO tqo("pswfc", {"all", "all"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("pswfc", {"all", "all"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); tqo.build_ao(ucell.ntype, "./", ucell.pseudo_fn, @@ -676,8 +1131,12 @@ TEST_F(toQOTest, BuildPswfcAll) TEST_F(toQOTest, ScanSupercellSC2) { define_sc_cell(ucell); - toQO tqo("pswfc", {"all"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("pswfc", {"all"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); tqo.build_nao(ucell.ntype, "./", ucell.orbital_fn, @@ -691,15 +1150,19 @@ TEST_F(toQOTest, ScanSupercellSC2) GlobalV::qo_thr, GlobalV::ofs_running, 0); // radius = 13.6 Bohr - tqo.scan_supercell(); + tqo.scan_supercell(0, 1); EXPECT_EQ(tqo.nR(), 81); // 5*5*5 - 12(edge center) - 8*4(corner) } TEST_F(toQOTest, ScanSupercellSC3) { define_sc_cell(ucell); - toQO tqo("pswfc", {"all"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("pswfc", {"all"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); tqo.build_nao(ucell.ntype, "./", ucell.orbital_fn, @@ -713,7 +1176,7 @@ TEST_F(toQOTest, ScanSupercellSC3) GlobalV::qo_thr, GlobalV::ofs_running, 0); // radius = 13.6 Bohr - tqo.scan_supercell(); + tqo.scan_supercell(0, 1); EXPECT_EQ(tqo.nR(), 57); // 5*5*5 - 12(edge center) - 8*(8-1)(corner) = 5*5*5 - 12(edge center) - 8*(2*2*2-1)(corner) GlobalV::qo_screening_coeff[0] = 0.1; } @@ -721,8 +1184,12 @@ TEST_F(toQOTest, ScanSupercellSC3) TEST_F(toQOTest, ScanSupercellSC4) { define_sc_cell(ucell); - toQO tqo("pswfc", {"all"}); - tqo.unwrap_unitcell(&ucell); + toQO tqo("pswfc", {"all"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.read_structures(&ucell, kvecs_d, 0, 1); tqo.build_nao(ucell.ntype, "./", ucell.orbital_fn, @@ -736,7 +1203,7 @@ TEST_F(toQOTest, ScanSupercellSC4) GlobalV::qo_thr, GlobalV::ofs_running, 0); // radius = 13.6 Bohr - tqo.scan_supercell(); + tqo.scan_supercell(0, 1); EXPECT_EQ(tqo.nR(), 33); // 3*3*3 + 6(face) GlobalV::qo_screening_coeff[0] = 0.1; } @@ -745,34 +1212,42 @@ TEST_F(toQOTest, CalculateSelfOvlpRPswfc) { define_fcc_cell(ucell); GlobalV::qo_thr = 1e-10; - toQO tqo("pswfc", {"all", "all"}); - std::vector> kvecs_c; - kvecs_c.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + toQO tqo("pswfc", {"all", "all"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point ucell.orbital_fn[0] = "Si_special_use_unittest.orb"; // generated in unittest BuildAo ucell.orbital_fn[1] = "C_special_use_unittest.orb"; // generated in unittest BuildAo ucell.atoms[1].nwl = 1; // only s and p for C //GlobalV::qo_thr = 1e-10; - tqo.initialize(&ucell, kvecs_c); + tqo.initialize(GlobalV::global_out_dir, + "", + "", + &ucell, + kvecs_d, + GlobalV::ofs_running, + 0, 1); // find the R = 0,0,0 for(int iR = 0; iR < tqo.nR(); iR++) { if(tqo.supercells()[iR].x == 0 && tqo.supercells()[iR].y == 0 && tqo.supercells()[iR].z == 0) { - tqo.calculate_ovlp_R(iR); + tqo.calculate_ovlpR(iR); break; } } // check if diagonal elements are 1 for(int i = 0; i < tqo.nphi(); i++) { - EXPECT_NEAR(tqo.ovlp_R()[0][i][i], 1.0, 1e-4); + EXPECT_NEAR(tqo.ovlpR(i, i), 1.0, 1e-4); } // check if symmetrical for(int i = 0; i < tqo.nchi(); i++) { for(int j = 0; j < tqo.nphi(); j++) { - EXPECT_NEAR(tqo.ovlp_R()[0][i][j], tqo.ovlp_R()[0][j][i], 1e-4); + EXPECT_NEAR(tqo.ovlpR(i, j), tqo.ovlpR(j, i), 1e-4); } } std::remove("Si_special_use_unittest.orb"); @@ -784,24 +1259,40 @@ TEST_F(toQOTest, CalculateOvlpKGamma) define_fcc_cell(ucell); GlobalV::qo_thr = 1e-10; GlobalV::qo_screening_coeff = {}; - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); - std::vector> kvecs_c; - kvecs_c.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point - tqo.initialize(&ucell, kvecs_c); - tqo.calculate_ovlp_k(0); + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.initialize(GlobalV::global_out_dir, + "", + "", + &ucell, + kvecs_d, + GlobalV::ofs_running, + 0, 1); + tqo.calculate_ovlpk(0); + int nrows = tqo.nchi(); + int ncols = tqo.nphi(); // all should be real numbers at Gamma point bool all_real = true; - for(int i = 0; i < tqo.ovlp_k().size(); i++) + for(int i = 0; i < nrows; i++) { - for(int j = 0; j < tqo.ovlp_k()[i].size(); j++) + for(int j = 0; j < ncols; j++) { - if(tqo.ovlp_k()[i][j].imag() != 0.0) + if(tqo.ovlpk()[i*ncols+j].imag() != 0.0) { all_real = false; } } } EXPECT_TRUE(all_real); + for(int iR = 0; iR < tqo.nR(); iR++) + { + std::string fovlpk = "QO_ovlpk_" + std::to_string(iR) + ".dat"; + std::remove(fovlpk.c_str()); + } } TEST_F(toQOTest, CalculateOvlpKSlaterGamma) @@ -809,24 +1300,39 @@ TEST_F(toQOTest, CalculateOvlpKSlaterGamma) define_fcc_cell(ucell); GlobalV::qo_thr = 1e-10; GlobalV::qo_screening_coeff = {0.1}; - toQO tqo("hydrogen", {"energy-full", "energy-full"}); - std::vector> kvecs_c; - kvecs_c.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point - tqo.initialize(&ucell, kvecs_c); - tqo.calculate_ovlp_k(0); + toQO tqo("hydrogen", {"energy-full", "energy-full"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + tqo.initialize(GlobalV::global_out_dir, + "", + "", + &ucell, + kvecs_d, + GlobalV::ofs_running, + 0, 1); + tqo.calculate_ovlpk(0); + int nrows = tqo.nchi(); + int ncols = tqo.nphi(); // all should be real numbers at Gamma point bool all_real = true; - for(int i = 0; i < tqo.ovlp_k().size(); i++) + for(int i = 0; i < nrows; i++) { - for(int j = 0; j < tqo.ovlp_k()[i].size(); j++) + for(int j = 0; j < ncols; j++) { - if(tqo.ovlp_k()[i][j].imag() != 0.0) + if(tqo.ovlpk()[i*ncols+j].imag() != 0.0) { all_real = false; } } } EXPECT_TRUE(all_real); + for(int iR = 0; iR < tqo.nR(); iR++) + { + std::string fovlpk = "QO_ovlpk_" + std::to_string(iR) + ".dat"; + std::remove(fovlpk.c_str()); + } } TEST_F(toQOTest, CalculateSelfOvlpKPswfcSymmetrical) @@ -834,93 +1340,112 @@ TEST_F(toQOTest, CalculateSelfOvlpKPswfcSymmetrical) define_fcc_cell(ucell); GlobalV::qo_thr = 1e-10; GlobalV::qo_screening_coeff = {2.0, 2.0}; - toQO tqo("pswfc", {"all", "all"}); - std::vector> kvecs_c; - kvecs_c.push_back(ModuleBase::Vector3(-0.25, -0.25, -0.25)); // pair 1 - kvecs_c.push_back(ModuleBase::Vector3(0.25, 0.25, 0.25)); - kvecs_c.push_back(ModuleBase::Vector3(-0.25, 0.25, 0.25)); // pair 2 - kvecs_c.push_back(ModuleBase::Vector3(0.25, -0.25, -0.25)); - kvecs_c.push_back(ModuleBase::Vector3(-0.25, -0.25, 0.25)); // pair 3 - kvecs_c.push_back(ModuleBase::Vector3(0.25, 0.25, -0.25)); - kvecs_c.push_back(ModuleBase::Vector3(-0.25, 0.25, -0.25)); // pair 4 - kvecs_c.push_back(ModuleBase::Vector3(0.25, -0.25, 0.25)); - kvecs_c.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma - tqo.initialize(&ucell, kvecs_c); - std::cout << "Number of supercells: " << tqo.nR() << ", number of kpoints: " << tqo.nkpts() << std::endl; - tqo.calculate_ovlp_k(0); - std::vector>> ovlp_k_1 = tqo.ovlp_k(); - tqo.calculate_ovlp_k(1); - std::vector>> ovlp_k_2 = tqo.ovlp_k(); + toQO tqo("pswfc", {"all", "all"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(-0.25, -0.25, -0.25)); // pair 1 + kvecs_d.push_back(ModuleBase::Vector3(0.25, 0.25, 0.25)); + kvecs_d.push_back(ModuleBase::Vector3(-0.25, 0.25, 0.25)); // pair 2 + kvecs_d.push_back(ModuleBase::Vector3(0.25, -0.25, -0.25)); + kvecs_d.push_back(ModuleBase::Vector3(-0.25, -0.25, 0.25)); // pair 3 + kvecs_d.push_back(ModuleBase::Vector3(0.25, 0.25, -0.25)); + kvecs_d.push_back(ModuleBase::Vector3(-0.25, 0.25, -0.25)); // pair 4 + kvecs_d.push_back(ModuleBase::Vector3(0.25, -0.25, 0.25)); + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma + + tqo.initialize(GlobalV::global_out_dir, + "", + "", + &ucell, + kvecs_d, + GlobalV::ofs_running, + 0, 1); + int nrows = tqo.nchi(); + int ncols = tqo.nphi(); + EXPECT_EQ(nrows, 11); + EXPECT_EQ(ncols, 26); + std::cout << "Number of supercells: " << tqo.nR() << ", number of kpoints: " << tqo.nks() << std::endl; + tqo.calculate_ovlpk(0); + std::vector> ovlpk_1 = tqo.ovlpk(); + tqo.calculate_ovlpk(1); + std::vector> ovlpk_2 = tqo.ovlpk(); // check if all imaginary parts are cancelled bool all_real = true; - for(int i = 0; i < ovlp_k_1.size(); i++) + for(int i = 0; i < nrows; i++) { - for(int j = 0; j < ovlp_k_1[i].size(); j++) + for(int j = 0; j < ncols; j++) { // R = 0, 0, 0, then unfolding kphase would be e-ikR = 1, // becomes direct summation over kpoints - std::complex ovlp_R_ij = ovlp_k_1[i][j] + ovlp_k_2[i][j]; - EXPECT_NEAR(ovlp_R_ij.imag(), 0.0, 1e-8); + std::complex ovlpR_ij = ovlpk_1[i*ncols+j] + ovlpk_2[i*ncols+j]; + EXPECT_NEAR(ovlpR_ij.imag(), 0.0, 1e-8); } } - tqo.calculate_ovlp_k(2); - std::vector>> ovlp_k_3 = tqo.ovlp_k(); - tqo.calculate_ovlp_k(3); - std::vector>> ovlp_k_4 = tqo.ovlp_k(); + tqo.calculate_ovlpk(2); + std::vector> ovlpk_3 = tqo.ovlpk(); + tqo.calculate_ovlpk(3); + std::vector> ovlpk_4 = tqo.ovlpk(); // check if all imaginary parts are cancelled - for(int i = 0; i < ovlp_k_3.size(); i++) + for(int i = 0; i < nrows; i++) { - for(int j = 0; j < ovlp_k_3[i].size(); j++) + for(int j = 0; j < ncols; j++) { // R = 0, 0, 0, then unfolding kphase would be e-ikR = 1, // becomes direct summation over kpoints - std::complex ovlp_R_ij = ovlp_k_3[i][j] + ovlp_k_4[i][j]; - EXPECT_NEAR(ovlp_R_ij.imag(), 0.0, 1e-8); + std::complex ovlpR_ij = ovlpk_3[i*ncols+j] + ovlpk_4[i*ncols+j]; + EXPECT_NEAR(ovlpR_ij.imag(), 0.0, 1e-8); } } - tqo.calculate_ovlp_k(4); - std::vector>> ovlp_k_5 = tqo.ovlp_k(); - tqo.calculate_ovlp_k(5); - std::vector>> ovlp_k_6 = tqo.ovlp_k(); + tqo.calculate_ovlpk(4); + std::vector> ovlpk_5 = tqo.ovlpk(); + tqo.calculate_ovlpk(5); + std::vector> ovlpk_6 = tqo.ovlpk(); // check if all imaginary parts are cancelled - for(int i = 0; i < ovlp_k_5.size(); i++) + for(int i = 0; i < nrows; i++) { - for(int j = 0; j < ovlp_k_5[i].size(); j++) + for(int j = 0; j < ncols; j++) { // R = 0, 0, 0, then unfolding kphase would be e-ikR = 1, // becomes direct summation over kpoints - std::complex ovlp_R_ij = ovlp_k_5[i][j] + ovlp_k_6[i][j]; - EXPECT_NEAR(ovlp_R_ij.imag(), 0.0, 1e-8); + std::complex ovlpR_ij = ovlpk_5[i*ncols+j] + ovlpk_6[i*ncols+j]; + EXPECT_NEAR(ovlpR_ij.imag(), 0.0, 1e-8); } } - tqo.calculate_ovlp_k(6); - std::vector>> ovlp_k_7 = tqo.ovlp_k(); - tqo.calculate_ovlp_k(7); - std::vector>> ovlp_k_8 = tqo.ovlp_k(); + tqo.calculate_ovlpk(6); + std::vector> ovlpk_7 = tqo.ovlpk(); + tqo.calculate_ovlpk(7); + std::vector> ovlpk_8 = tqo.ovlpk(); // check if all imaginary parts are cancelled - for(int i = 0; i < ovlp_k_7.size(); i++) + for(int i = 0; i < nrows; i++) { - for(int j = 0; j < ovlp_k_7[i].size(); j++) + for(int j = 0; j < ncols; j++) { // R = 0, 0, 0, then unfolding kphase would be e-ikR = 1, // becomes direct summation over kpoints - std::complex ovlp_R_ij = ovlp_k_7[i][j] + ovlp_k_8[i][j]; - EXPECT_NEAR(ovlp_R_ij.imag(), 0.0, 1e-8); + std::complex ovlpR_ij = ovlpk_7[i*ncols+j] + ovlpk_8[i*ncols+j]; + EXPECT_NEAR(ovlpR_ij.imag(), 0.0, 1e-8); } } - tqo.calculate_ovlp_k(8); - std::vector>> ovlp_k_9 = tqo.ovlp_k(); + tqo.calculate_ovlpk(8); + std::vector> ovlpk_9 = tqo.ovlpk(); // check if all imaginary parts are cancelled - for(int i = 0; i < ovlp_k_9.size(); i++) + for(int i = 0; i < nrows; i++) { - for(int j = 0; j < ovlp_k_9[i].size(); j++) + for(int j = 0; j < ncols; j++) { // R = 0, 0, 0, then unfolding kphase would be e-ikR = 1, // becomes direct summation over kpoints - EXPECT_NEAR(ovlp_k_9[i][j].imag(), 0.0, 1e-8); + EXPECT_NEAR(ovlpk_9[i*ncols+j].imag(), 0.0, 1e-8); } } - //tqo.write_ovlp(tqo.ovlp_R()[0], "QO_self_ovlp.dat"); + //tqo.write_ovlp(tqo.ovlpR()[0], "QO_self_ovlp.dat"); + for(int iR = 0; iR < tqo.nR(); iR++) + { + std::string fovlpR = "QO_ovlpR_" + std::to_string(iR) + ".dat"; + std::remove(fovlpR.c_str()); + } } TEST_F(toQOTest, CalculateHydrogenlike) @@ -928,19 +1453,30 @@ TEST_F(toQOTest, CalculateHydrogenlike) define_fcc_cell(ucell); GlobalV::qo_thr = 1e-10; GlobalV::qo_screening_coeff = {}; - toQO tqo("hydrogen", {"minimal-nodeless", "minimal-nodeless"}); - std::vector> kvecs_c; - kvecs_c.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point - kvecs_c.push_back(ModuleBase::Vector3(0.5, 0.0, 0.0)); - tqo.initialize(&ucell, kvecs_c); + toQO tqo("hydrogen", + {"minimal-nodeless", "minimal-nodeless"}, + GlobalV::qo_thr, + GlobalV::qo_screening_coeff); + std::vector> kvecs_d; + kvecs_d.push_back(ModuleBase::Vector3(0.0, 0.0, 0.0)); // Gamma point + kvecs_d.push_back(ModuleBase::Vector3(0.5, 0.0, 0.0)); + tqo.initialize(GlobalV::global_out_dir, + "", + "", + &ucell, + kvecs_d, + GlobalV::ofs_running, + 0, 1); tqo.calculate(); + int nrows = tqo.nchi(); + int ncols = tqo.nphi(); // for the latest kpoint, not all numbers are complex zero bool all_zero = true; - for(int i = 0; i < tqo.ovlp_k().size(); i++) + for(int i = 0; i < nrows; i++) { - for(int j = 0; j < tqo.ovlp_k()[i].size(); j++) + for(int j = 0; j < ncols; j++) { - if(tqo.ovlp_k()[i][j] != std::complex(0.0, 0.0)) + if(tqo.ovlpk()[i*ncols+j] != std::complex(0.0, 0.0)) { all_zero = false; } @@ -951,7 +1487,13 @@ TEST_F(toQOTest, CalculateHydrogenlike) std::remove("QO_ovlp_0.dat"); std::remove("QO_ovlp_1.dat"); std::remove("QO_supercells.dat"); + for(int iR = 0; iR < tqo.nR(); iR++) + { + std::string fovlpR = "QO_ovlpR_" + std::to_string(iR) + ".dat"; + std::remove(fovlpR.c_str()); + } } + /**/ int main(int argc, char** argv) { diff --git a/source/module_io/test/write_input_test.cpp b/source/module_io/test/write_input_test.cpp index 72393774ee..64c48d0a9c 100644 --- a/source/module_io/test/write_input_test.cpp +++ b/source/module_io/test/write_input_test.cpp @@ -837,7 +837,7 @@ TEST_F(write_input, DFTU20) EXPECT_THAT( output, testing::HasSubstr( - "dft_plus_u 0 #true:DFT+U correction; false: standard DFT calcullation(default)")); + "dft_plus_u 0 #1/2:new/old DFT+U correction method; 0: standard DFT calcullation(default)")); EXPECT_THAT(output, testing::HasSubstr("yukawa_lambda -1 #default:0.0")); EXPECT_THAT(output, testing::HasSubstr("yukawa_potential 0 #default: false")); EXPECT_THAT(output, testing::HasSubstr("omc 0 #the mode of occupation matrix control")); diff --git a/source/module_io/test_serial/dm_io_test.cpp b/source/module_io/test_serial/dm_io_test.cpp index d29c024f08..63ddf38a53 100644 --- a/source/module_io/test_serial/dm_io_test.cpp +++ b/source/module_io/test_serial/dm_io_test.cpp @@ -86,7 +86,8 @@ TEST_F(DMIOTest,Read) double ef; UcellTestPrepare utp = UcellTestLib["Si"]; ucell = utp.SetUcellInfo(); - ModuleIO::read_dm(is,fn,DM,DM_R,ef,ucell); + ModuleIO::read_dm(GlobalV::GAMMA_ONLY_LOCAL, GlobalV::NLOCAL, + GlobalV::NSPIN,is,fn,DM,DM_R,ef,ucell); EXPECT_DOUBLE_EQ(ef,0.570336288802337); EXPECT_NEAR(DM[0][0][0],3.904e-01,1e-6); EXPECT_NEAR(DM[0][25][25],3.445e-02,1e-6); @@ -103,7 +104,8 @@ TEST_F(DMIOTest,Write) double ef; UcellTestPrepare utp = UcellTestLib["Si"]; ucell = utp.SetUcellInfo(); - ModuleIO::read_dm(is,fn,DM,DM_R,ef,ucell); + ModuleIO::read_dm(GlobalV::GAMMA_ONLY_LOCAL, GlobalV::NLOCAL, + GlobalV::NSPIN,is,fn,DM,DM_R,ef,ucell); EXPECT_DOUBLE_EQ(ef,0.570336288802337); EXPECT_NEAR(DM[0][0][0],3.904e-01,1e-6); EXPECT_NEAR(DM[0][25][25],3.445e-02,1e-6); @@ -111,7 +113,7 @@ TEST_F(DMIOTest,Write) std::string ssd = "SPIN1_DM"; int precision = 3; int out_dm = 1; - ModuleIO::write_dm(is,0,ssd,precision,out_dm,DM,ef,ucell); + ModuleIO::write_dm(is,0,ssd,precision,out_dm,DM,ef,ucell,GlobalV::MY_RANK,GlobalV::NSPIN,GlobalV::NLOCAL); std::ifstream ifs; ifs.open("SPIN1_DM"); std::string str((std::istreambuf_iterator(ifs)),std::istreambuf_iterator()); diff --git a/source/module_io/test_serial/read_wfc_nao_test.cpp b/source/module_io/test_serial/read_wfc_nao_test.cpp index dd77db6432..5d6dfe8743 100644 --- a/source/module_io/test_serial/read_wfc_nao_test.cpp +++ b/source/module_io/test_serial/read_wfc_nao_test.cpp @@ -55,7 +55,7 @@ TEST_F(ReadWfcNaoTest,DistriWfcNao) Parallel_Orbitals* ParaV = new Parallel_Orbitals; psi::Psi* psid = new psi::Psi(nks, nband, nlocal, &ngk[0]); // Act - ModuleIO::distri_wfc_nao(ctot, is, ParaV, psid); + ModuleIO::distri_wfc_nao(ctot, is, GlobalV::NB2D, GlobalV::NBANDS, GlobalV::NLOCAL, ParaV, psid); // Assert for (int i=0; iekb.create(nks,nband); pelec->wg.create(nks,nband); // Act - ModuleIO::read_wfc_nao(ctot, is, ParaV, psid, pelec); + ModuleIO::read_wfc_nao(ctot, is, GlobalV::GAMMA_ONLY_LOCAL, GlobalV::NB2D, GlobalV::NBANDS, + GlobalV::NLOCAL, GlobalV::global_readin_dir, ParaV, psid, pelec); // Assert EXPECT_NEAR(pelec->ekb(0,1),0.314822,1e-5); EXPECT_NEAR(pelec->wg(0,1),0.0,1e-5); diff --git a/source/module_io/test_serial/rho_io_test.cpp b/source/module_io/test_serial/rho_io_test.cpp index ec5852aadd..6199d9f355 100644 --- a/source/module_io/test_serial/rho_io_test.cpp +++ b/source/module_io/test_serial/rho_io_test.cpp @@ -56,6 +56,12 @@ class RhoIOTest : public ::testing::Test int prenspin = 1; double** rho; UnitCell* ucell; + + int my_rank = 0; + std::string esolver_type = "ksdft"; + int rank_in_stogroup = 0; + std::ofstream ofs_running = std::ofstream("unittest.log"); + void SetUp() { rho = new double*[nspin]; @@ -86,7 +92,7 @@ TEST_F(RhoIOTest, Read) double ef; UcellTestPrepare utp = UcellTestLib["Si"]; ucell = utp.SetUcellInfo(); - ModuleIO::read_rho(is, nspin, fn, rho[is], nx, ny, nz, ef, ucell, prenspin); + ModuleIO::read_rho(my_rank, esolver_type, rank_in_stogroup, is, ofs_running, nspin, fn, rho[is], nx, ny, nz, ef, ucell, prenspin); EXPECT_DOUBLE_EQ(ef, 0.461002); EXPECT_DOUBLE_EQ(rho[0][0], 1.27020863940e-03); EXPECT_DOUBLE_EQ(rho[0][46655], 1.33581335706e-02); @@ -103,7 +109,7 @@ TEST_F(RhoIOTest, Write) UcellTestPrepare utp = UcellTestLib["Si"]; ucell = utp.SetUcellInfo(); // first read - ModuleIO::read_rho(is, nspin, fn, rho[is], nx, ny, nz, ef, ucell, prenspin); + ModuleIO::read_rho(my_rank, esolver_type, rank_in_stogroup, is, ofs_running, nspin, fn, rho[is], nx, ny, nz, ef, ucell, prenspin); EXPECT_DOUBLE_EQ(ef, 0.461002); EXPECT_DOUBLE_EQ(rho[0][0], 1.27020863940e-03); EXPECT_DOUBLE_EQ(rho[0][46655], 1.33581335706e-02); diff --git a/source/module_io/to_qo.cpp b/source/module_io/to_qo.cpp deleted file mode 100644 index 5e448ae169..0000000000 --- a/source/module_io/to_qo.cpp +++ /dev/null @@ -1,418 +0,0 @@ -#include "module_io/to_qo.h" -#include "module_basis/module_nao/two_center_integrator.h" -#include "module_base/ylm.h" -#include "module_base/parallel_common.h" - -toQO::toQO(std::string qo_basis, std::vector strategies) -{ - qo_basis_ = qo_basis; - strategies_ = strategies; -} - -toQO::~toQO() -{ -} - -void toQO::initialize(UnitCell* p_ucell, - const std::vector>& kvecs_d) -{ - #ifdef __MPI - if(GlobalV::MY_RANK == 0) - { - #endif - printf("\n---- Quasiatomic Orbital (QO) Analysis Initialization ----\n"); - #ifdef __MPI - } - #endif - kvecs_d_ = kvecs_d; - nkpts_ = kvecs_d.size(); - - // BEGIN: "Two-center bundle build" - unwrap_unitcell(p_ucell); - // build two-center overlap calculator - overlap_calculator_ = std::unique_ptr(new TwoCenterIntegrator); - // build orbitals - /* - orbitals building operation is to (for example) read all orbital files and save to - radial collection data structure. These kinds of information is irrelevant to the - structure simulated. Once two atoms' one certain overlap integral is needed, get - orbitals from radial collection by type-l-izeta, so that get the radial function. - Then specify the angular part Ylm l and m, also l' and m', and the correct distance. - Then the overlap integral is calculated. - */ - // build the numerical atomic orbital basis - // PARALLELIZATION STRATEGY: use RANK-0 to read in the files, then broadcast - build_nao(p_ucell_->ntype, - GlobalV::global_orbital_dir, - p_ucell_->orbital_fn, - GlobalV::MY_RANK); - // build another atomic orbital - // PARALLELIZATION STRATEGY: only RANK-0 works - #ifdef __MPI - if(GlobalV::MY_RANK == 0) - { - #endif - build_ao(ntype_, - GlobalV::global_pseudo_dir, - p_ucell_->pseudo_fn, - GlobalV::qo_screening_coeff, - GlobalV::qo_thr, - GlobalV::ofs_running, - GlobalV::MY_RANK); - // neighbor list search - scan_supercell(); - // build grids - double rcut_max = std::max(nao_->rcut_max(), ao_->rcut_max()); - int ngrid = int(rcut_max / 0.01) + 1; - double cutoff = 2.0*rcut_max; - nao_->set_uniform_grid(true, ngrid, cutoff, 'i', true); - ao_->set_uniform_grid(true, ngrid, cutoff, 'i', true); - overlap_calculator_->tabulate(*ao_, *nao_, 'S', ngrid, cutoff); - // prepare for Ylm - ModuleBase::Ylm::set_coefficients(); - // END: "Two-center bundle build" - - // allocate memory for ovlp_ao_nao_R_ and ovlp_ao_nao_k_ - allocate_ovlp(true); allocate_ovlp(false); - printf("---- Quasiatomic Orbital (QO) Analysis Initialization Done ----\n"); - #ifdef __MPI - } - #endif -} - -void toQO::build_nao(const int ntype, - const std::string orbital_dir, - const std::string* const orbital_fn, - const int rank) -{ - // build the numerical atomic orbital basis - ModuleBase::SphericalBesselTransformer sbt; - nao_ = std::unique_ptr(new RadialCollection); - // add GlobalV::global_orbital_dir ahead of orbital_fn - int ntype_ = ntype; -#ifdef __MPI - Parallel_Common::bcast_int(ntype_); -#endif - std::string* orbital_fn_ = new std::string[ntype_]; - if(rank == 0) - { - for(int it = 0; it < ntype_; it++) - { - orbital_fn_[it] = orbital_dir + orbital_fn[it]; - } - } -#ifdef __MPI - Parallel_Common::bcast_string(orbital_fn_, ntype_); -#endif - - nao_->build(ntype_, orbital_fn_, 'o'); - nao_->set_transformer(sbt); - for(int it = 0; it < ntype_; it++) - { - int _nphi_it = 0; - for(int l = 0; l <= nao_->lmax(it); l++) - { - for(int izeta = 0; izeta < nao_->nzeta(it, l); izeta++) - { - _nphi_it += 2*l + 1; - } - } - nphi_ += _nphi_it*na_[it]; - } - #ifdef __MPI - if(rank == 0) - { - #endif - printf("Build numerical atomic orbital basis done.\n"); - #ifdef __MPI - } - #endif - delete[] orbital_fn_; -} - -bool toQO::orbital_filter(const int l, const std::string spec) -{ - std::vector l2symbol = {"s", "p", "d", "f", "g"}; // seems enough - if(spec == "all") return true; - else if(spec.find_first_of(l2symbol[l]) != std::string::npos) return true; - else return false; -} - -void toQO::build_hydrogen(const int ntype, - const double* const charges, - const bool slater_screening, - const int* const nmax, - const double qo_thr, - const int rank) -{ - ao_ = std::unique_ptr(new RadialCollection); - ao_->build(ntype, - charges, - slater_screening, - nmax, - symbols_.data(), - qo_thr, - strategies_.data()); - ModuleBase::SphericalBesselTransformer sbt; - ao_->set_transformer(sbt); - - for(int itype = 0; itype < ntype; itype++) - { - int _nchi_it = 0; - for(int l = 0; l <= ao_->lmax(itype); l++) - { - _nchi_it += (2*l+1)*ao_->nzeta(itype, l); - } - nchi_ += _nchi_it * na_[itype]; - } - - #ifdef __MPI - if(rank == 0) - { - #endif - if(nchi_ > 0) printf("Build arbitrary atomic orbital basis done.\n"); - else ModuleBase::WARNING_QUIT("toQO::initialize", "Error: no atomic orbital is built."); - #ifdef __MPI - } - #endif -} - -void toQO::build_pswfc(const int ntype, - const std::string pseudo_dir, - const std::string* const pspot_fn, - const double* const screening_coeffs, - const double qo_thr, - const int rank) -{ - ao_ = std::unique_ptr(new RadialCollection); - std::string* pspot_fn_ = new std::string[ntype_]; - for(int it = 0; it < ntype; it++) - { - pspot_fn_[it] = pseudo_dir + pspot_fn[it]; - } - ao_->build(ntype, pspot_fn_, screening_coeffs, qo_thr); - ModuleBase::SphericalBesselTransformer sbt; - ao_->set_transformer(sbt); - - for(int itype = 0; itype < ntype; itype++) - { - int _nchi_it = 0; - for(int l = 0; l <= ao_->lmax(itype); l++) - { - if(orbital_filter(l, strategies_[itype])) _nchi_it += (2*l+1)*ao_->nzeta(itype, l); - } - nchi_ += _nchi_it * na_[itype]; - } - - #ifdef __MPI - if(rank == 0) - { - #endif - printf("Build arbitrary atomic orbital basis done.\n"); - #ifdef __MPI - } - #endif - delete[] pspot_fn_; -} -/* -void toQO::build_szv(const int ntype) -{ - // build the numerical atomic orbital basis - ModuleBase::SphericalBesselTransformer sbt; - ao_ = std::unique_ptr(new RadialCollection); - // add GlobalV::global_orbital_dir ahead of orbital_fn - int ntype_ = ntype; - std::vector orbital_fn_(ntype_, "szv.orb"); - ao_->build(ntype_, orbital_fn_.data(), 'o'); - ao_->set_transformer(sbt); - for(int itype = 0; itype < ntype; itype++) - { - int _nchi_it = 0; - for(int l = 0; l <= ao_->lmax(itype); l++) - { - _nchi_it += (2*l+1)*ao_->nzeta(itype, l); - } - nchi_ += _nchi_it * na_[itype]; - } -} -*/ -void toQO::build_ao(const int ntype, - const std::string pseudo_dir, - const std::string* const pspot_fn, - const std::vector screening_coeffs, - const double qo_thr, - const std::ofstream& ofs_running, - const int rank) -{ - if(qo_basis_ == "hydrogen") - { - bool with_slater_screening = std::find_if(screening_coeffs.begin(), screening_coeffs.end(), - [](double sc) { return sc > 1e-10; }) != screening_coeffs.end(); - build_hydrogen(ntype_, - charges_.data(), - with_slater_screening, - nmax_.data(), - qo_thr, - rank); - } - else if(qo_basis_ == "pswfc") - { - build_pswfc(ntype_, - pseudo_dir, - pspot_fn, - screening_coeffs.data(), - qo_thr, - rank); - } - /* - else if(qo_basis_ == "szv") - { - build_szv(ntype_); - } - */ - else - { - #ifdef __MPI - if(rank == 0) - { - #endif - // Not implemented error - GlobalV::ofs_running << "Error: " << qo_basis_ << " is not implemented yet." << std::endl; - ModuleBase::WARNING_QUIT("toQO::initialize", "Error: " + qo_basis_ + " is not implemented yet."); - #ifdef __MPI - } - #endif - } // radial functions generation completed -} - -void toQO::calculate_ovlp_R(const int iR) -{ - // save memory mode: only write to ovlp_ao_nao_R_[0] - int iR_save = save_mem_? 0 : iR; - - int irow = 0; // row and column index of ovlp_ao_nao_R_ - for(int it = 0; it < p_ucell_->ntype; it++) - { - // FOR EACH TYPE it, GET THE MAXIMUM l - int lmaxi = atom_database_.principle_quantum_number[p_ucell_->atoms[it].ncpp.psd] - 1; - for(int ia = 0; ia < p_ucell_->atoms[it].na; ia++) - { - // FOR EACH ATOM ia OF PRESENT TYPE it, SPECIFIES AN ATOM itia - // BUT SPECIFYING AN ATOM HERE IS NOT NECESSARY, THE ONLY REASON IS THE ARRANGEMENT OF ovlp_ao_nao_R_ - for(int li = 0; li <= lmaxi; li++) - { - // orbitals arrange in the way stated: https://abacus.deepmodeling.com/en/latest/advanced/pp_orb.html#basis-set - // generate the magnetic quantum number mi list - std::vector mis; - for(int mi_abs = 0; mi_abs <= li; mi_abs++) - { - mis.push_back(mi_abs); - if(mi_abs != 0) mis.push_back(-mi_abs); - } - if((!orbital_filter(li, strategies_[it]))&&(qo_basis_ == "pswfc")) continue; - // RADIAL FUNCTIONS ARE ORGANIZED BY (l, zeta), SO FOR EACH l, GET THE MAXIMUM zeta - int nzetai = ao_->nzeta(it, li); - // FOR (l, zeta) OF ATOM itia, SPECIFY A RADIAL ATOMIC ORBITAL - for(int izetai = 0; izetai < nzetai; izetai++) - { - // FOR EACH RADIAL ATOMIC ORBITAL, SPECIFY A SPHERICAL HARMONIC - //for(int mi = -li; mi <= li; mi++) // natural but it's not how ABACUS arrange orbitals - for(int mi : mis) - { - // HERE WE GET flzeta(r)*Ylm(theta, phi), - // THEN ANOTHER ORBITAL...(jt, ja, lj, izetaj, mj) - int icol = 0; - for(int jt = 0; jt < p_ucell_->ntype; jt++) - { - for(int ja = 0; ja < p_ucell_->atoms[jt].na; ja++) - { - int lmaxj = p_ucell_->atoms[jt].nwl; - for(int lj = 0; lj <= lmaxj; lj++) - { - // orbitals arrange in the way stated: https://abacus.deepmodeling.com/en/latest/advanced/pp_orb.html#basis-set - // generate the magnetic quantum number mj list - std::vector mjs; - for(int mj_abs = 0; mj_abs <= lj; mj_abs++) - { - mjs.push_back(mj_abs); - if(mj_abs != 0) mjs.push_back(-mj_abs); - } - int nzetaj = nao_->nzeta(jt, lj); - for(int izetaj = 0; izetaj < nzetaj; izetaj++) - { - //for(int mj = -lj; mj <= lj; mj++) // natural but it's not how ABACUS arrange orbitals - for(int mj : mjs) - { - // TWO ATOMIC ORBITALS ARE SPECIFIED, THEN WE NEED TO CALCULATE THE OVERLAP IN SUPERCELL - ModuleBase::Vector3 rij = p_ucell_->atoms[jt].tau[ja] - p_ucell_->atoms[it].tau[ia]; - // there is waste here, but for easy to understand, I don't optimize it. - ModuleBase::Vector3 R = supercells_[iR]; - ModuleBase::Vector3 Rij; - Rij.x = rij.x + double(R.x) * p_ucell_->a1.x - + double(R.y) * p_ucell_->a2.x - + double(R.z) * p_ucell_->a3.x; - Rij.y = rij.y + double(R.x) * p_ucell_->a1.y - + double(R.y) * p_ucell_->a2.y - + double(R.z) * p_ucell_->a3.y; - Rij.z = rij.z + double(R.x) * p_ucell_->a1.z - + double(R.y) * p_ucell_->a2.z - + double(R.z) * p_ucell_->a3.z; - Rij *= p_ucell_->lat0; // convert to Bohr - overlap_calculator_->calculate( - it, li, izetai, mi, - jt, lj, izetaj, mj, - Rij, &ovlp_R_[iR_save][irow][icol] - ); - icol++; // CHARNGE ORBITAL2: (jt, ja, lj, izetaj, mj) - } - } - } - } - } - irow++; // CHARNGE ORBITAL1: (it, ia, li, izetai, mi) - } - } - } - } - } -} - -void toQO::calculate_ovlp_k(int ik) -{ - for(int iR = 0; iR < nR_; iR++) - { - calculate_ovlp_R(iR); // calculate S(R) for each R, save to ovlp_ao_nao_R_ - if(save_mem_) append_ovlp_R_eiRk(ik, iR); - } - if(!save_mem_) fold_ovlp_R(ik); -} - -void toQO::calculate() -{ - #ifdef __MPI - if(GlobalV::MY_RANK == 0) - { - #endif - printf("Calculating overlap integrals for kpoints.\n"); - if(nkpts_ < nR_) - { - std::cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl - << "! Warning: number of kpoints is less than number of supercells, " << std::endl - << "! this will cause information loss when transform matrix R -> k. " << std::endl - << "! The further conversion k -> R cannot recover full information." << std::endl - << "! Number of kpoints: " << nkpts_ << std::endl - << "! Number of supercells: " << nR_ << std::endl - << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; - } - write_supercells(); - for(int ik = 0; ik < nkpts_; ik++) - { - zero_out_ovlps(false); - calculate_ovlp_k(ik); - write_ovlp>(ovlp_k_, ik); - } - printf("Calculating overlap integrals for kpoints done.\n\n"); - #ifdef __MPI - } - #endif -} diff --git a/source/module_io/to_qo.h b/source/module_io/to_qo.h index 2e98dc6274..832c0daba9 100644 --- a/source/module_io/to_qo.h +++ b/source/module_io/to_qo.h @@ -5,7 +5,6 @@ #include #include "module_cell/unitcell.h" #include "module_basis/module_nao/two_center_integrator.h" -#include "module_basis/module_pw/pw_basis_k.h" #include "module_base/atom_in.h" #include "module_base/vector3.h" /* @@ -35,278 +34,214 @@ 2.3. scan neighboring list: scan_supercell() 2.4. allocate memory for ovlp_ao_nao_R_ and ovlp_ao_nao_k_: clean_up(), deallocate_ovlp() and allocate_ovlp() 3. calculate overlap S(k): calculate() - 3.1. calculate S(R) for all R: calculate_ovlp_k(), calculate_ovlp_R() - 3.2. fold S(R) to S(k): fold_ovlp_R() + 3.1. calculate S(R) for all R: calculate_ovlpk(), calculate_ovlpR() + 3.2. fold S(R) to S(k): fold_ovlpR() */ class toQO { - private: - using CplxMatrix = std::vector>>; - using RealMatrix = std::vector>; - public: - toQO(std::string qo_basis, std::vector strategies); + // constructor is identical with what INPUT needs to define a toQO task + // how user defines a QO task in INPUT, how it is constructed here, this + // is to ensure the self-containedness of the class, as much as possible + // to avoid introducing variables not from constructor or other under + // control functions. + toQO(const std::string& qo_basis, //< basis of QO, hydrogen or pswfc + const std::vector& strategies, //< strategies for each atom type, more details see manual + const double& qo_thr, //< threshold for QO + const std::vector& screening_coeffs); //< screening coefficients for pseudowavefunction or Slater screening ~toQO(); - /* - * Initialization - */ - /// @brief initialize the QO class - /// @param p_ucell interface (raw pointer) to the unitcell - /// @param nkpts number of kpoints - void initialize(UnitCell* p_ucell, - const std::vector>& kvecs_d); - /// @brief to get rid of direct use of UnitCell - /// @param p_ucell - void unwrap_unitcell(UnitCell* p_ucell); - /* - * Two center integrator interfaces - */ - /// @brief build RadialCollection for numerical atomic orbitals - /// @param ntype number of atom types - /// @param orbital_fn filenames of numerical atomic orbitals - void build_nao(const int ntype, - const std::string orbital_dir, - const std::string* const orbital_fn, - const int rank); - /// @brief build RadialCollection for atomic orbitals - /// @param ntype number of atom types - /// @param charges charges of atoms - /// @param nmax maximum principle quantum number of atoms - void build_hydrogen(const int ntype, - const double* const charges, - const bool slater_screening, - const int* const nmax, - const double qo_thr, - const int rank); - //function might be implemented in future - //void build_szv(const int ntype); - /// @brief build RadialCollection for atomic orbitals - /// @param ntype number of atom types - /// @param pspot_fn filenames of pseudopotentials - /// @param screening_coeffs screening coefficients of pseudopotentials, appears like a factor (exp[-s*r]) scaling the pswfc - void build_pswfc(const int ntype, - const std::string pseudo_dir, - const std::string* const pspot_fn, - const double* const screening_coeffs, - const double qo_thr, - const int rank); - /// @brief build RadialCollection for atomic orbitals - /// @param ntype number of atom types - /// @param pspot_fn filenames of pseudopotentials, if use qo_basis = hydrogen, omit this parameter - void build_ao(const int ntype, - const std::string pseudo_dir, - const std::string* const pspot_fn = nullptr, - const std::vector screening_coeffs = std::vector(), - const double qo_thr = 1e-10, - const std::ofstream& ofs = std::ofstream(), - const int rank = 0); - /* - * Main functions - */ - /// @brief calculate the overlap between atomic orbitals and numerical atomic orbitals, in real space, at R[iR] - /// @param iR index of supercell vector - /// @note to save memory, the workflow can be organized as, once one S(R) is calculated, fold it to S(k), then clean up S(R)... - void calculate_ovlp_R(const int iR); - /// @brief calculate the overlap between atomic orbitals and numerical atomic orbitals, in k space - /// @param kvec_c vector3 specifying a kpoint - void calculate_ovlp_k(int ik); - /// @brief calculate the overlap between atomic orbitals and numerical atomic orbitals, in k space and write to file + // initialize function is to import program-related information, it is, + // more dynamic than constructor because this is actually an interface + // to states of rest of program, unlike constructor, actually defines + // the state of the class. + void initialize(const std::string& out_dir, //< directory of output files + const std::string& pseudo_dir, //< directory of pseudopotentials + const std::string& orbital_dir, //< directory of numerical atomic orbitals + const UnitCell* p_ucell, //< interface to the unitcell + const std::vector>& kvecs_d, //< kpoints + std::ofstream& ofs_running, //< output stream for running information + const int& rank, //< rank of present processor + const int& nranks); //< total number of processors + // import structure, including supercell and kvectors are read in this function + void read_structures(const UnitCell* p_ucell, //< interface to the unitcell + const std::vector>& kvecs_d, //< kpoints + const int& iproc, //< rank of present processor + const int& nprocs); //< total number of processors + + // Two-center integral + // QO is just one kind of representation, here it is representation from numerical + // atomic orbitals spanned space to atomic orbitals spanned space. Therefore two-center + // integral is the core of the whole transformation, it calculates the overlap between + // atomic orbitals and numerical atomic orbitals + // for |>: to build RadialCollection filled with AtomicRadials + void build_nao(const int ntype, //< number of atom types + const std::string orbital_dir, //< directory of numerical atomic orbitals + const std::string* const orbital_fn, //< filenames of numerical atomic orbitals + const int rank); //< rank of present processor + // for <|: to build RadialCollection filled with PswfcRadials or HydrogenRadials + void build_ao(const int ntype, //< number of atom types + const std::string pseudo_dir, //< directory of pseudopotentials + const std::string* const pspot_fn = nullptr, //< filenames of pseudopotentials + const std::vector screening_coeffs = std::vector(), //< screening coefficients of pseudopotentials + const double qo_thr = 1e-10, //< threshold for QO + const std::ofstream& ofs = std::ofstream(), //< output stream for running information + const int rank = 0); //< rank of present processor + // for <|: to build RadialCollection filled with HydrogenRadials + void build_hydrogen(const int ntype, //< number of atom types + const double* const charges, //< charges of atoms + const bool slater_screening, //< whether use slater screening + const int* const nmax, //< maximum principle quantum number of atoms + const double qo_thr, //< threshold for QO + const int rank); //< rank of present processor + // for <|: to build RadialCollection filled with PswfcRadials + void build_pswfc(const int ntype, //< number of atom types + const std::string pseudo_dir, //< directory of pseudopotentials + const std::string* const pspot_fn, //< filenames of pseudopotentials + const double* const screening_coeffs, //< screening coefficients of pseudopotentials, appears like a factor (exp[-s*r]) scaling the pswfc + const double qo_thr, //< threshold for QO + const int rank); //< rank of present processor + void build_szv(); + // EXTERNAL EXPOSED FUNCTION, calculate all things in one shot void calculate(); - /// @brief write two dimensional matrix to file - /// @tparam T type of matrix - /// @param matrix matrix to write - /// @param ik index of kpoint + // calculate = Sij(R) + void calculate_ovlpR(const int iR); //< iR index of supercell vector + // calculate = Sij(k) + void calculate_ovlpk(int ik); //< ik index of kpoint + // for overlap I/O + // S to file template - void write_ovlp(const std::vector>& matrix, const int& ik); - /// @brief write supercells information to file - void write_supercells(); - /* - Neighboring list searching algorithm (not implemented yet) - - The neighboring list here is for searching all possible (ijR) pairs that overlap between atom i and atom j in different - cells distanced by R still has nonzero value. Therefore it is actually a problem: - - |rij + n1R1 + n2R2 + n3R3| >= (rcut,i + rcut,j), - , where n1, n2, n3 are integers, R1, R2, R3 are lattice vectors, and rcut,i, rcut,j are cutoff radii of numerical orbitals - of atom i and atom j. rij is the distance between atom i and atom j.in the unitcell. - Take square on both sides, we have - rij^2 + 2 rij * (n1R1 + n2R2 + n3R3) + (n1R1 + n2R2 + n3R3)^2 >= (rcut,i + rcut,j)^2 - . n1, n2 and n3 are values of interest, rij and rcut,i and rcut,j are known for specific atom pair ij. - - Therefore neighboring list searching problem is a problem of root finding of a quadratic equation. - The quadratic equation is - (R1^2)*n1^2 + (R2^2)*n2^2 + (R3^2)*n3^2 + 2*(R1*R2)*n1*n2 + 2*(R1*R3)*n1*n3 + 2*(R2*R3)*n2*n3 - + 2*rij*(R1*n1 + R2*n2 + R3*n3) + rij^2 - (rcut,i + rcut,j)^2 = 0 - one can drop the constraint that n1, n2 and n3 are integers, then use ceiling to get the integer values. - - To solve the quadratic equation, one can rotate the coordinate system so that the function can become - a sphere. Then it will be an approximately 2d scan (phi, theta) instead of a 3d scan (n1, n2, n3). The time complexity will be reduced from - O(Natom^2*Ncell^3) to O(Natom^2*Ncell^2). - - This algorithm is not implemented yet. - A diagonalization of third order matrix of coefficients of ninj can transform the targeting function - to a translated sphere, then translate it back to origin. Then it will be a 2d scan (phi, theta). - */ + void write_ovlp(const std::string& dir, //< directory of output files + const std::vector& matrix, //< matrix to write + const int& nrows, //< number of rows + const int& ncols, //< number of columns + const bool& is_R = false, //< whether it is in real space + const int& imat = 0); //< index of matrix + // S from file + void read_ovlp(const std::string& dir, //< directory of output files + const int& nrows, //< number of rows + const int& ncols, //< number of columns + const bool& is_R = false, //< whether it is in real space + const int& imat = 0); //< index of matrix + /// @brief build bidirectional map indexing for one single RadialCollection object, which is an axis of two-center-integral table. + /// @details from (it,ia,l,zeta,m) to index and vice versa + void radialcollection_indexing(const RadialCollection&, //< [in] instance of RadialCollection + const std::vector&, //< [in] number of atoms for each type + const bool&, //< [in] whether enable orbital filtering + std::map,int>&, //< [out] mapping from (it,ia,l,zeta,m) to index + std::map>&); //< [out] mapping from index to (it,ia,l,zeta,m) /// @brief calculate vectors connecting all atom pairs that needed to calculate their overlap - ModuleBase::Vector3 cal_two_center_vector(ModuleBase::Vector3 rij, - ModuleBase::Vector3 R); + ModuleBase::Vector3 cal_two_center_vector(ModuleBase::Vector3 rij, //< vector connecting atom i and atom j + ModuleBase::Vector3 R); //< supercell vector + /// @brief when indexing, select where one orbital is really included in the two-center integral + bool orbital_filter_out(const int& itype, //< itype + const int& l, //< angular momentum + const int& izeta //< zeta + ); + + void deallocate_ovlp(const bool& is_R = false); //< deallocate memory for ovlp_ao_nao_R_ or ovlp_ao_nao_k_ + void allocate_ovlp(const bool& is_R = false); //< allocate memory for ovlp_ao_nao_R_ or ovlp_ao_nao_k_ + void zero_out_ovlps(const bool& is_R); //< zero out ovlp_ao_nao_R_ or ovlp_ao_nao_k_ + void append_ovlpR_eiRk(int ik, int iR); //< append S(R) to S(k), memory saving + + // MPI related + void bcast_stdvector_ofvector3int(std::vector>& vec); + void bcast_stdvector_ofvector3double(std::vector>& vec); + + // Neighboring list + /// @brief get all possible (n1n2n3) defining supercell and scatter if MPI enabled + void scan_supercell(const int& iproc, //< rank of present processor + const int& nprocs); //< total number of processors /// @brief this is a basic functional for scanning (ijR) pair for one certain i, return Rs - /// @attention an algorithm loop over (i,)j,R - /// @param it type of atom i - /// @param ia index of atom i - /// @param start_it starting scan index of atom type - /// @param start_ia starting scan index of atom - /// @param rcut cutoff radius of numerical atomic orbital of atom i + /// @attention an algorithm loop over (i,)j,R, and return Rs /// @return a vector collects (n1, n2, n3) for present atom - std::vector> scan_supercell_for_atom(int it, int ia, int start_it = 0, int start_ia = 0); + std::vector> scan_supercell_for_atom(int it, //< type of atom i + int ia, //< index of atom i + int start_it = 0, //< starting scan index of atom type + int start_ia = 0); //< starting scan index of atom /// @brief core algorithm to scan supercells, find the maximal supercell according to present cutoff radius - /// @param rcut sum of cutoff radius of orbitals of atom i and atom j - /// @param a cell vector a (in Bohr) - /// @param b cell vector b (in Bohr) - /// @param c cell vector c (in Bohr) /// @return a vector of (n1n2n3) defining supercell - std::vector rcut_to_supercell_index(double rcut, ModuleBase::Vector3 a, ModuleBase::Vector3 b, ModuleBase::Vector3 c); + std::vector rcut_to_supercell_index(double rcut, //< sum of cutoff radius of orbitals of atom i and atom j + ModuleBase::Vector3 a, //< cell vector a (in Bohr) + ModuleBase::Vector3 b, //< cell vector b (in Bohr) + ModuleBase::Vector3 c); //< cell vector c (in Bohr) /// @brief get vector squared norm in supercell - /// @param rij rij in unitcell - /// @param n1 supercell index 1 - /// @param n2 supercell index 2 - /// @param n3 supercell index 3 /// @return (rij + n1R1 + n2R2 + n3R3)^2 - double norm2_rij_supercell(ModuleBase::Vector3 rij, int n1, int n2, int n3); - /// @brief get all possible (n1n2n3) defining supercell - /// @return a vector of (n1n2n3) - void scan_supercell(); + double norm2_rij_supercell(ModuleBase::Vector3 rij, //< vector connecting atom i and atom j in unitcell + int n1, //< supercell index 1 + int n2, //< supercell index 2 + int n3); //< supercell index 3 /// @brief eliminate duplicate vectors in a vector of vector3 - /// @tparam T type of vector3 - /// @param vector3s vector of vector3, both input and output template void eliminate_duplicate_vector3(std::vector>& vector3s); - /* - Data management - */ - bool orbital_filter(const int, const std::string); - /// @brief clean up ovlp_ao_nao_R_ or ovlp_ao_nao_k_ - /// @param is_R true for ovlp_ao_nao_R_, false for ovlp_ao_nao_k_ - void deallocate_ovlp(bool is_R = false); - /// @brief allocate memory for ovlp_ao_nao_R_ or ovlp_ao_nao_k_ - /// @param is_R true for ovlp_ao_nao_R_, false for ovlp_ao_nao_k_ - void allocate_ovlp(bool is_R = false); - /// @brief clean up all data members - void clean_up(); - /// @brief zero out ovlp_ao_nao_R_ or ovlp_ao_nao_k_ - /// @param is_R true for ovlp_ao_nao_R_, false for ovlp_ao_nao_k_ - void zero_out_ovlps(const bool is_R); - - /// @brief given a vector3 specifying a kpoint, fold ovlp_ao_nao_R_ (series of S(R), memory consuming) - /// @param ik index of vector3 specifying a kpoint - void fold_ovlp_R(int ik); - /// @brief given a vector3 specifying a kpoint, append one single S(R), multiply by exp(-i*k*R) and add to ovlp_ao_nao_k_ - /// @param ik index of vector3 specifying a kpoint - /// @param iR index of supercell vector - void append_ovlp_R_eiRk(int ik, int iR); - - // setters - void set_qo_basis(const std::string qo_basis) { qo_basis_ = qo_basis; } - void set_strategies(const std::vector strategies) { strategies_ = strategies; } - void set_strategy(const int itype, const std::string strategy) { strategies_[itype] = strategy; } - void set_save_mem(const bool save_mem) { save_mem_ = save_mem; } + /// @brief write supercells information to file + void write_supercells(); // getters int ntype() const { return ntype_; } - int nkpts() const { return nkpts_; } + int nks() const { return nks_; } std::string qo_basis() const { return qo_basis_; } std::vector strategies() const { return strategies_; } std::string strategy(const int itype) const { return strategies_[itype]; } - UnitCell* p_ucell() const { return p_ucell_; } + UnitCell* p_ucell() const { return const_cast(p_ucell_); } RadialCollection* p_nao() const { return nao_.get(); } RadialCollection* p_ao() const { return ao_.get(); } int nR() const { return nR_; } int nchi() const { return nchi_; } int nphi() const { return nphi_; } std::vector> supercells() const { return supercells_; } - std::vector ovlp_R() const { return ovlp_R_; } - CplxMatrix ovlp_k() const { return ovlp_k_; } - bool save_mem() const { return save_mem_; } + std::vector ovlpR() const { return ovlpR_; } + double ovlpR(const int i, const int j) const { return ovlpR_[i*nchi_+j]; } + std::vector> ovlpk() const { return ovlpk_; } + std::complex ovlpk(const int i, const int j) const { return ovlpk_[i*nchi_+j]; } std::vector symbols() const { return symbols_; } std::vector charges() const { return charges_; } atom_in atom_database() const { return atom_database_; } std::vector> kvecs_d() const { return kvecs_d_; } private: - // - // interface to deprecated - // - /// @brief interface to the unitcell - UnitCell* p_ucell_ = nullptr; - - // - // high dimensional data - // - /// @brief supercell vectors - std::vector> supercells_; - /// @brief overlaps between atomic orbitals and numerical atomic orbitals, in real space - std::vector ovlp_R_; - /// @brief overlap between atomic orbitals and numerical atomic orbitals, in k space - CplxMatrix ovlp_k_; - - // - // basic data member - // - /// @brief number of kpoints, for S(k) - int nkpts_ = 0; - /// @brief number of supercell vectors, for S(R) - int nR_ = 0; - /// @brief number of atomic orbitals, chi in \mathbf{S}^{\chi\phi}(\mathbf{k}) - int nchi_ = 0; - /// @brief number of numerical atomic orbitals, phi in \mathbf{S}^{\chi\phi}(\mathbf{k}) - int nphi_ = 0; - // - // data unwrapped from unitcell - // - /// @brief number of atom types - int ntype_ = 0; - /// @brief number of atoms for each type - std::vector na_; - // - // qo_basis = strategy - // - std::vector symbols_; - std::vector charges_; - std::vector nmax_; - // - // - // - std::vector> kvecs_d_; - // - // attributes - // - /// @brief current atomic orbital basis for generating QO - /// @details hydrogen: hydrogen-like orbitals; pswfc: pseudowavefunction + // Variables defining QO task std::string qo_basis_ = "hydrogen"; - /// @brief strategy for generating QO - /// @details full: 1s, 2s, 2p, 3s, 3p, 3d, ... - /// minimal: 1s, 2p, 3d, 4f, ... - /// energy: according to Hund's rule std::vector strategies_; - - // - // memory control - // - /// @brief whether to save memory - bool save_mem_ = true; - - // - // advanced data structures - // - // orbitals data carriers - /// @brief numerical atomic orbitals - std::unique_ptr nao_; - /// @brief atomic orbitals - std::unique_ptr ao_; - /// @brief two center integrator - std::unique_ptr overlap_calculator_; - /// @brief atom database - atom_in atom_database_; + double qo_thr_ = 1e-10; + std::vector screening_coeffs_; + // Variables defining I/O + std::string out_dir_; //< directory of output files + std::string pseudo_dir_; //< directory of pseudopotentials + std::string orbital_dir_; //< directory of numerical atomic orbitals + // Variables defining parallelism + int iproc_ = 0; + int nprocs_ = 1; + // variables defining structure + const UnitCell* p_ucell_ = nullptr; //< interface to the unitcell, its lifespan is not managed here + std::vector iRs_; //< indices of supercell vectors (local) + std::vector> supercells_; //< supercell vectors (global) + std::vector iks_; //< indices of kpoints (local) + std::vector> kvecs_d_; //< kpoints (global) + // Two center integral + std::unique_ptr nao_; //< numerical atomic orbitals + std::unique_ptr ao_; //< atomic orbitals + std::unique_ptr overlap_calculator_; //< two center integrator + std::vector ovlpR_; //< overlap between atomic orbitals and numerical atomic orbitals, in real space + std::vector> ovlpk_; //< overlap between atomic orbitals and numerical atomic orbitals, in k space + //< indices + std::map,int> index_ao_; //< mapping from (it,ia,l,zeta,m) to index + std::map> rindex_ao_; //< mapping from index to (it,ia,l,zeta,m) + std::map,int> index_nao_; //< mapping from (it,ia,l,zeta,m) to index + std::map> rindex_nao_; //< mapping from index to (it,ia,l,zeta,m) + // Variables defining dimensions or resource allocation + int nks_ = 0; //< number of kpoints for present processor, for S(k) + int nks_tot_ = 0; //< total number of kpoints + int nR_ = 0; //< number of supercell vectors on present processor, for S(R) + int nR_tot_ = 0; //< total number of supercell vectors + int nchi_ = 0; //< number of atomic orbitals, chi in \mathbf{S}^{\chi\phi}(\mathbf{k}) + int nphi_ = 0; //< number of numerical atomic orbitals, phi in \mathbf{S}^{\chi\phi}(\mathbf{k}) + // Variables defining atoms + atom_in atom_database_; //< atomic information database + int ntype_ = 0; //< number of atom types + std::vector na_; //< number of atoms for each type + std::vector symbols_; //< symbols of atoms + std::vector charges_; //< charges of atoms + std::vector nmax_; //< maximum principle quantum number of atoms }; #endif // TOQO_H \ No newline at end of file diff --git a/source/module_io/to_qo_kernel.cpp b/source/module_io/to_qo_kernel.cpp new file mode 100644 index 0000000000..9de5017598 --- /dev/null +++ b/source/module_io/to_qo_kernel.cpp @@ -0,0 +1,565 @@ +#include "module_io/to_qo.h" +#include "module_basis/module_nao/two_center_integrator.h" +#include "module_base/ylm.h" +#include "module_base/libm/libm.h" +#ifdef __MPI +#include "module_base/parallel_common.h" +#endif +// how define QO task, how create QO instance +toQO::toQO(const std::string& qo_basis, + const std::vector& strategies, + const double& qo_thr, + const std::vector& screening_coeffs) +{ + // totally the same as what defined in INPUT + // qo_switch_ = 1 // certainly, this constructor will only be called when qo_switch_ == 1 + qo_basis_ = qo_basis; + strategies_ = strategies; + qo_thr_ = qo_thr; + screening_coeffs_ = screening_coeffs; +} + +toQO::~toQO() {} // we dont use any new or malloc, so no need to delete or free + +// initialize means to initialize in actual program environment, therefore most of program +// -dependent vairables import here. +void toQO::initialize(const std::string& out_dir, + const std::string& pseudo_dir, + const std::string& orbital_dir, + const UnitCell* p_ucell, + const std::vector>& kvecs_d, + std::ofstream& ofs_running, + const int& rank, + const int& nranks) +{ + // print parameter settings for QO + if(rank == 0) + { + std::string init_info = "\nQuasiatomic orbital analysis activated.\n"; + init_info += "Parameters settings check:\n"; + init_info += "qo_basis: " + qo_basis_ + "\n"; + init_info += "qo_thr: " + std::to_string(qo_thr_) + "\n"; + init_info += "qo_strategies: "; + for(auto s: strategies_) init_info += s + " "; + init_info += "\n"; + init_info += "Output directory: " + out_dir + "\n"; + init_info += "Pseudopotential directory: " + pseudo_dir + "\n"; + init_info += "Numerical atomic orbital directory: " + orbital_dir + "\n"; + init_info += "Number of kpoints: " + std::to_string(kvecs_d.size()) + "\n"; + init_info += "Parallelized on " + std::to_string(nranks) + " MPI processes\n"; + printf("%s", init_info.c_str()); + } +#ifdef __MPI + // this MPI_Barrier is to ensure the above information is printed before the following + MPI_Barrier(MPI_COMM_WORLD); +#endif + // initialize the variables defining I/O + out_dir_ = out_dir; + pseudo_dir_ = pseudo_dir; + orbital_dir_ = orbital_dir; + + // initialize the variables defining parallelism + iproc_ = rank; + nprocs_ = nranks; + + // initialize the variables defining the structure + // review what are needed by toQO module from UnitCell + // + read_structures(p_ucell, kvecs_d, iproc_, nprocs_); + + // build orbitals, for all processes + // orbitals building operation is to (for example) read all orbital files and save to + // radial collection data structure. These kinds of information is irrelevant to the + // structure simulated. Once two atoms' one certain overlap integral is needed, get + // orbitals from radial collection by type-l-izeta, so that get the radial function. + // Then specify the angular part Ylm l and m, also l' and m', and the correct distance. + // Then the overlap integral is calculated. + // build two-center overlap calculator + overlap_calculator_ = std::unique_ptr(new TwoCenterIntegrator); + // build the numerical atomic orbital basis + build_nao(ntype_, orbital_dir_, p_ucell_->orbital_fn, iproc_); + // build another atomic orbital + build_ao(ntype_, pseudo_dir_, p_ucell_->pseudo_fn, screening_coeffs_, qo_thr_, ofs_running, iproc_); + + // neighbor list search, based on built RadialCollection(s) + scan_supercell(iproc_, nprocs_); + + // build grids, for all processes + double rcut_max = std::max(nao_->rcut_max(), ao_->rcut_max()); + int ngrid = int(rcut_max / 0.01) + 1; + double cutoff = 2.0*rcut_max; + nao_->set_uniform_grid(true, ngrid, cutoff, 'i', true); + ao_->set_uniform_grid(true, ngrid, cutoff, 'i', true); + overlap_calculator_->tabulate(*ao_, *nao_, 'S', ngrid, cutoff); + + // prepare for Ylm, if this is not called, the Ylm will not be available and always + // return 0.0 + ModuleBase::Ylm::set_coefficients(); + + // based on built RadialCollection(s), allocate memory for overlap integrals + allocate_ovlp(true); allocate_ovlp(false); +} + +void toQO::build_nao(const int ntype, + const std::string orbital_dir, + const std::string* const orbital_fn, + const int rank) +{ + // build the numerical atomic orbital basis + ModuleBase::SphericalBesselTransformer sbt; + nao_ = std::unique_ptr(new RadialCollection); + int ntype_ = ntype; +#ifdef __MPI + Parallel_Common::bcast_int(ntype_); +#endif + std::string* orbital_fn_ = new std::string[ntype_]; + if(rank == 0) + { + for(int it = 0; it < ntype_; it++) + { + orbital_fn_[it] = orbital_dir + orbital_fn[it]; + } + } +#ifdef __MPI + Parallel_Common::bcast_string(orbital_fn_, ntype_); +#endif + // this method is done by RANK-0, then broadcast to other processes. + nao_->build(ntype_, orbital_fn_, 'o'); + nao_->set_transformer(sbt); + // indexing, all processes can do together. It is also cumbersome to broadcast a std::map of std::tuple + // by ABACUS self-built MPI broadcast function, so the following indexing is done by all processes, + // directly. + radialcollection_indexing(*nao_, na_, false, index_nao_, rindex_nao_); + nphi_ = index_nao_.size(); + + delete[] orbital_fn_; + if(rank == 0) + { + std::string nao_build_info = "toQO::build_nao: built numerical atomic orbitals for calculating QO overlap integrals\n"; + nao_build_info += "Number of columns in QO_ovlp_*.dat: " + std::to_string(nphi_) + "\n"; + nao_build_info += "Orbitals arrange in sequence of (it, ia, l, zeta, m), m in order of 0, 1, -1, 2, -2, ...\n"; + printf("%s", nao_build_info.c_str()); + } +} + +bool toQO::orbital_filter_out(const int& itype, + const int& l, + const int& izeta) +{ + // true = filter out, false = not filter out = keep + // this function works for RadialCollection, to select the orbitals of interest + std::vector l2symbol = {"s", "p", "d", "f", "g"}; // seems enough + if(qo_basis_ == "pswfc") + { + // for pswfc, what supports is specifying the name of subshell layer, like + // qo_strategy sp spdf + // means for the first atom type, use s and p orbitals, for the second, use + // s, p, d, and f orbitals + // default is `all` for all types, and for each type, all orbitals are used + if(strategies_[itype] == "all") return false; + else if(l >= l2symbol.size()) return true; + else if(strategies_[itype].find_first_of(l2symbol[l]) != std::string::npos) return false; + else return true; + } + else if(qo_basis_ == "szv") + { + // use two individual logic branch allows them have different orbital filtering logic, + // although presently they are almost the same + if(izeta != 0) return true; // filter out + else if(strategies_[itype] == "all") return false; // keep + else if(l >= l2symbol.size()) return true; // filter out + else if(strategies_[itype].find_first_of(l2symbol[l]) != std::string::npos) return false; // keep + else return true; // filter out + } + else return false; +} + +void toQO::build_hydrogen(const int ntype, + const double* const charges, + const bool slater_screening, + const int* const nmax, + const double qo_thr, + const int rank) +{ + ModuleBase::SphericalBesselTransformer sbt; + ao_ = std::unique_ptr(new RadialCollection); + // for this method, all processes CAN do together, there is no apparent conflict between processes + ao_->build(ntype, charges, slater_screening, nmax, symbols_.data(), qo_thr, strategies_.data(), rank); + ao_->set_transformer(sbt); + // indexing, all processes can do together. It is also cumbersome to broadcast a std::map of std::tuple + // by ABACUS self-built MPI broadcast function, so the following indexing is done by all processes, + // directly. + radialcollection_indexing(*ao_, na_, true, index_ao_, rindex_ao_); + nchi_ = index_ao_.size(); +} + +void toQO::build_pswfc(const int ntype, + const std::string pseudo_dir, + const std::string* const pspot_fn, + const double* const screening_coeffs, + const double qo_thr, + const int rank) +{ + ModuleBase::SphericalBesselTransformer sbt; + ao_ = std::unique_ptr(new RadialCollection); + int ntype_ = ntype; +#ifdef __MPI + Parallel_Common::bcast_int(ntype_); +#endif + std::string* pspot_fn_ = new std::string[ntype_]; + for(int it = 0; it < ntype; it++) + { + pspot_fn_[it] = pseudo_dir + pspot_fn[it]; + } +#ifdef __MPI + Parallel_Common::bcast_string(pspot_fn_, ntype_); +#endif + // for this method, all processes MIGHT NOT do together, because of possible conflict of reading files + // in the following build function, the file reading is done by RANK-0, then broadcast to other processes + // this MPI strategy is done by refactoring PswfcRadials instance. For details, see the impelementation + // of build function of PswfcRadials: source/module_basis/module_nao/pswfc_radials.cpp + ao_->build(ntype, pspot_fn_, screening_coeffs, qo_thr, rank); + ao_->set_transformer(sbt); + // indexing, all processes can do together. It is also cumbersome to broadcast a std::map of std::tuple + // by ABACUS self-built MPI broadcast function, so the following indexing is done by all processes, + // directly. + radialcollection_indexing(*ao_, na_, true, index_ao_, rindex_ao_); + nchi_ = index_ao_.size(); + delete[] pspot_fn_; +} + +void toQO::build_szv() +{ + // build the numerical atomic orbital basis + ModuleBase::SphericalBesselTransformer sbt; + ao_ = std::unique_ptr(new RadialCollection(*nao_)); + ao_->set_transformer(sbt); + // indexing, all processes can do together. It is also cumbersome to broadcast a std::map of std::tuple + // by ABACUS self-built MPI broadcast function, so the following indexing is done by all processes, + // directly. + radialcollection_indexing(*ao_, na_, true, index_ao_, rindex_ao_); + nchi_ = index_ao_.size(); +} + +void toQO::build_ao(const int ntype, + const std::string pseudo_dir, + const std::string* const pspot_fn, + const std::vector screening_coeffs, + const double qo_thr, + const std::ofstream& ofs_running, + const int rank) +{ + if(qo_basis_ == "hydrogen") + { + bool with_slater_screening = std::find_if(screening_coeffs.begin(), screening_coeffs.end(), + [](double sc) { return sc > 1e-10; }) != screening_coeffs.end(); + build_hydrogen(ntype_, /// ntype + charges_.data(), /// charges + with_slater_screening, /// slater_screening + nmax_.data(), /// nmax + qo_thr, /// qo_thr + rank); /// rank + } + else if(qo_basis_ == "pswfc") + { + build_pswfc(ntype_, /// ntype + pseudo_dir, /// pseudo_dir + pspot_fn, /// pspot_fn + screening_coeffs.data(), /// screening_coeffs + qo_thr, /// qo_thr + rank); /// rank + } + else if(qo_basis_ == "szv") build_szv(); + if(rank == 0) + { + std::string ao_build_info = "toQO::build_ao: built atomic orbitals for calculating QO overlap integrals\n"; + ao_build_info += "Atom-centered orbital to project is: " + qo_basis_ + "\n"; + ao_build_info += "Number of rows in QO_ovlp_*.dat: " + std::to_string(nchi_) + "\n"; + ao_build_info += "Orbitals arrange in sequence of (it, ia, l, zeta, m), m in order of 0, 1, -1, 2, -2, ...\n"; + printf("%s", ao_build_info.c_str()); + } +} + +void toQO::calculate_ovlpR(const int iR) +{ + assert (rindex_ao_.size() == nchi_); + assert (rindex_nao_.size() == nphi_); + for(int irow = 0; irow < nchi_; irow++) + { + // it, ia, li, izeta, mi + std::tuple orb1 = rindex_ao_[irow]; + int it = std::get<0>(orb1); + int ia = std::get<1>(orb1); + int li = std::get<2>(orb1); + int izeta = std::get<3>(orb1); + int mi = std::get<4>(orb1); + for(int icol = 0; icol < nphi_; icol++) + { + // jt, ja, lj, jzeta, mj + std::tuple orb2 = rindex_nao_[icol]; + int jt = std::get<0>(orb2); + int ja = std::get<1>(orb2); + int lj = std::get<2>(orb2); + int jzeta = std::get<3>(orb2); + int mj = std::get<4>(orb2); + ModuleBase::Vector3 rij = p_ucell_->atoms[jt].tau[ja] - p_ucell_->atoms[it].tau[ia]; + // there is waste here, but for easy to understand, I don't optimize it. + ModuleBase::Vector3 R = supercells_[iR]; + ModuleBase::Vector3 Rij; + Rij.x = rij.x + double(R.x) * p_ucell_->a1.x + + double(R.y) * p_ucell_->a2.x + + double(R.z) * p_ucell_->a3.x; + Rij.y = rij.y + double(R.x) * p_ucell_->a1.y + + double(R.y) * p_ucell_->a2.y + + double(R.z) * p_ucell_->a3.y; + Rij.z = rij.z + double(R.x) * p_ucell_->a1.z + + double(R.y) * p_ucell_->a2.z + + double(R.z) * p_ucell_->a3.z; + Rij *= p_ucell_->lat0; // convert to Bohr + overlap_calculator_->calculate( + it, li, izeta, mi, + jt, lj, jzeta, mj, + Rij, &ovlpR_[irow*nphi_+icol] + ); + } + } +} + +void toQO::calculate_ovlpk(int ik) +{ + // On the parallelization of toQO module + // 2024-03-12, kirk0830 + // Let's plant trees! + // present parallelization strategy will brings a little bit of burden to the disk IO + // another disk-friendly parallelization strategy is to save all two-center integrals + // on one single process and broadcast to other processes. This is more memory-consuming, + // but less disk IO. + + // for the first run, need to calculate all two-center integrals in realspace. + // the calculation of two-center integrals in realspace is also parallelized. + // but to avoid high frequency of sending and receiving messages, use file to + // store the results of two-center integrals in realspace. Then read the files + // and calculate the two-center integrals in k-space. + if(ik == iks_[0]) + { + for(auto iR: iRs_) + { + calculate_ovlpR(iR); + write_ovlp(out_dir_, ovlpR_, nchi_, nphi_, true, iR); + } + } + // then read and calculate all ks corresponding two-center integrals on own process + // there is a way to avoid the conflict of reading files between different processes, + // that is, when proc1 is reading R1, let proc2 read R2, and so on. After the first + // round of reading, then proc1 reads R2, proc2 reads R3, and so on. This way, everytime + // before a new-reading, should all processes be synchronized. + for(int iR = 0; iR < nR_tot_; iR++) + { + int barrier_iR = (iR + iproc_) % nR_tot_; +#ifdef __MPI + // the following MPI_Barrier ensures two unexpected things, the first has been mentioned + // above, the second is that, avoid the case for one process has finished calculation + // of integral in realspace and ready for calculating in kspace but other processes are + // still calculating in realspace, if that happens, the faster process can not find all + // the files needed, which are, all QO_ovlpR_*.dat files. + MPI_Barrier(MPI_COMM_WORLD); +#endif + // ik == -1 corresponds to the case of those processes with less kpoints than others + if(ik != -1) read_ovlp(out_dir_, nchi_, nphi_, true, barrier_iR); + if(ik != -1) append_ovlpR_eiRk(ik, barrier_iR); + } +} + +void toQO::calculate() +{ + for(auto ik: iks_) + { +#ifdef __MPI + // we must enforce the process to be highly synchronized and as much as possible near the REAL + // kpoint parallelism because need to avoid the possible conflict of reading files between + // different processes + MPI_Barrier(MPI_COMM_WORLD); +#endif + // while for zero_out overlap, it can be not so strictly synchronized + zero_out_ovlps(false); + calculate_ovlpk(ik); + if(ik != -1) write_ovlp>(out_dir_, ovlpk_, nchi_, nphi_, false, ik); + } +#ifdef __MPI + // once the calculation of S(k) is finished, prone to delete all QO_ovlpR_*.dat files. But the most + // important thing is to ensure all processes have finished the calculation of S(k), so MPI_Barrier. + MPI_Barrier(MPI_COMM_WORLD); +#endif + // delete all QO_ovlpR_* files + if(iproc_ == 0) + { + for(int iR = 0; iR < nR_tot_; iR++) + { + std::string filename = out_dir_ + "/QO_ovlpR_" + std::to_string(iR) + ".dat"; + std::remove(filename.c_str()); + } + printf("toQO::calculate: calculation of S(k) done, run /tools/qo/postprocess.py to do representation transform.\n"); + } +} + +void toQO::append_ovlpR_eiRk(int ik, int iR) +{ + // calculate sum S(R)*eiRk = S(k) + ModuleBase::Vector3 R(double(supercells_[iR].x), double(supercells_[iR].y), double(supercells_[iR].z)); + double arg = (kvecs_d_[ik] * R) * ModuleBase::TWO_PI; + double sinp, cosp; + ModuleBase::libm::sincos(arg, &sinp, &cosp); + std::complex phase = std::complex(cosp, sinp); + // add all values of ovlpR_ to ovlpk_ with multiplication of phase + for(int i = 0; i < nchi_ * nphi_; i++) ovlpk_[i] += ovlpR_[i] * phase; +} + +void toQO::allocate_ovlp(const bool& is_R) +{ + if(is_R) ovlpR_.resize(nchi_ * nphi_, 0.0); + else ovlpk_.resize(nchi_ * nphi_, std::complex(0.0, 0.0)); +} + +void toQO::deallocate_ovlp(const bool& is_R) +{ + if(is_R) {ovlpR_.clear(); ovlpR_.shrink_to_fit();} + else {ovlpk_.clear(); ovlpk_.shrink_to_fit();} +} + +void toQO::zero_out_ovlps(const bool& is_R) +{ + if(is_R) std::fill(ovlpR_.begin(), ovlpR_.end(), 0.0); + else std::fill(ovlpk_.begin(), ovlpk_.end(), std::complex(0.0, 0.0)); +} + +void toQO::radialcollection_indexing(const RadialCollection& radcol, + const std::vector& natoms, + const bool& with_filter, + std::map,int>& index_map, + std::map>& index_map_reverse) +{ + // in RadialCollection, radials are stored type by type and actually not relevant with exact atom index, + // so the number of atom of each type is external information. + // the map should be like: (itype, iatom, l, izeta, m) -> index and the reverse one is index -> (itype, iatom, l, izeta, m) + int index = 0; + for(int itype = 0; itype < radcol.ntype(); itype++) + { + for(int iatom = 0; iatom < natoms[itype]; iatom++) + { + for(int l = 0; l <= radcol.lmax(itype); l++) + { + std::vector ms; + for(int m_abs = 0; m_abs <= l; m_abs++) + { + ms.push_back(m_abs); + if(m_abs != 0) ms.push_back(-m_abs); + } + for(int izeta = 0; izeta < radcol.nzeta(itype, l); izeta++) + { + // usually, the orbital is distinguished by it, l and zeta, the ia and m are not + // commonly used. + if(orbital_filter_out(itype, l, izeta)&&with_filter) continue; + for(int m: ms) + { + index_map[std::make_tuple(itype, iatom, l, izeta, m)] = index; + index_map_reverse[index] = std::make_tuple(itype, iatom, l, izeta, m); + index++; + } + } + } + } + } +} + +// template function definition +// 20240310 make compatible with R space matrices +template +void toQO::write_ovlp(const std::string& dir, + const std::vector &ovlp, + const int& nrows, + const int& ncols, + const bool& is_R, + const int& i) +{ + std::string filename = is_R? "QO_ovlpR_" + std::to_string(i) + ".dat": "QO_ovlp_" + std::to_string(i) + ".dat"; + std::ofstream ofs(dir + filename); + if(!ofs.is_open()) + { + ModuleBase::WARNING_QUIT("toQO::write_ovlp", "can not open file: " + filename); + } + if(is_R) + { + ofs << "SUPERCELL_COORDINATE: " << std::setw(5) << std::right << supercells_[i].x << " " + << std::setw(5) << std::right << supercells_[i].y << " " + << std::setw(5) << std::right << supercells_[i].z << std::endl; + } + else + { + ofs << "KPOINT_COORDINATE: " << std::setw(22) << std::setprecision(14) << std::right << std::scientific << kvecs_d_[i].x << " " + << std::setw(22) << std::setprecision(14) << std::right << std::scientific << kvecs_d_[i].y << " " + << std::setw(22) << std::setprecision(14) << std::right << std::scientific << kvecs_d_[i].z << std::endl; + } + for(int irow = 0; irow < nrows; irow++) + { + for(int icol = 0; icol < ncols; icol++) + { + ofs << std::setw(22) << std::setprecision(14) << std::right << std::scientific << ovlp[irow*ncols+icol] << " "; + } + ofs << std::endl; + } + ofs.close(); +} +// explicit instantiation +template void toQO::write_ovlp(const std::string& dir, const std::vector& ovlp, const int& nrows, const int& ncols, + const bool& is_R, const int& ik); +template void toQO::write_ovlp>(const std::string& dir, const std::vector>& ovlp, + const int& nrows, const int& ncols, const bool& is_R, const int& ik); +// a free function to convert string storing C++ std::complex to std::complex +// format: (real,imag), both part in scientific format +std::complex str2complex(const std::string& str) +{ + std::string real_str, imag_str; + int i = 1; // skip '(' + while(str[i] != ',') real_str += str[i]; i++; + i++; // skip ',' + while(str[i] != ')') imag_str += str[i]; i++; + return std::complex(std::stod(real_str), std::stod(imag_str)); +} +// complete I/O of QO module +void toQO::read_ovlp(const std::string& dir, + const int& nrows, + const int& ncols, + const bool& is_R, + const int& ik) +{ + zero_out_ovlps(is_R); // clear the ovlp vector before reading + assert (nrows * ncols == nchi_ * nphi_); + std::string filename = is_R? "QO_ovlpR_" + std::to_string(ik) + ".dat": "QO_ovlp_" + std::to_string(ik) + ".dat"; + std::ifstream ifs(dir + "/" + filename); + if(!ifs.is_open()) + { + ModuleBase::WARNING_QUIT("toQO::read_ovlp", "can not open file: " + filename); + } + // read header + std::string line; + std::getline(ifs, line); + // read ovlp values + int inum = 0; + while(ifs.good()) + { + if(is_R) + { + double val; + ifs >> val; inum++; + if(inum <= nchi_ * nphi_) ovlpR_[inum-1] = val; + else break; + } + else + { + std::string val_str; + ifs >> val_str; inum++; + if(inum <= nchi_ * nphi_) ovlpk_[inum-1] = str2complex(val_str); + else break; + } + } +} diff --git a/source/module_io/to_qo_mpi.cpp b/source/module_io/to_qo_mpi.cpp new file mode 100644 index 0000000000..cc30dcb92d --- /dev/null +++ b/source/module_io/to_qo_mpi.cpp @@ -0,0 +1,62 @@ +#include "module_io/to_qo.h" +#ifdef __MPI +#include "../module_base/parallel_common.h" +#endif + +void toQO::bcast_stdvector_ofvector3int(std::vector>& vec) +{ + #ifdef __MPI + int dim; + std::vector vec_1d; + if(iproc_ == 0) + { + dim = vec.size(); + for(int i = 0; i < dim; i++) + { + vec_1d.push_back(vec[i].x); + vec_1d.push_back(vec[i].y); + vec_1d.push_back(vec[i].z); + } + } + Parallel_Common::bcast_int(dim); + if(iproc_ != 0) vec_1d.resize(dim * 3); + Parallel_Common::bcast_int(vec_1d.data(), dim * 3); + if(iproc_ != 0) + { + vec.clear(); vec.resize(dim); + for(int i = 0; i < dim; i++) + { + vec[i] = ModuleBase::Vector3(vec_1d[i*3], vec_1d[i*3+1], vec_1d[i*3+2]); + } + } + #endif +} + +void toQO::bcast_stdvector_ofvector3double(std::vector>& vec) +{ + #ifdef __MPI + int dim; + std::vector vec_1d; + if(iproc_ == 0) + { + dim = vec.size(); + for(int i = 0; i < dim; i++) + { + vec_1d.push_back(vec[i].x); + vec_1d.push_back(vec[i].y); + vec_1d.push_back(vec[i].z); + } + } + Parallel_Common::bcast_int(dim); + if(iproc_ != 0) vec_1d.resize(dim * 3); + Parallel_Common::bcast_double(vec_1d.data(), dim * 3); + if(iproc_ != 0) + { + vec.clear(); vec.resize(dim); + for(int i = 0; i < dim; i++) + { + vec[i] = ModuleBase::Vector3(vec_1d[i*3], vec_1d[i*3+1], vec_1d[i*3+2]); + } + } + #endif +} diff --git a/source/module_io/to_qo_structures.cpp b/source/module_io/to_qo_structures.cpp new file mode 100644 index 0000000000..8af71de255 --- /dev/null +++ b/source/module_io/to_qo_structures.cpp @@ -0,0 +1,298 @@ +#include "module_io/to_qo.h" +#ifdef __MPI +#include "../module_base/parallel_common.h" +#endif +void toQO::read_structures(const UnitCell* p_ucell, + const std::vector>& kvecs_d, + const int& rank, + const int& nranks) +{ + // assume p_ucell will be totally available for all processors if MPI is enabled + p_ucell_ = p_ucell; + + // atom related properties + ntype_ = p_ucell->ntype; + std::for_each(p_ucell->atoms, p_ucell->atoms + p_ucell->ntype, [this](Atom& atom){ + symbols_.push_back(atom.ncpp.psd); + na_.push_back(atom.na); + }); + nmax_.resize(ntype_); + charges_.resize(ntype_); + for(int itype = 0; itype < ntype_; itype++) + { + std::cout << "type " << itype << " " << symbols_[itype] << " strategy: " << strategies_[itype] << std::endl; + nmax_[itype] = (strategies_[itype].substr(0, 6) != "energy")? atom_database_.principle_quantum_number[symbols_[itype]]: atom_database_.atom_Z[symbols_[itype]]; + charges_[itype] = atom_database_.atom_Z[symbols_[itype]]; + } + + // k point related properties + kvecs_d_ = kvecs_d; + nks_ = kvecs_d.size(); + nks_tot_ = nks_; + + iks_ = std::vector(nks_); + for(int i = 0; i < nks_; i++) iks_[i] = i; + + // scatter k points to all ranks if MPI is enabled +#ifdef __MPI + // scatter kvecs_d_ to all ranks + std::vector> nks_divided(nranks); // indiced by iproc, then list of indices of kvecs_d_ + if(rank == 0) + { + int nks = nks_tot_; + int nks_perrank = nks / nranks; + int nks_remain = nks % nranks; + + int start_ik = 0; + for(int i = 0; i < nranks; i++) + { + int nks_this_rank = nks_perrank + int(i < nks_remain); + std::vector nks_this_rank_indices; + for(int j = 0; j < nks_this_rank; j++) + { + nks_this_rank_indices.push_back(start_ik + j); + } + // for those ranks with less k points, pad with -1 + if((i >= nks_remain)&&(nks_remain > 0)) nks_this_rank_indices.push_back(-1); + start_ik += nks_this_rank; + nks_divided[i] = nks_this_rank_indices; + } + } + for(int i = 0; i < nranks; i++) + { + int nks_dim; + if(iproc_ == 0) nks_dim = nks_divided[i].size(); + Parallel_Common::bcast_int(nks_dim); + if(iproc_ != 0) nks_divided[i].resize(nks_dim); + Parallel_Common::bcast_int(nks_divided[i].data(), nks_dim); + } + //bcast_stdvector_ofvector3double(kvecs_d_); // because kvecs_d is already broadcasted in the main program + iks_.clear(); + for(int i = 0; i < nks_divided[rank].size(); i++) + { + if(nks_divided[rank][i] != -1) iks_.push_back(nks_divided[rank][i]); // we want it is explicitly -1 + else iks_.push_back(-1); + } + nks_ = iks_.size(); + + // ensure all kpoints are successfully scattered + MPI_Barrier(MPI_COMM_WORLD); +#endif + if(rank == 0) printf("toQO KPOINTS parallelization: calculation of S(k) will be parallelized on %d processes\n", nranks); +#ifdef __MPI + // the following information should be printed after the report of number of ranks + // therefore barrier to wait rank0. + MPI_Barrier(MPI_COMM_WORLD); + int last_ik_ = (iks_[nks_-1] == -1)? iks_[nks_-2]: iks_[nks_-1]; + printf("KPOINTS distributed on process %d will calculate in range [%d, %d]\n", rank, iks_[0], last_ik_); +#endif +} + +template +void toQO::eliminate_duplicate_vector3(std::vector> &v) +{ + std::vector> v_; + // convert vector3 to vector + for(int i = 0; i < v.size(); i++) + { + v_.push_back(std::vector{v[i].x, v[i].y, v[i].z}); + } + std::sort(v_.begin(), v_.end()); + v_.erase(std::unique(v_.begin(), v_.end()), v_.end()); + v.clear(); + v.resize(v_.size()); + for(int i = 0; i < v_.size(); i++) + { + v[i] = ModuleBase::Vector3(v_[i][0], v_[i][1], v_[i][2]); + } +} +template void toQO::eliminate_duplicate_vector3(std::vector> &v); + +std::vector> toQO::scan_supercell_for_atom(int it, int ia, int start_it, int start_ia) +{ + std::vector> n1n2n3; + // cutoff radius of numerical atomic orbital of atom itia + double rcut_i = ao_->rcut_max(it); + // lattice vectors + for(int itype = start_it; itype < p_ucell_->ntype; itype++) + { + for(int iatom = start_ia; iatom < p_ucell_->atoms[itype].na; iatom++) + { + double rcut_j = nao_->rcut_max(itype); + ModuleBase::Vector3 rij = p_ucell_->atoms[itype].tau[iatom] - p_ucell_->atoms[it].tau[ia]; // in unit lat0? + int n1 = 0; int n2 = 0; int n3 = 0; + // calculate the sup of n1, n2, n3 + // rcut_i, j in bohr! a1, a2 and a3 are in lat0, so multiply with lat0 + // int n1max = int(std::ceil((rcut_i + rcut_j)/p_ucell_->a1.norm()/p_ucell_->lat0)); + // int n2max = int(std::ceil((rcut_i + rcut_j)/p_ucell_->a2.norm()/p_ucell_->lat0)); + // int n3max = int(std::ceil((rcut_i + rcut_j)/p_ucell_->a3.norm()/p_ucell_->lat0)); + ModuleBase::Vector3 a1_in_Bohr = p_ucell_->a1 * p_ucell_->lat0; + ModuleBase::Vector3 a2_in_Bohr = p_ucell_->a2 * p_ucell_->lat0; + ModuleBase::Vector3 a3_in_Bohr = p_ucell_->a3 * p_ucell_->lat0; + double rcut_ij = rcut_i + rcut_j; + std::vector n1n2n3_max = rcut_to_supercell_index(rcut_ij, a1_in_Bohr, a2_in_Bohr, a3_in_Bohr); + // scan n1, n2, n3 + for(int n1 = -n1n2n3_max[0]; n1 <= n1n2n3_max[0]; n1++) + { + for(int n2 = -n1n2n3_max[1]; n2 <= n1n2n3_max[1]; n2++) + { + for(int n3 = -n1n2n3_max[2]; n3 <= n1n2n3_max[2]; n3++) + { + double f = norm2_rij_supercell(rij, n1, n2, n3); + if(f < std::pow(rcut_i + rcut_j, 2)) + { + n1n2n3.push_back(ModuleBase::Vector3(n1, n2, n3)); + } + } + } + } + } + } + eliminate_duplicate_vector3(n1n2n3); + return n1n2n3; +} + +double cosine_between_vector3(ModuleBase::Vector3 v1, ModuleBase::Vector3 v2) +{ + double f = v1 * v2; + f /= v1.norm(); + f /= v2.norm(); + return f; +} + +std::vector toQO::rcut_to_supercell_index(double rcut, ModuleBase::Vector3 a, ModuleBase::Vector3 b, ModuleBase::Vector3 c) +{ + double fab = std::sqrt(1-std::pow(cosine_between_vector3(a, b), 2)); + double fac = std::sqrt(1-std::pow(cosine_between_vector3(a, c), 2)); + double fbc = std::sqrt(1-std::pow(cosine_between_vector3(b ,c), 2)); + double fa = std::min(fab, fac); + double fb = std::min(fab, fbc); + double fc = std::min(fac, fbc); + int n1max = int(std::ceil(rcut/a.norm()/fa)); + int n2max = int(std::ceil(rcut/b.norm()/fb)); + int n3max = int(std::ceil(rcut/c.norm()/fc)); + std::vector n1n2n3 = {n1max, n2max, n3max}; + return n1n2n3; +} + +double toQO::norm2_rij_supercell(ModuleBase::Vector3 rij, int n1, int n2, int n3) +{ + double f = rij * rij; + f += n1*n1*(p_ucell_->a1*p_ucell_->a1); + f += n2*n2*(p_ucell_->a2*p_ucell_->a2); + f += n3*n3*(p_ucell_->a3*p_ucell_->a3); + f += 2*n1*n2*(p_ucell_->a1*p_ucell_->a2); + f += 2*n1*n3*(p_ucell_->a1*p_ucell_->a3); + f += 2*n2*n3*(p_ucell_->a2*p_ucell_->a3); + f += 2*n1*(p_ucell_->a1*rij); + f += 2*n2*(p_ucell_->a2*rij); + f += 2*n3*(p_ucell_->a3*rij); + return f; +} + +void toQO::scan_supercell(const int& rank, const int& nranks) +{ + if(rank == 0) + { + std::vector> n1n2n3_overall; + for(int it = 0; it < p_ucell_->ntype; it++) + { + for(int ia = 0; ia < p_ucell_->atoms[it].na; ia++) + { + std::vector> n1n2n3 = scan_supercell_for_atom(it, ia); + n1n2n3_overall.insert(n1n2n3_overall.end(), n1n2n3.begin(), n1n2n3.end()); + } + } + // delete duplicates + eliminate_duplicate_vector3(n1n2n3_overall); + + supercells_ = n1n2n3_overall; + nR_ = supercells_.size(); + nR_tot_ = nR_; + + iRs_ = std::vector(nR_); + for(int i = 0; i < nR_; i++) iRs_[i] = i; + + write_supercells(); + } + /*-------------------------------------------------------------------------------------------*/ +#ifdef __MPI // scatter supercells_ to all ranks + Parallel_Common::bcast_int(nR_); + Parallel_Common::bcast_int(nR_tot_); + bcast_stdvector_ofvector3int(supercells_); + // scatter + std::vector> nR_divided(nranks); // indiced by iproc, then list of indices of supercells_ + if(rank == 0) + { + // divide nR into std::vector of std::vector, each std::vector is a chunk of indices of supercells_ + int nRs = nR_; + int nRs_perrank = nRs / nranks; + int nRs_remain = nRs % nranks; + + int start_iR = 0; + for(int i = 0; i < nranks; i++) + { + int nR_this_rank = nRs_perrank + int(i < nRs_remain); + std::vector nR_this_rank_indices; + for(int j = 0; j < nR_this_rank; j++) + { + nR_this_rank_indices.push_back(start_iR + j); + } + start_iR += nR_this_rank; + nR_divided[i] = nR_this_rank_indices; + } + } + for(int i = 0; i < nranks; i++) + { + int nR_dim; + if(rank == 0) nR_dim = nR_divided[i].size(); + Parallel_Common::bcast_int(nR_dim); + if(rank != 0) nR_divided[i].resize(nR_dim); + Parallel_Common::bcast_int(nR_divided[i].data(), nR_dim); + } + iRs_.clear(); + for(int i = 0; i < nR_divided[rank].size(); i++) iRs_.push_back(nR_divided[rank][i]); + nR_ = iRs_.size(); + + MPI_Barrier(MPI_COMM_WORLD); +#endif + if(rank == 0) printf("toQO SUPERCELLS parallelization: calculation of S(R) will be parallelized on %d processes\n", nranks); +#ifdef __MPI + MPI_Barrier(MPI_COMM_WORLD); + int last_iR_ = nR_ - 1; + printf("SUPERCELLS distributed on process %d will calculate in range [%d, %d]\n", rank, iRs_[0], iRs_[last_iR_]); +#endif +} + +ModuleBase::Vector3 toQO::cal_two_center_vector(ModuleBase::Vector3 rij, + ModuleBase::Vector3 R) +{ + ModuleBase::Vector3 Rij; + Rij.x = rij.x + R.x * p_ucell_->a1.x + + R.y * p_ucell_->a2.x + + R.z * p_ucell_->a3.x; + Rij.y = rij.y + R.x * p_ucell_->a1.y + + R.y * p_ucell_->a2.y + + R.z * p_ucell_->a3.y; + Rij.z = rij.z + R.x * p_ucell_->a1.z + + R.y * p_ucell_->a2.z + + R.z * p_ucell_->a3.z; + return Rij; +} + +void toQO::write_supercells() +{ + std::ofstream ofs(out_dir_ + "QO_supercells.dat"); + if(!ofs.is_open()) + { + ModuleBase::WARNING_QUIT("toQO::write_supercells", "can not open file: QO_supercells.dat"); + } + for(int i = 0; i < supercells_.size(); i++) + { + ofs << std::setw(5) << std::right << supercells_[i].x << " " + << std::setw(5) << std::right << supercells_[i].y << " " + << std::setw(5) << std::right << supercells_[i].z << std::endl; + } + ofs.close(); +} + diff --git a/source/module_io/to_qo_tools.cpp b/source/module_io/to_qo_tools.cpp deleted file mode 100644 index 4cb7cad72e..0000000000 --- a/source/module_io/to_qo_tools.cpp +++ /dev/null @@ -1,381 +0,0 @@ -#include "module_io/to_qo.h" -#include "module_base/libm/libm.h" - -void toQO::unwrap_unitcell(UnitCell* p_ucell) -{ - p_ucell_ = p_ucell; - ntype_ = p_ucell->ntype; - std::for_each(p_ucell->atoms, p_ucell->atoms + p_ucell->ntype, [this](Atom& atom){ - symbols_.push_back(atom.ncpp.psd); - na_.push_back(atom.na); - }); - nmax_.resize(ntype_); - charges_.resize(ntype_); - for(int itype = 0; itype < ntype_; itype++) - { - std::cout << "type " << itype << " " << symbols_[itype] << " strategy: " << strategies_[itype] << std::endl; - nmax_[itype] = (strategies_[itype].substr(0, 6) != "energy")? atom_database_.principle_quantum_number[symbols_[itype]]: atom_database_.atom_Z[symbols_[itype]]; - charges_[itype] = atom_database_.atom_Z[symbols_[itype]]; - } -} - -template -void toQO::eliminate_duplicate_vector3(std::vector> &v) -{ - std::vector> v_; - // convert vector3 to vector - for(int i = 0; i < v.size(); i++) - { - v_.push_back(std::vector{v[i].x, v[i].y, v[i].z}); - } - std::sort(v_.begin(), v_.end()); - v_.erase(std::unique(v_.begin(), v_.end()), v_.end()); - v.clear(); - v.resize(v_.size()); - for(int i = 0; i < v_.size(); i++) - { - v[i] = ModuleBase::Vector3(v_[i][0], v_[i][1], v_[i][2]); - } -} -template void toQO::eliminate_duplicate_vector3(std::vector> &v); - -void toQO::deallocate_ovlp(const bool is_R) -{ - if(nchi_ == 0 || nphi_ == 0) - { - ModuleBase::WARNING_QUIT("toQO::deallocate_ovlp", "nchi_ or nphi_ is zero, which means not properly initialized."); - } - if(is_R) - { - int nR = save_mem_? 1 : nR_; - for(int iR = 0; iR < nR; iR++) - { - for(int i = 0; i < ovlp_R_[iR].size(); i++) - { - ovlp_R_[iR][i].clear(); - } - ovlp_R_[iR].clear(); - } - ovlp_R_.clear(); - } - else - { - for(int i = 0; i < ovlp_k_.size(); i++) - { - ovlp_k_[i].clear(); - } - ovlp_k_.clear(); - } -} - -void toQO::allocate_ovlp(const bool is_R) -{ - - if(nchi_ == 0 || nphi_ == 0) - { - ModuleBase::WARNING_QUIT("toQO::allocate_ovlp", "nchi_ or nphi_ is zero, which means not properly initialized."); - } - if(is_R) - { - int nR = save_mem_? 1 : nR_; - // allocate memory for ovlp_R_ - for(int iR = 0; iR < nR; iR++) - { - RealMatrix matrix; - for(int i = 0; i < nchi_; i++) - { - std::vector row; - for(int j = 0; j < nphi_; j++) - { - row.push_back(0.0); - } - matrix.push_back(row); - } - ovlp_R_.push_back(matrix); - } - } - else - { - // allocate memory for ovlp_k_ - for(int i = 0; i < nchi_; i++) - { - std::vector> row; - for(int j = 0; j < nphi_; j++) - { - row.push_back(std::complex(0.0, 0.0)); - } - ovlp_k_.push_back(row); - } - } -} - -void toQO::clean_up() -{ - if(nchi_ == 0 || nphi_ == 0) - { - ModuleBase::WARNING_QUIT("toQO::allocate", "nchi_ or nphi_ is zero, which means not properly initialized."); - } - deallocate_ovlp(true); - deallocate_ovlp(false); - allocate_ovlp(true); - allocate_ovlp(false); -} - -void toQO::zero_out_ovlps(const bool is_R) -{ - if(nchi_ == 0 || nphi_ == 0) - { - ModuleBase::WARNING_QUIT("toQO::zero_out_ovlps", "nchi_ or nphi_ is zero, which means not properly initialized."); - } - if(is_R) - { - int nR = save_mem_? 1 : nR_; - for(int iR = 0; iR < nR; iR++) - { - for(int i = 0; i < nchi_; i++) - { - for(int j = 0; j < nphi_; j++) - { - ovlp_R_[iR][i][j] = 0.0; - } - } - } - } - else - { - for(int i = 0; i < nchi_; i++) - { - for(int j = 0; j < nphi_; j++) - { - ovlp_k_[i][j] = std::complex(0.0, 0.0); - } - } - } -} - -std::vector> toQO::scan_supercell_for_atom(int it, int ia, int start_it, int start_ia) -{ - std::vector> n1n2n3; - // cutoff radius of numerical atomic orbital of atom itia - double rcut_i = ao_->rcut_max(it); - if(rcut_i > 10) - { - #ifdef __MPI - if(GlobalV::MY_RANK == 0) - { - #endif - std::cout << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl - << "! Warning: rcut_i of atom in type " << it << " and index " << ia << " is larger than 10 bohr: " << std::fixed << rcut_i << " ." << std::endl - << "! This value has been larger than maximal cutoff radius of numerical orbitals, " << std::endl - << "! will brings about high computational cost and make k <-> R transform" << std::endl - << "! possibly not reversible. Suggest to try other qo_basis." << std::endl - << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; - #ifdef __MPI - } - #endif - } - // lattice vectors - for(int itype = start_it; itype < p_ucell_->ntype; itype++) - { - for(int iatom = start_ia; iatom < p_ucell_->atoms[itype].na; iatom++) - { - double rcut_j = nao_->rcut_max(itype); - ModuleBase::Vector3 rij = p_ucell_->atoms[itype].tau[iatom] - p_ucell_->atoms[it].tau[ia]; // in unit lat0? - int n1 = 0; int n2 = 0; int n3 = 0; - // calculate the sup of n1, n2, n3 - // rcut_i, j in bohr! a1, a2 and a3 are in lat0, so multiply with lat0 - // int n1max = int(std::ceil((rcut_i + rcut_j)/p_ucell_->a1.norm()/p_ucell_->lat0)); - // int n2max = int(std::ceil((rcut_i + rcut_j)/p_ucell_->a2.norm()/p_ucell_->lat0)); - // int n3max = int(std::ceil((rcut_i + rcut_j)/p_ucell_->a3.norm()/p_ucell_->lat0)); - ModuleBase::Vector3 a1_in_Bohr = p_ucell_->a1 * p_ucell_->lat0; - ModuleBase::Vector3 a2_in_Bohr = p_ucell_->a2 * p_ucell_->lat0; - ModuleBase::Vector3 a3_in_Bohr = p_ucell_->a3 * p_ucell_->lat0; - double rcut_ij = rcut_i + rcut_j; - std::vector n1n2n3_max = rcut_to_supercell_index(rcut_ij, a1_in_Bohr, a2_in_Bohr, a3_in_Bohr); - // scan n1, n2, n3 - for(int n1 = -n1n2n3_max[0]; n1 <= n1n2n3_max[0]; n1++) - { - for(int n2 = -n1n2n3_max[1]; n2 <= n1n2n3_max[1]; n2++) - { - for(int n3 = -n1n2n3_max[2]; n3 <= n1n2n3_max[2]; n3++) - { - double f = norm2_rij_supercell(rij, n1, n2, n3); - if(f < std::pow(rcut_i + rcut_j, 2)) - { - n1n2n3.push_back(ModuleBase::Vector3(n1, n2, n3)); - } - } - } - } - } - } - eliminate_duplicate_vector3(n1n2n3); - return n1n2n3; -} - -double cosine_between_vector3(ModuleBase::Vector3 v1, ModuleBase::Vector3 v2) -{ - double f = v1 * v2; - f /= v1.norm(); - f /= v2.norm(); - return f; -} - -std::vector toQO::rcut_to_supercell_index(double rcut, ModuleBase::Vector3 a, ModuleBase::Vector3 b, ModuleBase::Vector3 c) -{ - double fab = std::sqrt(1-std::pow(cosine_between_vector3(a, b), 2)); - double fac = std::sqrt(1-std::pow(cosine_between_vector3(a, c), 2)); - double fbc = std::sqrt(1-std::pow(cosine_between_vector3(b ,c), 2)); - double fa = std::min(fab, fac); - double fb = std::min(fab, fbc); - double fc = std::min(fac, fbc); - int n1max = int(std::ceil(rcut/a.norm()/fa)); - int n2max = int(std::ceil(rcut/b.norm()/fb)); - int n3max = int(std::ceil(rcut/c.norm()/fc)); - std::vector n1n2n3 = {n1max, n2max, n3max}; - return n1n2n3; -} - -double toQO::norm2_rij_supercell(ModuleBase::Vector3 rij, int n1, int n2, int n3) -{ - double f = rij * rij; - f += n1*n1*(p_ucell_->a1*p_ucell_->a1); - f += n2*n2*(p_ucell_->a2*p_ucell_->a2); - f += n3*n3*(p_ucell_->a3*p_ucell_->a3); - f += 2*n1*n2*(p_ucell_->a1*p_ucell_->a2); - f += 2*n1*n3*(p_ucell_->a1*p_ucell_->a3); - f += 2*n2*n3*(p_ucell_->a2*p_ucell_->a3); - f += 2*n1*(p_ucell_->a1*rij); - f += 2*n2*(p_ucell_->a2*rij); - f += 2*n3*(p_ucell_->a3*rij); - return f; -} - -void toQO::scan_supercell() -{ - std::vector> n1n2n3_overall; - for(int it = 0; it < p_ucell_->ntype; it++) - { - for(int ia = 0; ia < p_ucell_->atoms[it].na; ia++) - { - std::vector> n1n2n3 = scan_supercell_for_atom(it, ia); - n1n2n3_overall.insert(n1n2n3_overall.end(), n1n2n3.begin(), n1n2n3.end()); - } - } - // delete duplicates - eliminate_duplicate_vector3(n1n2n3_overall); - - supercells_ = n1n2n3_overall; - nR_ = supercells_.size(); -} - -ModuleBase::Vector3 toQO::cal_two_center_vector(ModuleBase::Vector3 rij, - ModuleBase::Vector3 R) -{ - ModuleBase::Vector3 Rij; - Rij.x = rij.x + R.x * p_ucell_->a1.x - + R.y * p_ucell_->a2.x - + R.z * p_ucell_->a3.x; - Rij.y = rij.y + R.x * p_ucell_->a1.y - + R.y * p_ucell_->a2.y - + R.z * p_ucell_->a3.y; - Rij.z = rij.z + R.x * p_ucell_->a1.z - + R.y * p_ucell_->a2.z - + R.z * p_ucell_->a3.z; - return Rij; -} - -void toQO::fold_ovlp_R(int ik) -{ - if(save_mem_) // exception handling - { - ModuleBase::WARNING_QUIT("toQO::folding_ovlp_R", "save_mem_ is true, which means ovlp_R_ has only one S(R)."); - } - int nrow = ovlp_R_[0].size(); - int ncol = ovlp_R_[0][0].size(); - // clean up - zero_out_ovlps(false); - // calculate - for(int iR = 0; iR < supercells_.size(); iR++) - { - ModuleBase::Vector3 R(double(supercells_[iR].x), double(supercells_[iR].y), double(supercells_[iR].z)); - double arg = (kvecs_d_[ik] * R) * ModuleBase::TWO_PI; - double sinp, cosp; - ModuleBase::libm::sincos(arg, &sinp, &cosp); - std::complex phase = std::complex(cosp, sinp); - for(int i = 0; i < nrow; i++) - { - for(int j = 0; j < ncol; j++) - { - ovlp_k_[i][j] += phase * ovlp_R_[iR][i][j]; - } - } - } -} - -void toQO::append_ovlp_R_eiRk(int ik, int iR) -{ - // save memory mode, so ovlp_R_ has only one S(R) - if(ovlp_R_.size() > 1) - { - ModuleBase::WARNING_QUIT("toQO::append_ovlp_R_eiRk", "ovlp_R_ has more than one S(R)."); - } - int nrow = ovlp_R_[0].size(); - int ncol = ovlp_R_[0][0].size(); - - // calculate - ModuleBase::Vector3 R(double(supercells_[iR].x), double(supercells_[iR].y), double(supercells_[iR].z)); - double arg = (kvecs_d_[ik] * R) * ModuleBase::TWO_PI; - double sinp, cosp; - ModuleBase::libm::sincos(arg, &sinp, &cosp); - std::complex phase = std::complex(cosp, sinp); - for(int i = 0; i < nrow; i++) - { - for(int j = 0; j < ncol; j++) - { - ovlp_k_[i][j] += phase * ovlp_R_[0][i][j]; - } - } -} - -template -void toQO::write_ovlp(const std::vector> &ovlp, const int& ik) -{ - std::string filename = "QO_ovlp_" + std::to_string(ik) + ".dat"; - std::ofstream ofs(GlobalV::global_out_dir + filename); - if(!ofs.is_open()) - { - ModuleBase::WARNING_QUIT("toQO::write_ovlp", "can not open file: " + filename); - } - // first write kpoint coordinate - ofs << "KPOINT_COORDINATE: " << std::setw(22) << std::setprecision(14) << std::right << std::scientific << kvecs_d_[ik].x << " " - << std::setw(22) << std::setprecision(14) << std::right << std::scientific << kvecs_d_[ik].y << " " - << std::setw(22) << std::setprecision(14) << std::right << std::scientific << kvecs_d_[ik].z << std::endl; - for(int i = 0; i < ovlp.size(); i++) - { - for(int j = 0; j < ovlp[i].size(); j++) - { - ofs << std::setw(22) << std::setprecision(14) << std::right << std::scientific << ovlp[i][j] << " "; - } - ofs << std::endl; - } - ofs.close(); -} -template void toQO::write_ovlp(const std::vector>& ovlp, const int& ik); -template void toQO::write_ovlp>(const std::vector>>& ovlp, const int& ik); - -void toQO::write_supercells() -{ - std::ofstream ofs(GlobalV::global_out_dir + "QO_supercells.dat"); - if(!ofs.is_open()) - { - ModuleBase::WARNING_QUIT("toQO::write_supercells", "can not open file: QO_supercells.dat"); - } - for(int i = 0; i < supercells_.size(); i++) - { - ofs << std::setw(5) << std::right << supercells_[i].x << " " - << std::setw(5) << std::right << supercells_[i].y << " " - << std::setw(5) << std::right << supercells_[i].z << std::endl; - } - ofs.close(); -} \ No newline at end of file diff --git a/source/module_io/to_wannier90_lcao_in_pw.cpp b/source/module_io/to_wannier90_lcao_in_pw.cpp index 14a8dd4e40..bcdc439a40 100644 --- a/source/module_io/to_wannier90_lcao_in_pw.cpp +++ b/source/module_io/to_wannier90_lcao_in_pw.cpp @@ -42,16 +42,13 @@ void toWannier90_LCAO_IN_PW::calculate( Structure_Factor* sf_ptr = const_cast(&sf); ModulePW::PW_Basis_K* wfcpw_ptr = const_cast(wfcpw); + this->psi_init_ = new psi_initializer_nao, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init_ = new psi_initializer_nao, psi::DEVICE_CPU>( - sf_ptr, wfcpw_ptr, &(GlobalC::ucell), &(GlobalC::Pkpoints)); + this->psi_init_->initialize(sf_ptr, wfcpw_ptr, &(GlobalC::ucell), &(GlobalC::Pkpoints), 1, nullptr, GlobalV::MY_RANK); #else - this->psi_init_ = new psi_initializer_nao, psi::DEVICE_CPU>( - sf_ptr, wfcpw_ptr, &(GlobalC::ucell)); + this->psi_init_->initialize(sf_ptr, wfcpw_ptr, &(GlobalC::ucell), 1, nullptr); #endif - this->psi_init_->set_orbital_files(GlobalC::ucell.orbital_fn); - this->psi_init_->initialize_only_once(); - this->psi_init_->cal_ovlp_flzjlq(); + this->psi_init_->tabulate(); this->psi_init_->allocate(true); read_nnkp(kv); @@ -218,14 +215,16 @@ void toWannier90_LCAO_IN_PW::nao_G_expansion( ) { int npwx = wfcpw->npwk_max; - psi::Psi>* psig = this->psi_init_->cal_psig(ik); + this->psi_init_->proj_ao_onkG(ik); + std::weak_ptr>> psig = this->psi_init_->share_psig(); + if(psig.expired()) ModuleBase::WARNING_QUIT("toWannier90_LCAO_IN_PW::nao_G_expansion", "psig is expired"); int nbands = GlobalV::NLOCAL; int nbasis = npwx*GlobalV::NPOL; for (int ib = 0; ib < nbands; ib++) { for (int ig = 0; ig < nbasis; ig++) { - psi(ib, ig) = psig[0](ik, ib, ig); + psi(ib, ig) = psig.lock().get()[0](ik, ib, ig); } } } diff --git a/source/module_io/unk_overlap_lcao.cpp b/source/module_io/unk_overlap_lcao.cpp index 6c26ee05be..6c1af94d33 100644 --- a/source/module_io/unk_overlap_lcao.cpp +++ b/source/module_io/unk_overlap_lcao.cpp @@ -239,10 +239,13 @@ void unkOverlap_lcao::init(const Grid_Technique& gt, std::complex*** wfc return; } +//REMARK: the code next seemed to duplicate with those in +//module_hamilt_pw/hamilt/pwdft/wavefunc.cpp. int unkOverlap_lcao::iw2it(int iw) { int ic, type; ic = 0; + type = 0; for(int it = 0; it < GlobalC::ucell.ntype; it++) { for(int ia = 0; ia < GlobalC::ucell.atoms[it].na; ia++) @@ -255,7 +258,7 @@ int unkOverlap_lcao::iw2it(int iw) { if(ic == iw) { - type = it; + type = it; } ic++; } @@ -270,9 +273,10 @@ int unkOverlap_lcao::iw2ia(int iw) { int ic, na; ic = 0; + na = 0; for(int it = 0; it < GlobalC::ucell.ntype; it++) { - for(int ia = 0; ia< GlobalC::ucell.atoms[it].na; ia++) + for(int ia = 0; ia < GlobalC::ucell.atoms[it].na; ia++) { for(int L = 0; L < GlobalC::ucell.atoms[it].nwl+1; L++) { @@ -282,7 +286,7 @@ int unkOverlap_lcao::iw2ia(int iw) { if(ic == iw) { - na = ia; + na = ia; } ic++; } @@ -297,9 +301,10 @@ int unkOverlap_lcao::iw2iL(int iw) { int ic, iL; ic = 0; + iL = 0; for(int it = 0; it < GlobalC::ucell.ntype; it++) { - for(int ia = 0; ia< GlobalC::ucell.atoms[it].na; ia++) + for(int ia = 0; ia < GlobalC::ucell.atoms[it].na; ia++) { for(int L = 0; L < GlobalC::ucell.atoms[it].nwl+1; L++) { @@ -309,7 +314,7 @@ int unkOverlap_lcao::iw2iL(int iw) { if(ic == iw) { - iL = L; + iL = L; } ic++; } @@ -324,9 +329,10 @@ int unkOverlap_lcao::iw2iN(int iw) { int ic, iN; ic = 0; + iN = 0; for(int it = 0; it < GlobalC::ucell.ntype; it++) { - for(int ia = 0; ia< GlobalC::ucell.atoms[it].na; ia++) + for(int ia = 0; ia < GlobalC::ucell.atoms[it].na; ia++) { for(int L = 0; L < GlobalC::ucell.atoms[it].nwl+1; L++) { @@ -336,7 +342,7 @@ int unkOverlap_lcao::iw2iN(int iw) { if(ic == iw) { - iN = N; + iN = N; } ic++; } @@ -351,9 +357,10 @@ int unkOverlap_lcao::iw2im(int iw) { int ic, im; ic = 0; + im = 0; for(int it = 0; it < GlobalC::ucell.ntype; it++) { - for(int ia = 0; ia< GlobalC::ucell.atoms[it].na; ia++) + for(int ia = 0; ia < GlobalC::ucell.atoms[it].na; ia++) { for(int L = 0; L < GlobalC::ucell.atoms[it].nwl+1; L++) { @@ -363,7 +370,7 @@ int unkOverlap_lcao::iw2im(int iw) { if(ic == iw) { - im = i; + im = i; } ic++; } diff --git a/source/module_io/write_HS_R.cpp b/source/module_io/write_HS_R.cpp index 2fbb56bbca..76bf11c7ca 100644 --- a/source/module_io/write_HS_R.cpp +++ b/source/module_io/write_HS_R.cpp @@ -23,13 +23,13 @@ void ModuleIO::output_HS_R(const int& istep, if(GlobalV::NSPIN==1||GlobalV::NSPIN==4) { // jingan add 2021-6-4, modify 2021-12-2 - UHM.calculate_HSR_sparse(0, sparse_threshold, kv.nmp, p_ham); + UHM.cal_HSR_sparse(0, sparse_threshold, kv.nmp, p_ham); } else if(GlobalV::NSPIN==2) { // save HR of current_spin first - UHM.calculate_HSR_sparse(GlobalV::CURRENT_SPIN, sparse_threshold, kv.nmp, p_ham); - // calculate HR of the other spin + UHM.cal_HSR_sparse(GlobalV::CURRENT_SPIN, sparse_threshold, kv.nmp, p_ham); + // cal HR of the other spin if(GlobalV::VL_IN_H) { int ik = 0; @@ -46,7 +46,7 @@ void ModuleIO::output_HS_R(const int& istep, p_ham->refresh(); p_ham->updateHk(ik); } - UHM.calculate_HSR_sparse(GlobalV::CURRENT_SPIN, sparse_threshold, kv.nmp, p_ham); + UHM.cal_HSR_sparse(GlobalV::CURRENT_SPIN, sparse_threshold, kv.nmp, p_ham); } ModuleIO::save_HSR_sparse(istep, *UHM.LM, sparse_threshold, binary, SR_filename, HR_filename_up, HR_filename_down); @@ -59,6 +59,8 @@ void ModuleIO::output_HS_R(const int& istep, void ModuleIO::output_dH_R(const int& istep, const ModuleBase::matrix& v_eff, LCAO_Hamilt& UHM, + Gint_k& gint_k, // mohan add 2024-04-01 + LCAO_Matrix &lm, // mohan add 2024-04-01 const K_Vectors& kv, const bool& binary, const double& sparse_threshold) @@ -66,11 +68,13 @@ void ModuleIO::output_dH_R(const int& istep, ModuleBase::TITLE("ModuleIO","output_dH_R"); ModuleBase::timer::tick("ModuleIO","output_dH_R"); - UHM.LM->Hloc_fixedR.resize(UHM.LM->ParaV->nnr); - UHM.GK.allocate_pvdpR(); + lm.Hloc_fixedR.resize(lm.ParaV->nnr); + gint_k.allocate_pvdpR(); if(GlobalV::NSPIN==1||GlobalV::NSPIN==4) { - UHM.calculate_dH_sparse(0, sparse_threshold); + // mohan add 2024-04-01 + assert(GlobalV::CURRENT_SPIN==0); + UHM.cal_dH_sparse(GlobalV::CURRENT_SPIN, sparse_threshold, gint_k); } else if(GlobalV::NSPIN==2) { @@ -91,19 +95,20 @@ void ModuleIO::output_dH_R(const int& istep, if(GlobalV::VL_IN_H) { Gint_inout inout(vr_eff1, GlobalV::CURRENT_SPIN, Gint_Tools::job_type::dvlocal); - UHM.GK.cal_gint(&inout); + gint_k.cal_gint(&inout); } } - UHM.calculate_dH_sparse(GlobalV::CURRENT_SPIN, sparse_threshold); + UHM.cal_dH_sparse(GlobalV::CURRENT_SPIN, sparse_threshold, gint_k); } } } - ModuleIO::save_dH_sparse(istep, *UHM.LM, sparse_threshold, binary); + // mohan update 2024-04-01 + ModuleIO::save_dH_sparse(istep, lm, sparse_threshold, binary); UHM.destroy_dH_R_sparse(); - UHM.GK.destroy_pvdpR(); + gint_k.destroy_pvdpR(); ModuleBase::timer::tick("ModuleIO","output_HS_R"); return; @@ -119,7 +124,7 @@ void ModuleIO::output_S_R( ModuleBase::TITLE("ModuleIO","output_S_R"); ModuleBase::timer::tick("ModuleIO","output_S_R"); - UHM.calculate_SR_sparse(sparse_threshold, p_ham); + UHM.cal_SR_sparse(sparse_threshold, p_ham); ModuleIO::save_SR_sparse(*UHM.LM, sparse_threshold, binary, SR_filename); UHM.destroy_all_HSR_sparse(); @@ -148,10 +153,10 @@ void ModuleIO::output_T_R( sst << GlobalV::global_out_dir << TR_filename; } - UHM.calculate_TR_sparse(sparse_threshold); + UHM.cal_TR_sparse(sparse_threshold); ModuleIO::save_TR_sparse(istep, *UHM.LM, sparse_threshold, binary, sst.str().c_str()); UHM.destroy_TR_sparse(); ModuleBase::timer::tick("ModuleIO","output_T_R"); return; -} \ No newline at end of file +} diff --git a/source/module_io/write_HS_R.h b/source/module_io/write_HS_R.h index 5389af2f91..738af1d3a7 100644 --- a/source/module_io/write_HS_R.h +++ b/source/module_io/write_HS_R.h @@ -23,7 +23,9 @@ namespace ModuleIO void output_dH_R( const int &istep, const ModuleBase::matrix& v_eff, - LCAO_Hamilt &UHM, + LCAO_Hamilt &UHM, + Gint_k& gint_k, // mohan add 2024-04-01 + LCAO_Matrix &lm, // mohan add 2024-04-01 const K_Vectors& kv, const bool& binary = false, const double& sparse_threshold = 1e-10); diff --git a/source/module_io/write_Vxc.hpp b/source/module_io/write_Vxc.hpp index baa24ceef3..b9f5c435b9 100644 --- a/source/module_io/write_Vxc.hpp +++ b/source/module_io/write_Vxc.hpp @@ -3,25 +3,45 @@ #include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_dftu_lcao.h" #include "module_base/scalapack_connector.h" #include "module_base/parallel_reduce.h" + template struct TGint; + template <> struct TGint { using type = Gint_Gamma; }; + template <> struct TGint> { using type = Gint_k; }; + + namespace ModuleIO { - inline void gint_vl(Gint_Gamma& gg, Gint_inout& io, LCAO_Matrix& lm) { gg.cal_vlocal(&io, &lm, false); }; - inline void gint_vl(Gint_k& gk, Gint_inout& io, LCAO_Matrix& lm, ModuleBase::matrix& wg) { gk.cal_gint(&io); }; + + inline void gint_vl( + Gint_Gamma& gg, + Gint_inout& io, + LCAO_Matrix& lm) + { + gg.cal_vlocal(&io, &lm, false); + }; + + inline void gint_vl( + Gint_k& gk, + Gint_inout& io, + LCAO_Matrix& lm, + ModuleBase::matrix& wg) + { + gk.cal_gint(&io); + }; void set_para2d_MO(const Parallel_Orbitals& pv, const int nbands, Parallel_2D& p2d) { std::ofstream ofs; #ifdef __MPI - int dsize; + int dsize=0; MPI_Comm_size(MPI_COMM_WORLD, &dsize); p2d.set_block_size(pv.nb); p2d.set_proc_dim(dsize); @@ -37,8 +57,14 @@ namespace ModuleIO #endif } - std::vector> cVc(std::complex* V, std::complex* c, int nbasis, int nbands, const Parallel_Orbitals& pv, const Parallel_2D& p2d) - { + std::vector> cVc( + std::complex* V, + std::complex* c, + int nbasis, + int nbands, + const Parallel_Orbitals& pv, + const Parallel_2D& p2d) + { std::vector> Vc(pv.nloc_wfc, 0.0); char transa = 'N'; char transb = 'N'; @@ -46,21 +72,31 @@ namespace ModuleIO const std::complex beta(0.0, 0.0); #ifdef __MPI const int i1 = 1; - pzgemm_(&transa, &transb, &nbasis, &nbands, &nbasis, &alpha, V, &i1, &i1, pv.desc, c, &i1, &i1, pv.desc_wfc, &beta, Vc.data(), &i1, &i1, pv.desc_wfc); + pzgemm_(&transa, &transb, &nbasis, &nbands, &nbasis, &alpha, V, &i1, + &i1, pv.desc, c, &i1, &i1, pv.desc_wfc, &beta, Vc.data(), &i1, &i1, pv.desc_wfc); #else - zgemm_(&transa, &transb, &nbasis, &nbands, &nbasis, &alpha, V, &nbasis, c, &nbasis, &beta, Vc.data(), &nbasis); + zgemm_(&transa, &transb, &nbasis, &nbands, &nbasis, &alpha, V, &nbasis, + c, &nbasis, &beta, Vc.data(), &nbasis); #endif std::vector> cVc(p2d.nloc, 0.0); transa = 'C'; #ifdef __MPI - pzgemm_(&transa, &transb, &nbands, &nbands, &nbasis, &alpha, c, &i1, &i1, pv.desc_wfc, Vc.data(), &i1, &i1, pv.desc_wfc, &beta, cVc.data(), &i1, &i1, p2d.desc); + pzgemm_(&transa, &transb, &nbands, &nbands, &nbasis, &alpha, c, &i1, &i1, + pv.desc_wfc, Vc.data(), &i1, &i1, pv.desc_wfc, &beta, cVc.data(), &i1, &i1, p2d.desc); #else - zgemm_(&transa, &transb, &nbands, &nbands, &nbasis, &alpha, c, &nbasis, Vc.data(), &nbasis, &beta, cVc.data(), &nbasis); + zgemm_(&transa, &transb, &nbands, &nbands, &nbasis, &alpha, c, &nbasis, + Vc.data(), &nbasis, &beta, cVc.data(), &nbasis); #endif return cVc; } - std::vector cVc(double* V, double* c, int nbasis, int nbands, const Parallel_Orbitals& pv, const Parallel_2D& p2d) + std::vector cVc( + double* V, + double* c, + int nbasis, + int nbands, + const Parallel_Orbitals& pv, + const Parallel_2D& p2d) { std::vector Vc(pv.nloc_wfc, 0.0); char transa = 'N'; @@ -69,57 +105,98 @@ namespace ModuleIO const double beta = 0.0; #ifdef __MPI const int i1 = 1; - pdgemm_(&transa, &transb, &nbasis, &nbands, &nbasis, &alpha, V, &i1, &i1, pv.desc, c, &i1, &i1, pv.desc_wfc, &beta, Vc.data(), &i1, &i1, pv.desc_wfc); + pdgemm_(&transa, &transb, &nbasis, &nbands, &nbasis, &alpha, V, &i1, + &i1, pv.desc, c, &i1, &i1, pv.desc_wfc, &beta, Vc.data(), &i1, &i1, pv.desc_wfc); #else - dgemm_(&transa, &transb, &nbasis, &nbands, &nbasis, &alpha, V, &nbasis, c, &nbasis, &beta, Vc.data(), &nbasis); + dgemm_(&transa, &transb, &nbasis, &nbands, &nbasis, &alpha, V, &nbasis, + c, &nbasis, &beta, Vc.data(), &nbasis); #endif std::vector cVc(p2d.nloc, 0.0); transa = 'T'; #ifdef __MPI - pdgemm_(&transa, &transb, &nbands, &nbands, &nbasis, &alpha, c, &i1, &i1, pv.desc_wfc, Vc.data(), &i1, &i1, pv.desc_wfc, &beta, cVc.data(), &i1, &i1, p2d.desc); + pdgemm_(&transa, &transb, &nbands, &nbands, &nbasis, &alpha, c, &i1, &i1, + pv.desc_wfc, Vc.data(), &i1, &i1, pv.desc_wfc, &beta, cVc.data(), &i1, &i1, p2d.desc); #else - dgemm_(&transa, &transb, &nbands, &nbands, &nbasis, &alpha, c, &nbasis, Vc.data(), &nbasis, &beta, cVc.data(), &nbasis); + dgemm_(&transa, &transb, &nbands, &nbands, &nbasis, &alpha, c, + &nbasis, Vc.data(), &nbasis, &beta, cVc.data(), &nbasis); #endif return cVc; } inline double get_real(const std::complex& c) { return c.real(); } + inline double get_real(const double& d) { return d; } template - double all_band_energy(const int ik, const std::vector& mat_mo, const Parallel_2D& p2d, const ModuleBase::matrix& wg) + double all_band_energy( + const int ik, + const std::vector& mat_mo, + const Parallel_2D& p2d, + const ModuleBase::matrix& wg) { double e = 0.0; for (int i = 0;i < p2d.get_row_size();++i) - for (int j = 0;j < p2d.get_col_size();++j) - if (p2d.local2global_row(i) == p2d.local2global_col(j)) - e += get_real(mat_mo[j * p2d.get_row_size() + i]) * wg(ik, p2d.local2global_row(i)); + { + for (int j = 0;j < p2d.get_col_size();++j) + { + if (p2d.local2global_row(i) == p2d.local2global_col(j)) + { + e += get_real(mat_mo[j * p2d.get_row_size() + i]) * wg(ik, p2d.local2global_row(i)); + } + } + } Parallel_Reduce::reduce_all(e); return e; } + // mohan update 2024-04-01 template - void set_gint_pointer(LCAO_Hamilt& uhm, typename TGint::type*& gint); + void set_gint_pointer( + Gint_Gamma &gint_gamma, + Gint_k &gint_k, + typename TGint::type*& gint); - template <> - void set_gint_pointer(LCAO_Hamilt& uhm, typename TGint::type*& gint) - { - gint = &uhm.GG; + // mohan update 2024-04-01 + template <> + void set_gint_pointer( + Gint_Gamma &gint_gamma, + Gint_k &gint_k, + typename TGint::type*& gint) + { + gint = &gint_gamma; } + + // mohan update 2024-04-01 template <> - void set_gint_pointer>(LCAO_Hamilt& uhm, typename TGint>::type*& gint) + void set_gint_pointer>( + Gint_Gamma &gint_gamma, + Gint_k &gint_k, + typename TGint>::type*& gint) { - gint = &uhm.GK; + gint = &gint_k; } - /// @brief write the Vxc matrix in KS orbital representation, usefull for GW calculation /// including terms: local/semi-local XC, EXX, DFTU template - void write_Vxc(int nspin, int nbasis, int drank, const psi::Psi& psi, const UnitCell& ucell, Structure_Factor& sf, - const ModulePW::PW_Basis& rho_basis, const ModulePW::PW_Basis& rhod_basis, const ModuleBase::matrix& vloc, - const Charge& chg, LCAO_Hamilt& uhm, LCAO_Matrix& lm, Local_Orbital_Charge& loc, - const K_Vectors& kv, const ModuleBase::matrix& wg, Grid_Driver& gd) + void write_Vxc( + int nspin, + int nbasis, + int drank, + const psi::Psi& psi, + const UnitCell& ucell, + Structure_Factor& sf, + const ModulePW::PW_Basis& rho_basis, + const ModulePW::PW_Basis& rhod_basis, + const ModuleBase::matrix& vloc, + const Charge& chg, + Gint_Gamma &gint_gamma, // mohan add 2024-04-01 + Gint_k &gint_k, // mohan add 2024-04-01 + LCAO_Matrix& lm, + Local_Orbital_Charge& loc, + const K_Vectors& kv, + const ModuleBase::matrix& wg, + Grid_Driver& gd) { ModuleBase::TITLE("ModuleIO", "write_Vxc"); const Parallel_Orbitals* pv = lm.ParaV; @@ -146,11 +223,24 @@ namespace ModuleIO // 3. allocate operators and contribute HR // op (corresponding to hR) typename TGint::type* gint = nullptr; - set_gint_pointer(uhm, gint); + + set_gint_pointer(gint_gamma, gint_k, gint); + std::vector>*> vxcs_op_ao(nspin0); for (int is = 0;is < nspin0;++is) { - vxcs_op_ao[is] = new hamilt::Veff>(gint, &loc, &lm, kv.kvec_d, potxc, &vxcs_R_ao[is], &vxc_k_ao, &ucell, &gd, pv); + vxcs_op_ao[is] = new hamilt::Veff>( + gint, + &loc, + &lm, + kv.kvec_d, + potxc, + &vxcs_R_ao[is], + &vxc_k_ao, + &ucell, + &gd, + pv); + GlobalV::CURRENT_SPIN = is; //caution: Veff::contributeHR depends on GlobalV::CURRENT_SPIN vxcs_op_ao[is]->contributeHR(); } @@ -177,7 +267,10 @@ namespace ModuleIO int is = GlobalV::CURRENT_SPIN = kv.isk[ik]; dynamic_cast*>(vxcs_op_ao[is])->contributeHk(ik); #ifdef __EXX - if (GlobalC::exx_info.info_global.cal_exx) vexx_op_ao.contributeHk(ik); + if (GlobalC::exx_info.info_global.cal_exx) + { + vexx_op_ao.contributeHk(ik); + } // ======test======= // ModuleBase::GlobalFunc::ZEROS(test_vexxonly_k_ao.data(), pv->nloc); // if (GlobalC::exx_info.info_global.cal_exx) test_vexxonly_op_ao.contributeHk(ik); @@ -185,8 +278,11 @@ namespace ModuleIO // exx_energy += all_band_energy(ik, test_vexxonly_k_mo, p2d, wg); // ======test======= #endif - if (GlobalV::dft_plus_u) vdftu_op_ao.contributeHk(ik); - std::vector vxc_k_mo = cVc(vxc_k_ao.data(), &psi(ik, 0, 0), nbasis, nbands, *pv, p2d); + if (GlobalV::dft_plus_u) + { + vdftu_op_ao.contributeHk(ik); + } + std::vector vxc_k_mo = cVc(vxc_k_ao.data(), &psi(ik, 0, 0), nbasis, nbands, *pv, p2d); // write ModuleIO::save_mat(-1, vxc_k_mo.data(), nbands, false/*binary*/, GlobalV::out_ndigits, true/*triangle*/, false/*append*/, @@ -204,6 +300,9 @@ namespace ModuleIO // std::cout << "exx_energy: " << 0.5 * exx_energy << std::endl; // ======test======= delete potxc; - for (int is = 0;is < nspin0;++is) delete vxcs_op_ao[is]; + for (int is = 0;is < nspin0;++is) + { + delete vxcs_op_ao[is]; + } } -} \ No newline at end of file +} diff --git a/source/module_io/write_dm.cpp b/source/module_io/write_dm.cpp index d888493506..a2722290ac 100644 --- a/source/module_io/write_dm.cpp +++ b/source/module_io/write_dm.cpp @@ -46,7 +46,10 @@ void ModuleIO::write_dm( int out_dm, double*** DM, const double& ef, - const UnitCell* ucell) + const UnitCell* ucell, + const int my_rank, + const int nspin, + const int nlocal) { ModuleBase::TITLE("ModuleIO","write_dm"); @@ -60,7 +63,7 @@ void ModuleIO::write_dm( time_t start, end; std::ofstream ofs; - if(GlobalV::MY_RANK==0) + if(my_rank==0) { start = time(NULL); @@ -101,10 +104,10 @@ void ModuleIO::write_dm( } } - ofs << "\n " << GlobalV::NSPIN; + ofs << "\n " << nspin; ofs << "\n " << ef << " (fermi energy)"; - ofs << "\n " << GlobalV::NLOCAL << " " << GlobalV::NLOCAL << std::endl; + ofs << "\n " << nlocal << " " << nlocal << std::endl; ofs << std::setprecision(precision); ofs << std::scientific; @@ -114,9 +117,9 @@ void ModuleIO::write_dm( //ofs << "\n " << GlobalV::GAMMA_ONLY_LOCAL << " (GAMMA ONLY LOCAL)" << std::endl; #ifndef __MPI - for(int i=0; i= 0) { - for (int j=0; j= 0) @@ -144,13 +147,13 @@ void ModuleIO::write_dm( } } } - Parallel_Reduce::reduce_all(count, GlobalV::NLOCAL); + Parallel_Reduce::reduce_all(count, nlocal); // reduce the density matrix for 'i' line. - ModuleBase::GlobalFunc::ZEROS(tmp, GlobalV::NLOCAL); + ModuleBase::GlobalFunc::ZEROS(tmp, nlocal); if (mu >= 0) { - for (int j=0; j=0) @@ -160,11 +163,11 @@ void ModuleIO::write_dm( } } } - Parallel_Reduce::reduce_all(tmp, GlobalV::NLOCAL); + Parallel_Reduce::reduce_all(tmp, nlocal); - if(GlobalV::MY_RANK==0) + if(my_rank==0) { - for (int j=0; j0) @@ -181,7 +184,7 @@ void ModuleIO::write_dm( delete[] tmp; delete[] count; #endif - if(GlobalV::MY_RANK==0) + if(my_rank==0) { end = time(NULL); ModuleBase::GlobalFunc::OUT_TIME("write_dm",start,end); diff --git a/source/module_io/write_dm_sparse.cpp b/source/module_io/write_dm_sparse.cpp index f6851a9cf8..a67f08167d 100644 --- a/source/module_io/write_dm_sparse.cpp +++ b/source/module_io/write_dm_sparse.cpp @@ -6,8 +6,13 @@ #include "module_cell/module_neighbor/sltk_grid_driver.h" #include "module_hamilt_pw/hamilt_pwdft/global.h" -void ModuleIO::write_dm1(const int &is, const int &istep, double** dm2d, const Parallel_Orbitals* ParaV, - std::map, std::map>> &DMR_sparse) +void ModuleIO::write_dm1( + const int &is, + const int &istep, + double** dm2d, + const Parallel_Orbitals* ParaV, + std::map, + std::map>> &DMR_sparse) { ModuleBase::timer::tick("ModuleIO","write_dm"); ModuleBase::TITLE("ModuleIO","write_dm"); @@ -19,8 +24,11 @@ void ModuleIO::write_dm1(const int &is, const int &istep, double** dm2d, const P ModuleBase::timer::tick("ModuleIO","write_dm"); } -void ModuleIO::get_dm_sparse(const int &is, double** dm2d, const Parallel_Orbitals* ParaV, - std::map, std::map>> &DMR_sparse) +void ModuleIO::get_dm_sparse( + const int &is, + double** dm2d, + const Parallel_Orbitals* ParaV, + std::map, std::map>> &DMR_sparse) { ModuleBase::timer::tick("ModuleIO","get_dm_sparse"); ModuleBase::TITLE("ModuleIO","get_dm_sparse"); @@ -31,7 +39,7 @@ void ModuleIO::get_dm_sparse(const int &is, double** dm2d, const Parallel_Orbita ModuleBase::Vector3 dtau, tau1, tau2; ModuleBase::Vector3 dtau1, dtau2, tau0; - double temp_value_double; + double temp_value_double = 0.0; for(int T1 = 0; T1 < GlobalC::ucell.ntype; ++T1) { @@ -56,7 +64,10 @@ void ModuleIO::get_dm_sparse(const int &is, double** dm2d, const Parallel_Orbita bool adj = false; - if(distance < rcut) adj = true; + if(distance < rcut) + { + adj = true; + } else if(distance >= rcut) { for(int ad0 = 0; ad0 < GlobalC::GridD.getAdjacentNum()+1; ++ad0) @@ -85,21 +96,24 @@ void ModuleIO::get_dm_sparse(const int &is, double** dm2d, const Parallel_Orbita { const int start2 = GlobalC::ucell.itiaiw2iwt(T2,I2,0); - Abfs::Vector3_Order dR(GlobalC::GridD.getBox(ad).x, GlobalC::GridD.getBox(ad).y, GlobalC::GridD.getBox(ad).z); + Abfs::Vector3_Order dR( + GlobalC::GridD.getBox(ad).x, + GlobalC::GridD.getBox(ad).y, + GlobalC::GridD.getBox(ad).z); for(int ii=0; iinw; ii++) { const int iw1_all = start + ii; const int mu = ParaV->global2local_row(iw1_all); - if(mu<0)continue; + if(mu<0) continue; for(int jj=0; jjnw; jj++) { int iw2_all = start2 + jj; const int nu = ParaV->global2local_col(iw2_all); - if(nu<0)continue; + if(nu<0) continue; temp_value_double = dm2d[is][index]; if (std::abs(temp_value_double) > sparse_threshold) @@ -118,8 +132,12 @@ void ModuleIO::get_dm_sparse(const int &is, double** dm2d, const Parallel_Orbita ModuleBase::timer::tick("ModuleIO","get_dm_sparse"); } -void ModuleIO::write_dm_sparse(const int &is, const int &istep, const Parallel_Orbitals* ParaV, - std::map, std::map>> &DMR_sparse) + +void ModuleIO::write_dm_sparse( + const int &is, + const int &istep, + const Parallel_Orbitals* ParaV, + std::map, std::map>> &DMR_sparse) { ModuleBase::timer::tick("ModuleIO","write_dm_sparse"); ModuleBase::TITLE("ModuleIO","write_dm_sparse"); @@ -245,6 +263,7 @@ void ModuleIO::write_dm_sparse(const int &is, const int &istep, const Parallel_O ModuleBase::timer::tick("ModuleIO","write_dm_sparse"); } + void ModuleIO::destroy_dm_sparse(std::map, std::map>> &DMR_sparse) { std::map, std::map>> empty_DMR_sparse; diff --git a/source/module_io/write_dm_sparse.h b/source/module_io/write_dm_sparse.h index fae6d43ad9..0a5ad3e498 100644 --- a/source/module_io/write_dm_sparse.h +++ b/source/module_io/write_dm_sparse.h @@ -10,10 +10,13 @@ namespace ModuleIO { void write_dm1(const int &is, const int &istep, double** dm2d, const Parallel_Orbitals* ParaV, std::map, std::map>> &DMR_sparse); + void get_dm_sparse(const int &is, double** dm2d, const Parallel_Orbitals* ParaV, std::map, std::map>> &DMR_sparse); + void write_dm_sparse(const int &is, const int &istep, const Parallel_Orbitals* ParaV, std::map, std::map>> &DMR_sparse); + void destroy_dm_sparse( std::map, std::map>> &DMR_sparse); } diff --git a/source/module_io/write_input.cpp b/source/module_io/write_input.cpp index f33bab90c3..5974a54003 100644 --- a/source/module_io/write_input.cpp +++ b/source/module_io/write_input.cpp @@ -451,10 +451,11 @@ ModuleBase::GlobalFunc::OUTP(ofs, "out_bandgap", out_bandgap, "if true, print ou ModuleBase::GlobalFunc::OUTP(ofs, "of_kernel_file", of_kernel_file, "The name of WT kernel file."); ofs << "\n#Parameters (20.dft+u)" << std::endl; - ModuleBase::GlobalFunc::OUTP(ofs, "dft_plus_u", dft_plus_u, "true:DFT+U correction; false: standard DFT calcullation(default)"); + ModuleBase::GlobalFunc::OUTP(ofs, "dft_plus_u", dft_plus_u, "1/2:new/old DFT+U correction method; 0: standard DFT calcullation(default)"); ModuleBase::GlobalFunc::OUTP(ofs, "yukawa_lambda", yukawa_lambda, "default:0.0"); ModuleBase::GlobalFunc::OUTP(ofs, "yukawa_potential", yukawa_potential, "default: false"); ModuleBase::GlobalFunc::OUTP(ofs, "omc", omc, "the mode of occupation matrix control"); + ModuleBase::GlobalFunc::OUTP(ofs, "onsite_radius", onsite_radius, "radius of the sphere for onsite projection (Bohr)"); ofs << std::setw(20) << "hubbard_u "; for (int i = 0; i < ntype; i++) { diff --git a/source/module_io/write_proj_band_lcao.cpp b/source/module_io/write_proj_band_lcao.cpp index c77de39cc9..71b37de8e0 100644 --- a/source/module_io/write_proj_band_lcao.cpp +++ b/source/module_io/write_proj_band_lcao.cpp @@ -285,9 +285,13 @@ void ModuleIO::write_proj_band_lcao( out << "" << std::endl; out << "" << GlobalV::NSPIN << "" << std::endl; if (GlobalV::NSPIN == 4) + { out << "" << std::setw(2) << GlobalV::NLOCAL / 2 << "" << std::endl; + } else + { out << "" << std::setw(2) << GlobalV::NLOCAL << "" << std::endl; + } out << "" << std::endl; for (int ik = 0; ik < nks; ik++) diff --git a/source/module_md/md_func.cpp b/source/module_md/md_func.cpp index b5e1d80b74..05432471ce 100644 --- a/source/module_md/md_func.cpp +++ b/source/module_md/md_func.cpp @@ -6,11 +6,11 @@ namespace MD_func { -double gaussrand() +double gaussrand(void) { static double V1, V2, S; static int phase = 0; - double X; + double X=0.0; if (phase == 0) { @@ -228,16 +228,16 @@ void force_virial(ModuleESolver::ESolver* p_esolver, ModuleBase::TITLE("MD_func", "force_virial"); ModuleBase::timer::tick("MD_func", "force_virial"); - p_esolver->Run(istep, unit_in); + p_esolver->run(istep, unit_in); - potential = p_esolver->cal_Energy(); + potential = p_esolver->cal_energy(); ModuleBase::matrix force_temp(unit_in.nat, 3); - p_esolver->cal_Force(force_temp); + p_esolver->cal_force(force_temp); if (cal_stress) { - p_esolver->cal_Stress(virial); + p_esolver->cal_stress(virial); } /// convert Rydberg to Hartree @@ -472,4 +472,4 @@ void current_md_info(const int& my_rank, const std::string& file_dir, int& md_st #endif } -} // namespace MD_func \ No newline at end of file +} // namespace MD_func diff --git a/source/module_md/test/fire_test.cpp b/source/module_md/test/fire_test.cpp index c275ec2093..96a8e5612e 100644 --- a/source/module_md/test/fire_test.cpp +++ b/source/module_md/test/fire_test.cpp @@ -46,7 +46,7 @@ class FIREtest : public testing::Test Setcell::parameters(); ModuleESolver::ESolver* p_esolver = new ModuleESolver::ESolver_LJ(); - p_esolver->Init(INPUT, ucell); + p_esolver->init(INPUT, ucell); mdrun = new FIRE(INPUT.mdp, ucell); mdrun->setup(p_esolver, GlobalV::global_readin_dir); @@ -208,4 +208,4 @@ TEST_F(FIREtest, PrintMD) EXPECT_THAT(output_str, testing::HasSubstr(" LARGEST GRAD (eV/A) : 0.049479926")); ifs.close(); remove("running.log"); -} \ No newline at end of file +} diff --git a/source/module_md/test/langevin_test.cpp b/source/module_md/test/langevin_test.cpp index 77bac815ce..8fc152c651 100644 --- a/source/module_md/test/langevin_test.cpp +++ b/source/module_md/test/langevin_test.cpp @@ -46,7 +46,7 @@ class Langevin_test : public testing::Test Setcell::parameters(); ModuleESolver::ESolver* p_esolver = new ModuleESolver::ESolver_LJ(); - p_esolver->Init(INPUT, ucell); + p_esolver->init(INPUT, ucell); mdrun = new Langevin(INPUT.mdp, ucell); mdrun->setup(p_esolver, GlobalV::global_readin_dir); @@ -189,4 +189,4 @@ TEST_F(Langevin_test, print_md) " ------------------------------------------------------------------------------------------------")); ifs.close(); remove("running.log"); -} \ No newline at end of file +} diff --git a/source/module_md/test/lj_pot_test.cpp b/source/module_md/test/lj_pot_test.cpp index a6cbced392..89a062a1b0 100644 --- a/source/module_md/test/lj_pot_test.cpp +++ b/source/module_md/test/lj_pot_test.cpp @@ -35,7 +35,7 @@ class LJ_pot_test : public testing::Test Setcell::parameters(); ModuleESolver::ESolver* p_esolver = new ModuleESolver::ESolver_LJ(); - p_esolver->Init(INPUT, ucell); + p_esolver->init(INPUT, ucell); MD_func::force_virial(p_esolver, 0, ucell, potential, force, true, stress); } @@ -77,4 +77,4 @@ TEST_F(LJ_pot_test, stress) EXPECT_NEAR(stress(2, 0), 0, doublethreshold); EXPECT_NEAR(stress(2, 1), -1.1858461261560206e-22, doublethreshold); EXPECT_NEAR(stress(2, 2), 6.4275429572682057e-07, doublethreshold); -} \ No newline at end of file +} diff --git a/source/module_md/test/msst_test.cpp b/source/module_md/test/msst_test.cpp index dcf3364873..a5d3ac97e4 100644 --- a/source/module_md/test/msst_test.cpp +++ b/source/module_md/test/msst_test.cpp @@ -46,7 +46,7 @@ class MSST_test : public testing::Test Setcell::parameters(); ModuleESolver::ESolver* p_esolver = new ModuleESolver::ESolver_LJ(); - p_esolver->Init(INPUT, ucell); + p_esolver->init(INPUT, ucell); mdrun = new MSST(INPUT.mdp, ucell); mdrun->setup(p_esolver, GlobalV::global_readin_dir); diff --git a/source/module_md/test/nhchain_test.cpp b/source/module_md/test/nhchain_test.cpp index 93ea37b8eb..49ec231081 100644 --- a/source/module_md/test/nhchain_test.cpp +++ b/source/module_md/test/nhchain_test.cpp @@ -46,7 +46,7 @@ class NHC_test : public testing::Test Setcell::parameters(); ModuleESolver::ESolver* p_esolver = new ModuleESolver::ESolver_LJ(); - p_esolver->Init(INPUT, ucell); + p_esolver->init(INPUT, ucell); INPUT.mdp.md_type = "npt"; INPUT.mdp.md_pmode = "tri"; @@ -237,4 +237,4 @@ TEST_F(NHC_test, print_md) " ------------------------------------------------------------------------------------------------")); ifs.close(); remove("running.log"); -} \ No newline at end of file +} diff --git a/source/module_md/test/verlet_test.cpp b/source/module_md/test/verlet_test.cpp index 9b2f138d20..8852743edc 100644 --- a/source/module_md/test/verlet_test.cpp +++ b/source/module_md/test/verlet_test.cpp @@ -46,7 +46,7 @@ class Verlet_test : public testing::Test Setcell::parameters(); ModuleESolver::ESolver* p_esolver = new ModuleESolver::ESolver_LJ(); - p_esolver->Init(INPUT, ucell); + p_esolver->init(INPUT, ucell); mdrun = new Verlet(INPUT.mdp, ucell); mdrun->setup(p_esolver, GlobalV::global_readin_dir); @@ -330,4 +330,4 @@ TEST_F(Verlet_test, print_md) " ------------------------------------------------------------------------------------------------")); ifs.close(); remove("running.log"); -} \ No newline at end of file +} diff --git a/source/module_psi/psi_initializer.cpp b/source/module_psi/psi_initializer.cpp index bae76b3730..9bb6977ab3 100644 --- a/source/module_psi/psi_initializer.cpp +++ b/source/module_psi/psi_initializer.cpp @@ -6,32 +6,6 @@ // three global variables definition #include "module_base/global_variable.h" - -template -#ifdef __MPI -psi_initializer::psi_initializer(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, Parallel_Kpoints* p_parakpts_in, int random_seed_in) - : sf(sf_in), pw_wfc(pw_wfc_in), p_ucell(p_ucell_in), p_parakpts(p_parakpts_in), random_seed(random_seed_in) -#else -psi_initializer::psi_initializer(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, int random_seed_in) - : sf(sf_in), pw_wfc(pw_wfc_in), p_ucell(p_ucell_in), random_seed(random_seed_in) -#endif -{ - if(this->p_ucell == nullptr) ModuleBase::WARNING_QUIT("psi_initializer", "interface to UnitCell is not valid, quit!"); - this->ixy2is = new int[this->pw_wfc->fftnxy]; - this->pw_wfc->getfftixy2is(this->ixy2is); -} - -template -psi_initializer::~psi_initializer() -{ - delete[] this->ixy2is; - if (this->psig != nullptr) - { - delete this->psig; - this->psig = nullptr; - } -} - template psi::Psi>* psi_initializer::allocate(bool only_psig) { @@ -39,112 +13,96 @@ psi::Psi>* psi_initializer::allocate(bool only_p /* WARNING: when basis_type = "pw", the variable GlobalV::NLOCAL will also be set, in this case, it is set to 9 = 1 + 3 + 5, which is the maximal number of orbitals spd, I don't think it is reasonable - The way of calculating this->p_ucell->natomwfc is, for each atom, read pswfc and for s, it is 1, for p, it is 3 + The way of calculating this->p_ucell_->natomwfc is, for each atom, read pswfc and for s, it is 1, for p, it is 3 , then multiplied by the number of atoms, and then add them together. */ - - if (this->psig != nullptr) - { - delete this->psig; - this->psig = nullptr; - } int prefactor = 1; int nbands_actual = 0; - if(this->method == "random") + if(this->method_ == "random") { nbands_actual = GlobalV::NBANDS; - this->nbands_complem = 0; + this->nbands_complem_ = 0; } else { - if(this->method.substr(0, 6) == "atomic") + if(this->method_.substr(0, 6) == "atomic") { - if(this->p_ucell->natomwfc >= GlobalV::NBANDS) + if(this->p_ucell_->natomwfc >= GlobalV::NBANDS) { - nbands_actual = this->p_ucell->natomwfc; - this->nbands_complem = 0; + nbands_actual = this->p_ucell_->natomwfc; + this->nbands_complem_ = 0; } else { nbands_actual = GlobalV::NBANDS; - this->nbands_complem = GlobalV::NBANDS - this->p_ucell->natomwfc; + this->nbands_complem_ = GlobalV::NBANDS - this->p_ucell_->natomwfc; } } - else if(this->method.substr(0, 3) == "nao") + else if(this->method_.substr(0, 3) == "nao") { /* previously GlobalV::NLOCAL is used here, however it is wrong. GlobalV::NLOCAL is fixed to 9*nat. */ int nbands_local = 0; - for(int it = 0; it < this->p_ucell->ntype; it++) + for(int it = 0; it < this->p_ucell_->ntype; it++) { - for(int ia = 0; ia < this->p_ucell->atoms[it].na; ia++) + for(int ia = 0; ia < this->p_ucell_->atoms[it].na; ia++) { /* FOR EVERY ATOM */ - for(int l = 0; l < this->p_ucell->atoms[it].nwl + 1; l++) + for(int l = 0; l < this->p_ucell_->atoms[it].nwl + 1; l++) { /* EVERY ZETA FOR (2l+1) ORBS */ /* non-rotate basis, nbands_local*=2 for GlobalV::NPOL = 2 is enough */ - //nbands_local += this->p_ucell->atoms[it].l_nchi[l]*(2*l+1) * GlobalV::NPOL; + //nbands_local += this->p_ucell_->atoms[it].l_nchi[l]*(2*l+1) * GlobalV::NPOL; /* rotate basis, nbands_local*=4 for p, d, f,... orbitals, and nbands_local*=2 for s orbitals risky when NSPIN = 4, problematic psi value, needed to be checked */ - if(l == 0) - { - nbands_local += this->p_ucell->atoms[it].l_nchi[l] * GlobalV::NPOL; - } - else - { - nbands_local += this->p_ucell->atoms[it].l_nchi[l]*(2*l+1) * GlobalV::NPOL; - } - + if(l == 0) nbands_local += this->p_ucell_->atoms[it].l_nchi[l] * GlobalV::NPOL; + else nbands_local += this->p_ucell_->atoms[it].l_nchi[l]*(2*l+1) * GlobalV::NPOL; } } } if(nbands_local >= GlobalV::NBANDS) { nbands_actual = nbands_local; - this->nbands_complem = 0; + this->nbands_complem_ = 0; } else { nbands_actual = GlobalV::NBANDS; - this->nbands_complem = GlobalV::NBANDS - nbands_local; + this->nbands_complem_ = GlobalV::NBANDS - nbands_local; } } } - int nkpts_actual = (GlobalV::CALCULATION == "nscf" && this->mem_saver == 1)? - 1 : this->pw_wfc->nks; - int nbasis_actual = this->pw_wfc->npwk_max * GlobalV::NPOL; + int nkpts_actual = (GlobalV::CALCULATION == "nscf" && this->mem_saver_ == 1)? 1 : this->pw_wfc_->nks; + int nbasis_actual = this->pw_wfc_->npwk_max * GlobalV::NPOL; psi::Psi>* psi_out = nullptr; if(!only_psig) { - psi_out = new psi::Psi>( - nkpts_actual, - GlobalV::NBANDS, // because no matter what, the wavefunction finally needed has GlobalV::NBANDS bands - nbasis_actual, - this->pw_wfc->npwk); + psi_out = new psi::Psi>(nkpts_actual, + GlobalV::NBANDS, // because no matter what, the wavefunction finally needed has GlobalV::NBANDS bands + nbasis_actual, + this->pw_wfc_->npwk); /* WARNING: this will cause DIRECT MEMORY LEAK, psi is not properly deallocated */ const size_t memory_cost_psi = nkpts_actual* - GlobalV::NBANDS * this->pw_wfc->npwk_max * GlobalV::NPOL* + GlobalV::NBANDS * this->pw_wfc_->npwk_max * GlobalV::NPOL* sizeof(std::complex); std::cout << " MEMORY FOR PSI PER PROCESSOR (MB) : " << double(memory_cost_psi)/1024.0/1024.0 << std::endl; ModuleBase::Memory::record("Psi_PW", memory_cost_psi); } - this->psig = new psi::Psi( - nkpts_actual, - nbands_actual, - nbasis_actual, - this->pw_wfc->npwk); + this->psig_ = std::make_shared>(nkpts_actual, + nbands_actual, + nbasis_actual, + this->pw_wfc_->npwk); const size_t memory_cost_psig = nkpts_actual* - nbands_actual * this->pw_wfc->npwk_max * GlobalV::NPOL* + nbands_actual * this->pw_wfc_->npwk_max * GlobalV::NPOL* sizeof(T); std::cout << " MEMORY FOR AUXILLARY PSI PER PROCESSOR (MB) : " << double(memory_cost_psig)/1024.0/1024.0 << std::endl; @@ -155,11 +113,11 @@ psi::Psi>* psi_initializer::allocate(bool only_p << "nkpts_actual = " << nkpts_actual << "\n" << "GlobalV::NBANDS = " << GlobalV::NBANDS << "\n" << "nbands_actual = " << nbands_actual << "\n" - << "nbands_complem = " << this->nbands_complem << "\n" + << "nbands_complem = " << this->nbands_complem_ << "\n" << "nbasis_actual = " << nbasis_actual << "\n" - << "npwk_max = " << this->pw_wfc->npwk_max << "\n" + << "npwk_max = " << this->pw_wfc_->npwk_max << "\n" << "npol = " << GlobalV::NPOL << "\n"; - ModuleBase::Memory::record("PsiG_PW", memory_cost_psig); + ModuleBase::Memory::record("psigPW", memory_cost_psig); ModuleBase::timer::tick("psi_initializer", "allocate"); return psi_out; } @@ -169,82 +127,78 @@ void psi_initializer::random_t(T* psi, const int iw_start, const int { ModuleBase::timer::tick("psi_initializer", "random_t"); assert(iw_start >= 0); - const int ng = this->pw_wfc->npwk[ik]; + const int ng = this->pw_wfc_->npwk[ik]; #ifdef __MPI - if (this->random_seed > 0) // qianrui add 2021-8-13 + if (this->random_seed_ > 0) // qianrui add 2021-8-13 { - srand(unsigned(this->random_seed + this->p_parakpts->startk_pool[GlobalV::MY_POOL] + ik)); - const int nxy = this->pw_wfc->fftnxy; - const int nz = this->pw_wfc->nz; - const int nstnz = this->pw_wfc->nst*nz; + srand(unsigned(this->random_seed_ + this->p_parakpts_->startk_pool[GlobalV::MY_POOL] + ik)); + const int nxy = this->pw_wfc_->fftnxy; + const int nz = this->pw_wfc_->nz; + const int nstnz = this->pw_wfc_->nst*nz; - Real *stickrr = new Real[nz]; - Real *stickarg = new Real[nz]; - Real *tmprr = new Real[nstnz]; - Real *tmparg = new Real[nstnz]; + std::vector stickrr(nz); + std::vector stickarg(nz); + std::vector tmprr(nstnz); + std::vector tmparg(nstnz); for (int iw = iw_start; iw < iw_end; iw++) { // get the starting memory address of iw band - T* psi_slice = &(psi[iw * this->pw_wfc->npwk_max * GlobalV::NPOL]); + T* psi_slice = &(psi[iw * this->pw_wfc_->npwk_max * GlobalV::NPOL]); int startig = 0; for(int ipol = 0 ; ipol < GlobalV::NPOL ; ++ipol) { for(int ir=0; ir < nxy; ir++) { - if(this->pw_wfc->fftixy2ip[ir] < 0) continue; + if(this->pw_wfc_->fftixy2ip[ir] < 0) continue; if(GlobalV::RANK_IN_POOL==0) { for(int iz=0; izpw_wfc->getigl2isz(ik,ig)]; - const double arg= ModuleBase::TWO_PI * tmparg[this->pw_wfc->getigl2isz(ik,ig)]; - const double gk2 = this->pw_wfc->getgk2(ik,ig); + const double rr = tmprr[this->pw_wfc_->getigl2isz(ik,ig)]; + const double arg= ModuleBase::TWO_PI * tmparg[this->pw_wfc_->getigl2isz(ik,ig)]; + const double gk2 = this->pw_wfc_->getgk2(ik,ig); psi_slice[ig+startig] = this->template cast_to_T(std::complex(rr*cos(arg)/(gk2 + 1.0), rr*sin(arg)/(gk2 + 1.0))); } - startig += this->pw_wfc->npwk_max; + startig += this->pw_wfc_->npwk_max; } } - delete[] stickrr; - delete[] stickarg; - delete[] tmprr; - delete[] tmparg; } else { #else // !__MPI - if (this->random_seed > 0) // qianrui add 2021-8-13 + if (this->random_seed_ > 0) // qianrui add 2021-8-13 { - srand(unsigned(this->random_seed + ik)); + srand(unsigned(this->random_seed_ + ik)); } #endif for (int iw = iw_start ;iw < iw_end; iw++) { - T* psi_slice = &(psi[iw * this->pw_wfc->npwk_max * GlobalV::NPOL]); + T* psi_slice = &(psi[iw * this->pw_wfc_->npwk_max * GlobalV::NPOL]); for (int ig = 0; ig < ng; ig++) { const double rr = std::rand()/double(RAND_MAX); //qianrui add RAND_MAX const double arg= ModuleBase::TWO_PI * std::rand()/double(RAND_MAX); - const double gk2 = this->pw_wfc->getgk2(ik,ig); + const double gk2 = this->pw_wfc_->getgk2(ik,ig); psi_slice[ig] = this->template cast_to_T(std::complex(rr*cos(arg)/(gk2 + 1.0), rr*sin(arg)/(gk2 + 1.0))); } if(GlobalV::NPOL==2) { - for (int ig = this->pw_wfc->npwk_max; ig < this->pw_wfc->npwk_max + ng; ig++) + for (int ig = this->pw_wfc_->npwk_max; ig < this->pw_wfc_->npwk_max + ng; ig++) { const double rr = std::rand()/double(RAND_MAX); const double arg= ModuleBase::TWO_PI * std::rand()/double(RAND_MAX); - const double gk2 = this->pw_wfc->getgk2(ik,ig-this->pw_wfc->npwk_max); + const double gk2 = this->pw_wfc_->getgk2(ik,ig-this->pw_wfc_->npwk_max); psi_slice[ig] = this->template cast_to_T(std::complex(rr*cos(arg)/(gk2 + 1.0), rr*sin(arg)/(gk2 + 1.0))); } } @@ -261,9 +215,9 @@ void psi_initializer::stick_to_pool(Real* stick, const int& ir, Real* { ModuleBase::timer::tick("psi_initializer", "stick_to_pool"); MPI_Status ierror; - const int is = this->ixy2is[ir]; - const int ip = this->pw_wfc->fftixy2ip[ir]; - const int nz = this->pw_wfc->nz; + const int is = this->ixy2is_[ir]; + const int ip = this->pw_wfc_->fftixy2ip[ir]; + const int nz = this->pw_wfc_->nz; if(ip == 0 && GlobalV::RANK_IN_POOL ==0) { diff --git a/source/module_psi/psi_initializer.h b/source/module_psi/psi_initializer.h index 17f2baf3c5..202c7b3ef4 100644 --- a/source/module_psi/psi_initializer.h +++ b/source/module_psi/psi_initializer.h @@ -5,6 +5,8 @@ #include "module_hamilt_pw/hamilt_pwdft/structure_factor.h" #include "module_basis/module_pw/pw_basis_k.h" // for kpoint related data structure #include "module_hamilt_pw/hamilt_pwdft/VNL_in_pw.h" +// smart pointer for auto-memory management +#include // numerical algorithm support #include "module_base/spherical_bessel_transformer.h" // for spherical bessel transform #ifdef __MPI @@ -21,7 +23,7 @@ Psi (planewave based wavefunction) initializer Auther: Kirk0830 Institute: AI for Science Institute, BEIJING -This class is used to allocate memory and give initial guess for psi (not kspw_psi the FPTYPE, Device template one) +This class is used to allocate memory and give initial guess for psi therefore only double datatype is needed to be supported. Following methods are available: 1. random: use random number to initialize psi @@ -32,6 +34,25 @@ Following methods are available: 4. nao: use numerical orbitals to initialize psi implemented in psi_initializer_nao.h 5. nao+random: mix 'nao' with some random numbers to initialize psi + +To use: +- WAVEFUNCTION INITIALIZATION +A practical example would be in ESolver_KS_PW, because polymorphism is achieved by +pointer, while a raw pointer is risky, therefore std::unique_ptr is a better +choice. +1. new a std::unique_ptr> with specific derived class +2. initialize() to link psi_initializer with external data and methods +3. allocate() to allocate memory for psi +4. tabulate() to calculate the interpolate table +5. proj_ao_onkG() to calculate projection of atomic radial function onto planewave basis +6. share_psig() to get the shared pointer of psi, then use expire() to check if it is valid + and use with .lock() to get the shared pointer +In summary: +new->initialize->allocate->tabulate->proj_ao_onkG->share_psig +- REPRESENTATION TRANSFORM +There is also another way to use psi_initializer, say the representation transform. +For this kind of use, see module_io/to_wannier90_lcao_in_pw, use allocate(true) instead +of allocate() to only allocate memory for psig, then use share_psig() to get value. */ template class psi_initializer @@ -39,261 +60,126 @@ class psi_initializer private: using Real = typename GetTypeReal::type; public: - /// @brief default constructor of psi initializer - psi_initializer() { }; - #ifdef __MPI - /// @brief parameterized constructor of psi initializer (with MPI support) - /// @param sf_in interface, link with Structure_Factor ESolver_FP::sf - /// @param pw_wfc_in interface, link with ModulePW::PW_Basis_K* ESolver_FP::pw_wfc - /// @param p_ucell_in interface, link with UnitCell GlobalC::ucell - /// @param p_parakpts_in interface, link with Parallel_Kpoints GlobalC::Pkpoints - /// @param random_seed_in random seed - psi_initializer(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, Parallel_Kpoints* p_parakpts_in, int random_seed_in = 1); + // technical notes: + // Polymorphism is used to implement different methods, and achieved by pointers and virtual functions + psi_initializer() {}; + virtual ~psi_initializer() {}; + #ifdef __MPI // MPI additional implementation + /// @brief initialize the psi_initializer with external data and methods + virtual void initialize(Structure_Factor*, //< structure factor + ModulePW::PW_Basis_K*, //< planewave basis + UnitCell*, //< unit cell + Parallel_Kpoints* = nullptr, //< parallel kpoints + const int& = 1, //< random seed + pseudopot_cell_vnl* = nullptr, //< nonlocal pseudopotential + const int& = 0) = 0; //< MPI rank + + Parallel_Kpoints* p_parakpts() const { return this->p_parakpts_; } + void set_parakpts(Parallel_Kpoints* p_parakpts) { this->p_parakpts_ = p_parakpts; } + /// @brief mapping from (ix, iy) to is + void stick_to_pool(Real* stick, //< stick + const int& ir, //< ir + Real* out) const; //< out #else - /// @brief parameterized constructor of psi initializer (without MPI support) - /// @param sf_in interface, link with Structure_Factor ESolver_FP::sf - /// @param pw_wfc_in interface, link with ModulePW::PW_Basis_K* ESolver_FP::pw_wfc - /// @param p_ucell_in interface, link with UnitCell GlobalC::ucell - /// @param random_seed_in random seed - psi_initializer(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, int random_seed_in = 1); - #endif - /// @brief destructor - virtual ~psi_initializer(); - - // shared methods - /// @brief allocate memory for psi - /// @param only_psig if true, only allocate memory for psig, not psi - /// @return pointer to psi, memory allocated - /// @note whether use template for psig or not, it is std::complex because psi is. - psi::Psi>* allocate(bool only_psig = false); - - /// @brief get method of initializing psi - /// @return the method - std::string get_method() const { return this->method; } - /// @brief get complement number of bands - /// @return nbands_complem - int get_nbands_complem() const { return this->nbands_complem; } - - /// @brief set method manually - /// @param method_in initialization method - void set_method(std::string method_in) { this->method = method_in; } - /// @brief set number of complementary bands - /// @param nbands_in nbands_complem - void set_nbands_complem(int nbands_in) { this->nbands_complem = nbands_in; } - - // random to complement bands not initialized by pswfc or nao, therefore it is a basic function, or psi_initializer_random will be inherented by all other methods. - /// @brief kernel to generate and assign random number for psi - /// @param psi for psi::Psi, first use psi.fix(ik), then psi.get_pointer() to pass to parameter list - /// @param iw_start index of wavefunction (start), the index of first band to initialize - /// @param iw_end index of wavefunction (end) - /// @param ik index of kpoint - void random_t(T* psi, const int iw_start, const int iw_end, const int ik); - - // random - /// @brief wrapper of random_t - /// @param psi for psi::Psi, first use psi.fix(ik), then psi.get_pointer() to pass to parameter list - /// @param iw_start index of wavefunction (start), the index of first band to initialize - /// @param iw_end index of wavefunction (end) - /// @param ik index of kpoint - virtual void random(T* psi, const int iw_start, const int iw_end, - const int ik) { ModuleBase::WARNING_QUIT("psi_initializer::random", "Polymorphism error"); } - #ifdef __MPI - /// @brief (about planewaves distribution) from stick mapping to pool - /// @param stick - /// @param ir - /// @param out - void stick_to_pool(Real* stick, const int& ir, Real* out) const; + /// @brief serial version of initialize function, link psi_initializer with external data and methods + virtual void initialize(Structure_Factor*, //< structure factor + ModulePW::PW_Basis_K*, //< planewave basis + UnitCell*, //< unit cell + const int& = 1, //< random seed + pseudopot_cell_vnl* = nullptr) = 0; //< nonlocal pseudopotential #endif + /// @brief CENTRAL FUNCTION: allocate memory for psi + psi::Psi>* allocate(bool only_psig = false); //< if only allocate memory for psig - // mutual methods, virtual, will be implemented differently in derived classes - /// @brief create table for storing calculated overlap between pseudowavefunction/numerical orbitals with spherical bessel function - virtual void create_ovlp_Xjlq() { ModuleBase::WARNING_QUIT("psi_initializer::create_ovlp_table", "Polymorphism error"); } - /// @brief calculate psi in planewave representation - /// @param psi psi - /// @param ik index of kpoint - virtual psi::Psi* cal_psig(int ik) = 0; - - /// @brief for variables can be only initialized for once. - /// @param p_pspot_nl_in (for atomic) interfaces to pseudopot_cell_vnl object, in GlobalC now - /// @attention if one variable is necessary for all methods, initialize it in constructor, not here. - virtual void initialize_only_once(pseudopot_cell_vnl* p_pspot_nl_in = nullptr) = 0; - // atomic - /// @brief setter of pseudopotential files, useful when init_wfc = atomic - virtual void set_pseudopot_files(std::string* pseudopot_files) { ModuleBase::WARNING_QUIT("psi_initializer::set_pseudopot_files", "Polymorphism error"); } - /// @brief normalize pseudo wavefunction - /// @param n_rgrid level of realspace grid - /// @param pswfc pseudowavefunction read from pseudopotential file - /// @param rgrid realspace grid read from pseudopotential file - virtual void normalize_pswfc(int n_rgrid, double* pswfc, double* rgrid) { ModuleBase::WARNING_QUIT("psi_initializer::normalize_pswfc", "Polymorphism error"); } - /// @brief calculate cos(arg)+isin(arg) - /// @param arg argument - /// @param mode if 1, return cos(arg), 0, return cos(arg)+isin(arg), -1, return sin(arg) - /// @return it depends - virtual std::complex phase_factor(double arg, int mode = 0) { ModuleBase::WARNING_QUIT("psi_initializer::phase_factor", "Polymorphism error"); return std::complex(0.0,0.0);} + void random_t(T* psi, //< [out] psi + const int iw_start, //< iw_start, starting band index + const int iw_end, //< iw_end, ending band index + const int ik); //< ik, kpoint index + virtual void random(T* psi, //< [out] psi + const int iw_start, //< iw_start, starting band index + const int iw_end, //< iw_end, ending band index + const int ik) //< ik, kpoint index + { ModuleBase::WARNING_QUIT("psi_initializer::random", "Polymorphism error"); } + /// @brief CENTRAL FUNCTION: allocate interpolate table recording overlap integral between radial function and Spherical Bessel function + virtual void allocate_table() { ModuleBase::WARNING_QUIT("psi_initializer::create_ovlp_table", "Polymorphism error"); } + /// @brief CENTRAL FUNCTION: calculate the interpolate table + virtual void tabulate() = 0; + /// @brief CENTRAL FUNCTION: calculate projection of atomic radial function onto planewave basis BASED ON THE OVERLAP TABLE + virtual void proj_ao_onkG(int ik) = 0; - /// @brief calculate overlap table between pseudowavefunction and spherical bessel function - virtual void cal_ovlp_pswfcjlq() { ModuleBase::WARNING_QUIT("psi_initializer::calc_ovlp_pswfcjlq", "Polymorphism error"); } - // nao - /// @brief setter of numerical orbital files, useful when init_wfc = nao - virtual void set_orbital_files(std::string* orbital_files) { ModuleBase::WARNING_QUIT("psi_initializer::set_orbital_files", "Polymorphism error"); } - /// @brief calculate overlap between numerical orbital and spherical bessel function - virtual void cal_ovlp_flzjlq() { ModuleBase::WARNING_QUIT("psi_initializer::cal_ovlp_flzjlq", "Polymorphism error"); } - // atomic+random - // nao+random - /// @brief setter of random_mix - /// @param random_mix_in new value of random_mix - void set_random_mix(const double random_mix_in) { this->random_mix = random_mix_in; } - /// @brief getter of random_mix - /// @return this->random_mix - double get_random_mix() const { return this->random_mix; } - /// @brief getter of ixy2is, the mapping from fftixy to stick index - /// @return this->ixy2is - int* get_ixy2is() const { return this->ixy2is; } - /// @brief setter of ixy2is, the mapping from fftixy to stick index - void set_ixy2is(int* ixy2is_in) { this->ixy2is = ixy2is_in; } + // getter and setter + UnitCell* p_ucell() const { return this->p_ucell_; } + pseudopot_cell_vnl* p_pspot_nl() const { return this->p_pspot_nl_; } + Structure_Factor* p_sf() const { return this->sf_; } + ModulePW::PW_Basis_K* pw_wfc() const { return this->pw_wfc_; } + int random_seed() const { return this->random_seed_; } + std::vector ixy2is() const { return this->ixy2is_; } + int mem_saver() const { return this->mem_saver_; } + double random_mix() const { return this->random_mix_; } + bool initialized() const { return this->initialized_; } + std::string method() const { return this->method_; } + int nbands_complem() const { return this->nbands_complem_; } + // because unique_ptr is not copyable or used as rvlaue, use shared_ptr instead + // but to avoid ownership issue, use weak_ptr to share the pointer + // therefore there is no really getter to get directly the shared_ptr. + std::weak_ptr> share_psig() { return this->psig_; } - /// @brief setter of p_ucell - /// @param p_ucell_in UnitCell pointer - void set_interface_ucell(UnitCell* p_ucell_in) { this->p_ucell = p_ucell_in; } - /// @brief getter of p_ucell - /// @return this->p_ucell - UnitCell* get_interface_ucell() const { return this->p_ucell; } - #ifdef __MPI - /// @brief setter of p_parakpts - /// @param p_parakpts_in Parallel_Kpoints pointer - void set_interface_parakpts(Parallel_Kpoints* p_parakpts_in) { this->p_parakpts = p_parakpts_in; } - /// @brief getter of p_parakpts - /// @return this->p_parakpts - Parallel_Kpoints* get_interface_parakpts() const { return this->p_parakpts; } - #endif - /// @brief setter of p_pspot_nl - /// @param p_pspot_nl_in pseudopot_cell_vnl pointer - void set_interface_pspot_nl(pseudopot_cell_vnl* p_pspot_nl_in) { this->p_pspot_nl = p_pspot_nl_in; } - /// @brief getter of p_pspot_nl - /// @return this->p_pspot_nl - pseudopot_cell_vnl* get_interface_pspot_nl() const { return this->p_pspot_nl; } - /// @brief setter of sf - /// @param sf_in Structure_Factor pointer - void set_interface_sf(Structure_Factor* sf_in) { this->sf = sf_in; } - /// @brief getter of sf - /// @return this->sf - Structure_Factor* get_interface_sf() const { return this->sf; } - /// @brief setter of pw_wfc - /// @param pw_wfc_in ModulePW::PW_Basis_K pointer - void set_interface_pw_wfc(ModulePW::PW_Basis_K* pw_wfc_in) { this->pw_wfc = pw_wfc_in; } - /// @brief getter of pw_wfc - /// @return this->pw_wfc - ModulePW::PW_Basis_K* get_interface_pw_wfc() const { return this->pw_wfc; } - /// @brief setter of random_seed - /// @param random_seed_in new value of random_seed - void set_random_seed(const int random_seed_in) { this->random_seed = random_seed_in; } - /// @brief getter of random_seed - /// @return this->random_seed - int get_random_seed() const { return this->random_seed; } - /// @brief setter of mem_saver - /// @param mem_saver_in new value of mem_saver - void set_mem_saver(const int mem_saver_in) { this->mem_saver = mem_saver_in; } - /// @brief getter of mem_saver - /// @return this->mem_saver - int get_mem_saver() const { return this->mem_saver; } - /// @brief setter of initialized - /// @param initialized_in new value of initialized - void set_initialized(bool initialized_in) { this->initialized = initialized_in; } - /// @brief getter of initialized - /// @return this->initialized - bool get_initialized() const { return this->initialized; } - // member variables - /// @brief interface to the psi::Psi data structure class - psi::Psi* psig = nullptr; + void set_ucell(UnitCell* p_ucell_in) { this->p_ucell_ = p_ucell_in; } + void set_pspot_nl(pseudopot_cell_vnl* p_pspot_nl_in) { this->p_pspot_nl_ = p_pspot_nl_in; } + void set_sf(Structure_Factor* sf_in) { this->sf_ = sf_in; } + void set_pw_wfc(ModulePW::PW_Basis_K* pw_wfc_in) { this->pw_wfc_ = pw_wfc_in; } + void set_random_mix(const double random_mix_in) { this->random_mix_ = random_mix_in; } + void set_ixy2is(const std::vector& ixy2is_in) { this->ixy2is_ = ixy2is_in; } + void set_random_seed(const int random_seed_in) { this->random_seed_ = random_seed_in; } + void set_mem_saver(const int mem_saver_in) { this->mem_saver_ = mem_saver_in; } + void set_initialized(bool initialized_in) { this->initialized_ = initialized_in; } + void set_method(std::string method_in) { this->method_ = method_in; } + void set_nbands_complem(int nbands_in) { this->nbands_complem_ = nbands_in; } - /// @brief cast from std::complex to float - /// @tparam U float placeholder - /// @param in psi value to cast - /// @return float psi value + // tool methods + // the following function is for compatibility concern, in ESolver_KS_PW the FPTYPE + // now support double, float, std::complex and std::complex + // in total four datatype. However other functions only support double. Therefore to + // cast std::complex to T and avoid compiler error, write the following functions. template - typename std::enable_if::value, U>::type cast_to_T(const std::complex in) - { - return static_cast(in.real()); - } - /// @brief cast from std::complex to double - /// @tparam U double placeholder - /// @param in psi value to cast - /// @return double psi value + typename std::enable_if::value, U>::type cast_to_T(const std::complex in) {return static_cast(in.real());} template - typename std::enable_if::value, U>::type cast_to_T(const std::complex in) - { - return static_cast(in.real()); - } - /// @brief cast from std::complex to std::complex - /// @tparam U std::complex placeholder - /// @param in psi value to cast - /// @return std::complex psi value + typename std::enable_if::value, U>::type cast_to_T(const std::complex in) {return static_cast(in.real());} template - typename std::enable_if>::value, U>::type cast_to_T(const std::complex in) - { - return std::complex(static_cast(in.real()), static_cast(in.imag())); - } - /// @brief cast from std::complex to std::complex - /// @tparam U std::complex placeholder - /// @param in psi value to cast - /// @return std::complex psi value + typename std::enable_if>::value, U>::type cast_to_T(const std::complex in) {return std::complex(static_cast(in.real()), static_cast(in.imag()));} template - typename std::enable_if>::value, U>::type cast_to_T(const std::complex in) - { - return std::complex(in.real(), in.imag()); - } - Real norm2(const std::complex in) - { - return in.real()*in.real() + in.imag()*in.imag(); - } - Real norm2(const Real in) - { - return in*in; - } - /* - template - void cast_right_to_left(U& left, const std::complex right) - { - if(std::is_same::value) *(*float)left = static_cast(right.real()); - else if(std::is_same::value) *(*double)left = static_cast(right.real()); - else if(std::is_same>::value) *(*std::complex)left = std::complex(static_cast(right.real()), static_cast(right.imag())); - else if(std::is_same>::value) *(*std::complex)left = std::complex(right.real(), right.imag()); - else ModuleBase::WARNING_QUIT("psi_initializer::cast_right_to_left", "type error"); - } - */ + typename std::enable_if>::value, U>::type cast_to_T(const std::complex in) {return std::complex(in.real(), in.imag());} + protected: - // interfaces - // ATTENTION: DO NOT USE DELETE ON THESE POINTERS - // normal interfaces - /// @brief interface to the Structure_Factor method class - Structure_Factor* sf = nullptr; - /// @brief interface to the PW_Basis_K data structure class - ModulePW::PW_Basis_K* pw_wfc = nullptr; - // interfaces designed to get rid of dependence troubles of GlobalC in unittest - /// @brief interface to the UnitCell data carrier class, used in all methods - UnitCell* p_ucell = nullptr; + // interface to calculate structural factor. Because it has been created in ESolver, the best + // choice is to get a weak_ptr instead of pointer itself. However encapsulating a raw pointer + // is not a correct usage of smart pointer + Structure_Factor* sf_ = nullptr; + // interface to PW_Basis_K, stores information of |k+G> and |G>, also with methods like + // getgpluskcar... + ModulePW::PW_Basis_K* pw_wfc_ = nullptr; + // interface to UnitCell. UnitCell should be singleton and keep const for most cases. Due to + // many data are needed to read by psi_initializer, get a pointer to UnitCell instead of + // importing all information one-by-one in parameter list. + UnitCell* p_ucell_ = nullptr; #ifdef __MPI - /// @brief interface to the Parallel_Kpoints method class, used in all methods - Parallel_Kpoints* p_parakpts = nullptr; + Parallel_Kpoints* p_parakpts_ = nullptr; #endif - /// @brief interface to the pseudopot_cell_vnl data carrier class, used in atomic - pseudopot_cell_vnl* p_pspot_nl = nullptr; - - int random_seed = 1; // random seed - // tool interfaces - /// @brief method of Spherical Bessel Transformation + pseudopot_cell_vnl* p_pspot_nl_ = nullptr; + // shared by atomic, nao, atomic+random, nao+random ModuleBase::SphericalBesselTransformer sbt; // useful for atomic-like methods + // shared by random, atomic+random, nao+random + int random_seed_ = 1; + // in old version it is of datatype int*, use std::vector to avoid memory leak + std::vector ixy2is_; + // refactored psig, in old version it is of datatype Psi*, use std::shared_ptr to + // avoid memory leak + std::shared_ptr> psig_; private: - // basic properties - int mem_saver = 0; // will deprecated this variable soon - std::string method = "none"; - // non-random case - int nbands_complem = 0; - // random - int* ixy2is; - - bool initialized = false; // whether initialized or not - // atomic+random or nao+random - double random_mix = 0; + int mem_saver_ = 0; + std::string method_ = "none"; + int nbands_complem_ = 0; + bool initialized_ = false; + double random_mix_ = 0; }; #endif \ No newline at end of file diff --git a/source/module_psi/psi_initializer_atomic.cpp b/source/module_psi/psi_initializer_atomic.cpp index 1723d043d3..a29a72c746 100644 --- a/source/module_psi/psi_initializer_atomic.cpp +++ b/source/module_psi/psi_initializer_atomic.cpp @@ -11,147 +11,134 @@ // three global variables definition #include "module_base/global_variable.h" -template -#ifdef __MPI -psi_initializer_atomic::psi_initializer_atomic(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, Parallel_Kpoints* p_parakpts_in, int random_seed_in) - : psi_initializer(sf_in, pw_wfc_in, p_ucell_in, p_parakpts_in, random_seed_in) -#else -psi_initializer_atomic::psi_initializer_atomic(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, int random_seed_in) - : psi_initializer(sf_in, pw_wfc_in, p_ucell_in, random_seed_in) -#endif -{ - this->set_method("atomic"); -} -template -psi_initializer_atomic::~psi_initializer_atomic() {} - -/* I leave this function here for deprecation of UnitCell in the future */ -/* -template -void psi_initializer_atomic::set_pseudopot_files(std::string* pseudopot_files) +// free function, compared with common radial function normalization, it does not multiply r to function +// due to pswfc is already multiplied by r +template +void normalize(int n_rgrid, std::vector& pswfcr, double* rab) { - ModuleBase::timer::tick("psi_initializer_atomic", "set_pseudopot_files"); - for (int itype = 0; itype < this->p_ucell->ntype; itype++) - { - this->pseudopot_files.push_back(pseudopot_files[itype]); - } - ModuleBase::timer::tick("psi_initializer_atomic", "set_pseudopot_files"); + std::vector pswfc2r2(pswfcr.size()); + std::transform(pswfcr.begin(), pswfcr.end(), pswfc2r2.begin(), [](T pswfc) { return pswfc * pswfc; }); + T norm = ModuleBase::Integral::simpson(n_rgrid, pswfc2r2.data(), rab); + norm = sqrt(norm); + std::transform(pswfcr.begin(), pswfcr.end(), pswfcr.begin(), [norm](T pswfc) { return pswfc / norm; }); } -*/ template -void psi_initializer_atomic::create_ovlp_Xjlq() +void psi_initializer_atomic::allocate_table() { // find correct dimension for ovlp_flzjlq - int dim1 = this->p_ucell->ntype; + int dim1 = this->p_ucell_->ntype; int dim2 = 0; // dim2 should be the maximum number of pseudo atomic orbitals - for (int it = 0; it < this->p_ucell->ntype; it++) + for (int it = 0; it < this->p_ucell_->ntype; it++) { - dim2 = (this->p_ucell->atoms[it].ncpp.nchi > dim2) ? this->p_ucell->atoms[it].ncpp.nchi : dim2; + dim2 = (this->p_ucell_->atoms[it].ncpp.nchi > dim2) ? this->p_ucell_->atoms[it].ncpp.nchi : dim2; } if (dim2 == 0) { - ModuleBase::WARNING_QUIT("psi_initializer_atomic::create_ovlp_Xjlq", "there is not ANY pseudo atomic orbital read in present system, recommand other methods, quit."); + ModuleBase::WARNING_QUIT("psi_initializer_atomic::allocate_table", "there is not ANY pseudo atomic orbital read in present system, recommand other methods, quit."); } int dim3 = GlobalV::NQX; // allocate memory for ovlp_flzjlq - this->ovlp_pswfcjlq.create(dim1, dim2, dim3); - this->ovlp_pswfcjlq.zero_out(); + this->ovlp_pswfcjlq_.create(dim1, dim2, dim3); + this->ovlp_pswfcjlq_.zero_out(); } +#ifdef __MPI template -void psi_initializer_atomic::normalize_pswfc(int n_rgrid, double* pswfc, double* rab) +void psi_initializer_atomic::initialize(Structure_Factor* sf, //< structure factor + ModulePW::PW_Basis_K* pw_wfc, //< planewave basis + UnitCell* p_ucell, //< unit cell + Parallel_Kpoints* p_parakpts, //< parallel kpoints + const int& random_seed, //< random seed + pseudopot_cell_vnl* p_pspot_nl, + const int& rank) { - ModuleBase::timer::tick("psi_initializer_atomic", "normalize_pswfc"); - double* norm_pswfc = new double[n_rgrid]; - for (int ir = 0; ir < n_rgrid; ir++) - { - norm_pswfc[ir] = pswfc[ir] * pswfc[ir]; // because in pseudopotential the pswfc already multiplied by r - } - double norm = ModuleBase::Integral::simpson(n_rgrid, norm_pswfc, rab); - delete[] norm_pswfc; - for (int ir = 0; ir < n_rgrid; ir++) - { - pswfc[ir] /= sqrt(norm); - } - ModuleBase::timer::tick("psi_initializer_atomic", "normalize_pswfc"); + ModuleBase::timer::tick("psi_initializer_atomic", "initialize"); + if(p_pspot_nl == nullptr) ModuleBase::WARNING_QUIT("psi_initializer_atomic::initialize_only_once", + "pseudopot_cell_vnl object cannot be mullptr for atomic, quit."); + // import + this->sf_ = sf; + this->pw_wfc_ = pw_wfc; + this->p_ucell_ = p_ucell; + this->p_parakpts_ = p_parakpts; + this->p_pspot_nl_ = p_pspot_nl; + this->random_seed_ = random_seed; + // allocate + this->allocate_table(); + ModuleBase::timer::tick("psi_initializer_atomic", "initialize_only_once"); } - +#else template -void psi_initializer_atomic::initialize_only_once(pseudopot_cell_vnl* p_pspot_nl_in) +void psi_initializer_atomic::initialize(Structure_Factor* sf, //< structure factor + ModulePW::PW_Basis_K* pw_wfc, //< planewave basis + UnitCell* p_ucell, //< unit cell + const int& random_seed, //< random seed + pseudopot_cell_vnl* p_pspot_nl) { - ModuleBase::timer::tick("psi_initializer_atomic", "initialize_only_once"); - if(p_pspot_nl_in == nullptr) - { - ModuleBase::WARNING_QUIT("psi_initializer_atomic::initialize_only_once", "pseudopot_cell_vnl object cannot be mullptr for atomic, quit."); - } - this->p_pspot_nl = p_pspot_nl_in; - this->create_ovlp_Xjlq(); - //this->set_pseudopot_files(); - //this->cal_ovlp_pswfcjlq(); //because GlobalV::NQX will change during vcrelax, so it should be called in both init and init_after_vc + ModuleBase::timer::tick("psi_initializer_atomic", "initialize"); + if(p_pspot_nl == nullptr) ModuleBase::WARNING_QUIT("psi_initializer_atomic::initialize_only_once", + "pseudopot_cell_vnl object cannot be mullptr for atomic, quit."); + // import + this->sf_ = sf; + this->pw_wfc_ = pw_wfc; + this->p_ucell_ = p_ucell; + this->p_pspot_nl_ = p_pspot_nl; + this->random_seed_ = random_seed; + // allocate + this->allocate_table(); ModuleBase::timer::tick("psi_initializer_atomic", "initialize_only_once"); } +#endif template -void psi_initializer_atomic::cal_ovlp_pswfcjlq() +void psi_initializer_atomic::tabulate() { ModuleBase::timer::tick("psi_initializer_atomic", "cal_ovlp_pswfcjlq"); int maxn_rgrid = 0; - double* qgrid = new double[GlobalV::NQX]; + std::vector qgrid(GlobalV::NQX); for (int iq = 0; iq < GlobalV::NQX; iq++) { qgrid[iq] = GlobalV::DQ * iq; } - for (int it=0; itp_ucell->ntype; it++) + for (int it=0; itp_ucell_->ntype; it++) { - maxn_rgrid = (this->p_ucell->atoms[it].ncpp.msh > maxn_rgrid) ? this->p_ucell->atoms[it].ncpp.msh : maxn_rgrid; + maxn_rgrid = (this->p_ucell_->atoms[it].ncpp.msh > maxn_rgrid) ? this->p_ucell_->atoms[it].ncpp.msh : maxn_rgrid; } ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running,"max mesh points in Pseudopotential",maxn_rgrid); - const double pref = ModuleBase::FOUR_PI / sqrt(this->p_ucell->omega); + const double pref = ModuleBase::FOUR_PI / sqrt(this->p_ucell_->omega); ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running,"dq(describe PAO in reciprocal space)",GlobalV::DQ); ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running,"max q",GlobalV::NQX); - for (int it=0; itp_ucell->ntype; it++) + for (int it=0; itp_ucell_->ntype; it++) { - Atom* atom = &this->p_ucell->atoms[it]; + Atom* atom = &this->p_ucell_->atoms[it]; GlobalV::ofs_running<<"\n number of pseudo atomic orbitals for "<label<<" is "<< atom->ncpp.nchi << std::endl; for (int ic = 0; ic < atom->ncpp.nchi ;ic++) { - int n_rgrid; - if(GlobalV::PSEUDO_MESH) - n_rgrid = atom->ncpp.mesh; - else - n_rgrid = atom->ncpp.msh; - double* pswfc = new double[n_rgrid]; - for (int ir=0; irncpp.chi(ic, ir); // copy pswfc from atom->ncpp.chi to pswfc - } - this->normalize_pswfc(n_rgrid, pswfc, atom->ncpp.rab); + int n_rgrid = (GlobalV::PSEUDO_MESH)?atom->ncpp.mesh:atom->ncpp.msh; + std::vector pswfcr(n_rgrid); + for (int ir=0; irncpp.chi(ic, ir); + normalize(n_rgrid, pswfcr, atom->ncpp.rab); if (atom->ncpp.oc[ic] >= 0.0) // reasonable occupation number, but is it always true? { const int l = atom->ncpp.lchi[ic]; - double* ovlp_pswfcjlq_q = new double[GlobalV::NQX]; - this->sbt.direct(l, atom->ncpp.msh, atom->ncpp.r, pswfc, GlobalV::NQX, qgrid, ovlp_pswfcjlq_q, 1); + std::vector ovlp_pswfcjlq_q(GlobalV::NQX); + this->sbt.direct(l, atom->ncpp.msh, atom->ncpp.r, pswfcr.data(), GlobalV::NQX, qgrid.data(), ovlp_pswfcjlq_q.data(), 1); for (int iq = 0; iq < GlobalV::NQX; iq++) { - this->ovlp_pswfcjlq(it, ic, iq) = pref * ovlp_pswfcjlq_q[iq]; + this->ovlp_pswfcjlq_(it, ic, iq) = pref * ovlp_pswfcjlq_q[iq]; } - delete [] ovlp_pswfcjlq_q; } - delete [] pswfc; } } - delete [] qgrid; ModuleBase::timer::tick("psi_initializer_atomic", "cal_ovlp_pswfcjlq"); } -template -std::complex psi_initializer_atomic::phase_factor(double arg, int mode) +std::complex phase_factor(double arg, int mode) { if(mode == 1) return std::complex(cos(arg),0); else if (mode == -1) return std::complex(0, sin(arg)); @@ -160,54 +147,59 @@ std::complex psi_initializer_atomic::phase_factor(double arg, } template -psi::Psi* psi_initializer_atomic::cal_psig(int ik) +void psi_initializer_atomic::proj_ao_onkG(int ik) { - ModuleBase::timer::tick("psi_initializer_atomic", "cal_psig"); - this->psig->fix_k(ik); + ModuleBase::timer::tick("psi_initializer_atomic", "proj_ao_onkG"); + this->psig_->fix_k(ik); //this->print_status(psi); - const int npw = this->pw_wfc->npwk[ik]; - int lmax = this->p_ucell->lmax_ppwf; + const int npw = this->pw_wfc_->npwk[ik]; + int lmax = this->p_ucell_->lmax_ppwf; const int total_lm = (lmax + 1) * (lmax + 1); ModuleBase::matrix ylm(total_lm, npw); - std::complex *aux = new std::complex[npw]; - double *chiaux = nullptr; - ModuleBase::Vector3 *gk = new ModuleBase::Vector3 [npw]; + std::vector> aux(npw); + std::vector chiaux(npw); + std::vector> gk(npw); + // I plan to use std::transform to replace the following for loop + // but seems it is not as easy as I thought, the lambda function is not easy to write for (int ig = 0; ig < npw; ig++) { - gk[ig] = this->pw_wfc->getgpluskcar(ik, ig); + gk[ig] = this->pw_wfc_->getgpluskcar(ik, ig); } - ModuleBase::YlmReal::Ylm_Real(total_lm, npw, gk, ylm); + ModuleBase::YlmReal::Ylm_Real(total_lm, npw, gk.data(), ylm); int index = 0; - double *ovlp_pswfcjlg = new double[npw]; - for (int it = 0; it < this->p_ucell->ntype; it++) + std::vector ovlp_pswfcjlg(npw); + for (int it = 0; it < this->p_ucell_->ntype; it++) { - for (int ia = 0; ia < this->p_ucell->atoms[it].na; ia++) + for (int ia = 0; ia < this->p_ucell_->atoms[it].na; ia++) { /* FOR EVERY ATOM */ - std::complex *sk = this->sf->get_sk(ik, it, ia, this->pw_wfc); - for (int ipswfc = 0; ipswfc < this->p_ucell->atoms[it].ncpp.nchi; ipswfc++) + // I think it is always a BAD idea to new one pointer in a function, then return it + // it indicates the ownership of the pointer and behind memory is transferred to the caller + // then one must manually delete it, makes new-delete not symmetric + std::complex *sk = this->sf_->get_sk(ik, it, ia, this->pw_wfc_); + for (int ipswfc = 0; ipswfc < this->p_ucell_->atoms[it].ncpp.nchi; ipswfc++) { /* FOR EVERY PSWFC OF ATOM */ - if (this->p_ucell->atoms[it].ncpp.oc[ipswfc] >= 0.0) + if (this->p_ucell_->atoms[it].ncpp.oc[ipswfc] >= 0.0) { /* IF IS OCCUPIED, GET L */ - const int l = this->p_ucell->atoms[it].ncpp.lchi[ipswfc]; + const int l = this->p_ucell_->atoms[it].ncpp.lchi[ipswfc]; std::complex lphase = pow(ModuleBase::NEG_IMAG_UNIT, l); for (int ig=0; igovlp_pswfcjlq, it, ipswfc, - GlobalV::NQX, GlobalV::DQ, gk[ig].norm() * this->p_ucell->tpiba ); + this->ovlp_pswfcjlq_, it, ipswfc, + GlobalV::NQX, GlobalV::DQ, gk[ig].norm() * this->p_ucell_->tpiba ); } /* NSPIN == 4 */ if(GlobalV::NSPIN == 4) { - if(this->p_ucell->atoms[it].ncpp.has_so) + if(this->p_ucell_->atoms[it].ncpp.has_so) { Soc soc; soc.rot_ylm(l + 1); - const double j = this->p_ucell->atoms[it].ncpp.jchi[ipswfc]; + const double j = this->p_ucell_->atoms[it].ncpp.jchi[ipswfc]; /* NOT NONCOLINEAR CASE, rotation matrix become identity */ if (!(GlobalV::DOMAG||GlobalV::DOMAG_Z)) { @@ -223,8 +215,8 @@ psi::Psi* psi_initializer_atomic::cal_psig(int ik) if(fabs(cg_coeffs[is]) > 1e-8) { /* GET COMPLEX SPHERICAL HARMONIC FUNCTION */ - const int ind = this->p_pspot_nl->lmaxkb + soc.sph_ind(l,j,m,is); // ind can be l+m, l+m+1, l+m-1 - ModuleBase::GlobalFunc::ZEROS(aux, npw); + const int ind = this->p_pspot_nl_->lmaxkb + soc.sph_ind(l,j,m,is); // ind can be l+m, l+m+1, l+m-1 + std::fill(aux.begin(), aux.end(), std::complex(0.0, 0.0)); for(int n1 = 0; n1 < 2*l+1; n1++) { const int lm = l*l +n1; @@ -239,8 +231,8 @@ psi::Psi* psi_initializer_atomic::cal_psig(int ik) } for(int ig = 0; ig < npw; ig++) { - (*(this->psig))(index, - ig + this->pw_wfc->npwk_max*is ) = + (*(this->psig_))(index, + ig + this->pw_wfc_->npwk_max*is ) = this->template cast_to_T( lphase * cg_coeffs[is] * sk[ig] * aux[ig] * ovlp_pswfcjlg[ig] ); @@ -250,8 +242,8 @@ psi::Psi* psi_initializer_atomic::cal_psig(int ik) { for(int ig=0; ig < npw; ig++) { - (*(this->psig))(index, - ig + this->pw_wfc->npwk_max*is ) = + (*(this->psig_))(index, + ig + this->pw_wfc_->npwk_max*is ) = this->template cast_to_T( std::complex(0.0, 0.0) ); @@ -269,23 +261,17 @@ psi::Psi* psi_initializer_atomic::cal_psig(int ik) /* J = L - 1/2 -> continue */ /* J = L + 1/2 */ if(fabs(j - l + 0.5) < 1e-4) continue; - delete[] chiaux; chiaux = new double [npw]; + chiaux.clear(); chiaux.resize(npw); /* L == 0 */ - if(l == 0) - { - for(int ig = 0; ig < npw; ig++) - { - chiaux[ig] = ovlp_pswfcjlg[ig]; - } - } + if(l == 0) std::memcpy(chiaux.data(), ovlp_pswfcjlg.data(), npw * sizeof(double)); else { /* L != 0, scan pswfcs that have the same L and satisfy J(pswfc) = L - 0.5 */ - for(int jpsiwfc = 0; jpsiwfc < this->p_ucell->atoms[it].ncpp.nchi; jpsiwfc++) + for(int jpsiwfc = 0; jpsiwfc < this->p_ucell_->atoms[it].ncpp.nchi; jpsiwfc++) { if( - (this->p_ucell->atoms[it].ncpp.lchi[jpsiwfc] == l) - &&(fabs(this->p_ucell->atoms[it].ncpp.jchi[jpsiwfc] - l + 0.5) < 1e-4)) + (this->p_ucell_->atoms[it].ncpp.lchi[jpsiwfc] == l) + &&(fabs(this->p_ucell_->atoms[it].ncpp.jchi[jpsiwfc] - l + 0.5) < 1e-4)) { ipswfc_noncolin_soc = jpsiwfc; break; @@ -296,8 +282,8 @@ psi::Psi* psi_initializer_atomic::cal_psig(int ik) /* average and , a and b seem not necessarily to be equal */ chiaux[ig] = l * ModuleBase::PolyInt::Polynomial_Interpolation( - this->ovlp_pswfcjlq, it, ipswfc_noncolin_soc, - GlobalV::NQX, GlobalV::DQ, gk[ig].norm() * this->p_ucell->tpiba); + this->ovlp_pswfcjlq_, it, ipswfc_noncolin_soc, + GlobalV::NQX, GlobalV::DQ, gk[ig].norm() * this->p_ucell_->tpiba); chiaux[ig] += ovlp_pswfcjlg[ig] * (l + 1.0) ; chiaux[ig] *= 1/(2.0*l+1.0); } @@ -305,16 +291,16 @@ psi::Psi* psi_initializer_atomic::cal_psig(int ik) /* ROTATE ACCORDING TO NONCOLINEAR */ double alpha, gamma; std::complex fup, fdw; - alpha = this->p_ucell->atoms[it].angle1[ia]; - gamma = -1 * this->p_ucell->atoms[it].angle2[ia] + 0.5 * ModuleBase::PI; + alpha = this->p_ucell_->atoms[it].angle1[ia]; + gamma = -1 * this->p_ucell_->atoms[it].angle2[ia] + 0.5 * ModuleBase::PI; for(int m = 0; m < 2*l+1; m++) { const int lm = l*l +m; - if(index+2*l+1 > this->p_ucell->natomwfc) + if(index+2*l+1 > this->p_ucell_->natomwfc) { - std::cout<<__FILE__<<__LINE__<<" "<p_ucell->natomwfc<::cal_psig()","error: too many wfcs"); + std::cout<<__FILE__<<__LINE__<<" "<p_ucell_->natomwfc<::proj_ao_onkG()","error: too many wfcs"); } for(int ig = 0;ig* psi_initializer_atomic::cal_psig(int ik) //first rotation with angle alpha around (OX) for(int ig = 0;igphase_factor(0.5*alpha, 1)*aux[ig]; - fdw = this->phase_factor(0.5*alpha, -1)*aux[ig]; + fup = phase_factor(0.5*alpha, 1)*aux[ig]; + fdw = phase_factor(0.5*alpha, -1)*aux[ig]; //build the orthogonal wfc //first rotation with angle (alpha + ModuleBase::PI) around (OX) - (*(this->psig))(index, ig) = - this->template cast_to_T( - this->phase_factor(0.5*gamma)*fup - ); - (*(this->psig))(index, ig+this->pw_wfc->npwk_max) = - this->template cast_to_T( - this->phase_factor(-0.5*gamma)*fdw - ); + (*(this->psig_))(index, ig) = + this->template cast_to_T(phase_factor(0.5*gamma, 0)*fup); + (*(this->psig_))(index, ig+this->pw_wfc_->npwk_max) = + this->template cast_to_T(phase_factor(-0.5*gamma, 0)*fdw); //second rotation with angle gamma around(OZ) - fup = this->phase_factor(0.5*(alpha + ModuleBase::PI), 1)*aux[ig]; - fdw = this->phase_factor(0.5*(alpha + ModuleBase::PI), -1)*aux[ig]; - (*(this->psig))(index+2*l+1, ig) = - this->template cast_to_T( - this->phase_factor(0.5*gamma)*fup - ); - (*(this->psig))(index+2*l+1, ig+this->pw_wfc->npwk_max) = - this->template cast_to_T( - this->phase_factor(-0.5*gamma)*fdw - ); + fup = phase_factor(0.5*(alpha + ModuleBase::PI), 1)*aux[ig]; + fdw = phase_factor(0.5*(alpha + ModuleBase::PI), -1)*aux[ig]; + (*(this->psig_))(index+2*l+1, ig) = + this->template cast_to_T(phase_factor(0.5*gamma, 0)*fup); + (*(this->psig_))(index+2*l+1, ig+this->pw_wfc_->npwk_max) = + this->template cast_to_T(phase_factor(-0.5*gamma, 0)*fdw); } index++; } @@ -357,17 +335,17 @@ psi::Psi* psi_initializer_atomic::cal_psig(int ik) {//atomic_wfc_nc double alpha, gamman; std::complex fup, fdown; - //alpha = this->p_ucell->magnet.angle1_[it]; - //gamman = -this->p_ucell->magnet.angle2_[it] + 0.5*ModuleBase::PI; - alpha = this->p_ucell->atoms[it].angle1[ia]; - gamman = -1 * this->p_ucell->atoms[it].angle2[ia] + 0.5 * ModuleBase::PI; + //alpha = this->p_ucell_->magnet.angle1_[it]; + //gamman = -this->p_ucell_->magnet.angle2_[it] + 0.5*ModuleBase::PI; + alpha = this->p_ucell_->atoms[it].angle1[ia]; + gamman = -1 * this->p_ucell_->atoms[it].angle2[ia] + 0.5 * ModuleBase::PI; for(int m = 0; m < 2*l+1; m++) { const int lm = l*l +m; - if(index+2*l+1 > this->p_ucell->natomwfc) + if(index+2*l+1 > this->p_ucell_->natomwfc) { - std::cout<<__FILE__<<__LINE__<<" "<p_ucell->natomwfc<::cal_psig()","error: too many wfcs"); + std::cout<<__FILE__<<__LINE__<<" "<p_ucell_->natomwfc<::proj_ao_onkG()","error: too many wfcs"); } for(int ig = 0;ig* psi_initializer_atomic::cal_psig(int ik) fdown = ModuleBase::IMAG_UNIT * sin(0.5* alpha) * aux[ig]; //build the orthogonal wfc //first rotation with angle(alpha+ModuleBase::PI) around(OX) - (*(this->psig))(index, ig) = + (*(this->psig_))(index, ig) = this->template cast_to_T( (cos(0.5*gamman) + ModuleBase::IMAG_UNIT * sin(0.5*gamman)) * fup ); - (*(this->psig))(index, ig+ this->pw_wfc->npwk_max) = + (*(this->psig_))(index, ig+ this->pw_wfc_->npwk_max) = this->template cast_to_T( (cos(0.5*gamman) - ModuleBase::IMAG_UNIT * sin(0.5*gamman)) * fdown ); //second rotation with angle gamma around(OZ) fup = cos(0.5 * (alpha + ModuleBase::PI)) * aux[ig]; fdown = ModuleBase::IMAG_UNIT * sin(0.5 * (alpha + ModuleBase::PI)) * aux[ig]; - (*(this->psig))(index+2*l+1, ig) = + (*(this->psig_))(index+2*l+1, ig) = this->template cast_to_T( (cos(0.5*gamman) + ModuleBase::IMAG_UNIT * sin(0.5*gamman)) * fup ); - (*(this->psig))(index+2*l+1, ig+ this->pw_wfc->npwk_max) = + (*(this->psig_))(index+2*l+1, ig+ this->pw_wfc_->npwk_max) = this->template cast_to_T( (cos(0.5*gamman) - ModuleBase::IMAG_UNIT * sin(0.5*gamman)) * fdown ); @@ -413,7 +391,7 @@ psi::Psi* psi_initializer_atomic::cal_psig(int ik) const int lm = l * l + m; for (int ig = 0; ig < npw; ig++) { - (*(this->psig))(index, ig) = + (*(this->psig_))(index, ig) = this->template cast_to_T( lphase * sk [ig] * ylm(lm, ig) * ovlp_pswfcjlg[ig] ); @@ -426,18 +404,12 @@ psi::Psi* psi_initializer_atomic::cal_psig(int ik) delete [] sk; } } - - delete[] ovlp_pswfcjlg; - delete[] gk; - delete[] aux; - delete[] chiaux; /* complement the rest of bands if there are */ - if(this->get_nbands_complem() > 0) + if(this->nbands_complem() > 0) { - this->random_t(this->psig->get_pointer(), index, this->psig->get_nbands(), ik); + this->random_t(this->psig_->get_pointer(), index, this->psig_->get_nbands(), ik); } - ModuleBase::timer::tick("psi_initializer_atomic", "cal_psig"); - return this->psig; + ModuleBase::timer::tick("psi_initializer_atomic", "proj_ao_onkG"); } template class psi_initializer_atomic, psi::DEVICE_CPU>; diff --git a/source/module_psi/psi_initializer_atomic.h b/source/module_psi/psi_initializer_atomic.h index cc29f9d58a..3eb3596649 100644 --- a/source/module_psi/psi_initializer_atomic.h +++ b/source/module_psi/psi_initializer_atomic.h @@ -12,70 +12,34 @@ class psi_initializer_atomic : public psi_initializer private: using Real = typename GetTypeReal::type; public: - #ifdef __MPI - /// @brief parameterized constructor of psi initializer (with MPI support) - /// @param sf_in interface, link with Structure_Factor ESolver_FP::sf - /// @param pw_wfc_in interface, link with ModulePW::PW_Basis_K* ESolver_FP::pw_wfc - /// @param p_ucell_in interface, link with UnitCell GlobalC::ucell - /// @param p_parakpts_in interface, link with Parallel_Kpoints GlobalC::Pkpoints - /// @param random_seed_in random seed - psi_initializer_atomic(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, Parallel_Kpoints* p_parakpts_in, int random_seed_in = 1); + psi_initializer_atomic() {this->set_method("atomic");} + ~psi_initializer_atomic() {}; + + #ifdef __MPI // MPI additional implementation + /// @brief initialize the psi_initializer with external data and methods + virtual void initialize(Structure_Factor*, //< structure factor + ModulePW::PW_Basis_K*, //< planewave basis + UnitCell*, //< unit cell + Parallel_Kpoints*, //< parallel kpoints + const int& = 1, //< random seed + pseudopot_cell_vnl* = nullptr, //< nonlocal pseudopotential + const int& = 0) override; //< MPI rank #else - /// @brief parameterized constructor of psi initializer (without MPI support) - /// @param sf_in interface, link with Structure_Factor ESolver_FP::sf - /// @param pw_wfc_in interface, link with ModulePW::PW_Basis_K* ESolver_FP::pw_wfc - /// @param p_ucell_in interface, link with UnitCell GlobalC::ucell - /// @param random_seed_in random seed - psi_initializer_atomic(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, int random_seed_in = 1); + /// @brief serial version of initialize function, link psi_initializer with external data and methods + virtual void initialize(Structure_Factor*, //< structure factor + ModulePW::PW_Basis_K*, //< planewave basis + UnitCell*, //< unit cell + const int& = 1, //< random seed + pseudopot_cell_vnl* = nullptr) override;//< nonlocal pseudopotential #endif - /// @brief default destructor - ~psi_initializer_atomic(); + virtual void allocate_table() override; + virtual void tabulate() override; + virtual void proj_ao_onkG(int ik) override; + // additional getter + std::vector pseudopot_files() const { return pseudopot_files_; } - // methods - /// @brief calculate and output planewave wavefunction - /// @param ik kpoint index - /// @return initialized planewave wavefunction (psi::Psi>*) - psi::Psi* cal_psig(int ik) override; - - /// @brief initialize only once, for atomic, it should be, create ovlp_pswfcjlq, calculate ovlp_pswfcjlq - /// @param p_pspot_nl_in (for atomic) interfaces to pseudopot_cell_vnl object, in GlobalC now - /// @attention if one variable is necessary for all methods, initialize it in constructor, not here. - void initialize_only_once(pseudopot_cell_vnl* p_pspot_nl_in) override; - // setters - - /* I leave this function here for deprecation of UnitCell in the future */ - /// @brief setter of pseudpotential filenames - /// @param pseudopot_files pseudpotential filenames organized in an array - //void set_pseudopot_files(std::string* pseudopot_files); - // I wont write a function to set ovlp_pswfcjlq, it is totally useless - - /// @brief allocate memory for ovlp_pswfcjlq and initialize all elements to 0 - void create_ovlp_Xjlq() override; - /// @brief specialized normalization of wfc function - /// @param n_rgrid number of grid points in realspace - /// @param pswfc pseudo wavefunction in pseudopotential files - /// @param rgrid realspace grid points, r1, r2, ... - void normalize_pswfc(int n_rgrid, double* pswfc, double* rgrid) override; - /// @brief simple unitary phase factor - /// @param arg the argument of the phase factor - /// @param mode +1 for real part, -1 for imaginary part, 0 for the whole - /// @return the phase factor - std::complex phase_factor(double arg, int mode = 0) override; - /// @brief calculate the overlap between pseudo atomic wavefunctions and planewave basis - void cal_ovlp_pswfcjlq() override; - - // historically left functions - // getters - - /// @brief getter of pseudpotential files list - /// @return pseudopotential files list - std::vector get_pseudopot_files() const { return pseudopot_files; } - - /// @brief getter of matrix of overlap between pseudo wavefunction and spherical bessel function - /// @return ovlp_pswfcjlq - ModuleBase::realArray get_ovlp_pswfcjlq() const { return ovlp_pswfcjlq; } private: - std::vector pseudopot_files; - ModuleBase::realArray ovlp_pswfcjlq; + std::vector pseudopot_files_; + ModuleBase::realArray ovlp_pswfcjlq_; }; #endif \ No newline at end of file diff --git a/source/module_psi/psi_initializer_atomic_random.cpp b/source/module_psi/psi_initializer_atomic_random.cpp index a1c7b74db8..43bd03242a 100644 --- a/source/module_psi/psi_initializer_atomic_random.cpp +++ b/source/module_psi/psi_initializer_atomic_random.cpp @@ -1,44 +1,51 @@ #include "psi_initializer_atomic_random.h" -template #ifdef __MPI -psi_initializer_atomic_random::psi_initializer_atomic_random(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, Parallel_Kpoints* p_parakpts_in, int random_seed_in) - : psi_initializer_atomic(sf_in, pw_wfc_in, p_ucell_in, p_parakpts_in, random_seed_in) -#else -psi_initializer_atomic_random::psi_initializer_atomic_random(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, int random_seed_in) - : psi_initializer_atomic(sf_in, pw_wfc_in, p_ucell_in, random_seed_in) -#endif +template +void psi_initializer_atomic_random::initialize(Structure_Factor* sf, //< structure factor + ModulePW::PW_Basis_K* pw_wfc, //< planewave basis + UnitCell* p_ucell, //< unit cell + Parallel_Kpoints* p_parakpts, //< parallel kpoints + const int& random_seed, //< random seed + pseudopot_cell_vnl* p_pspot_nl, + const int& rank) { - this->set_method("atomic+random"); - this->set_random_mix(0.05); + psi_initializer_atomic::initialize(sf, pw_wfc, p_ucell, p_parakpts, random_seed, p_pspot_nl, rank); + this->ixy2is_.clear(); + this->ixy2is_.resize(this->pw_wfc_->fftnxy); + this->pw_wfc_->getfftixy2is(this->ixy2is_.data()); } - -template -psi_initializer_atomic_random::~psi_initializer_atomic_random() {} - +#else template -void psi_initializer_atomic_random::initialize_only_once(pseudopot_cell_vnl* p_pspot_nl_in) +void psi_initializer_atomic_random::initialize(Structure_Factor* sf, //< structure factor + ModulePW::PW_Basis_K* pw_wfc, //< planewave basis + UnitCell* p_ucell, //< unit cell + const int& random_seed, //< random seed + pseudopot_cell_vnl* p_pspot_nl) { - psi_initializer_atomic::initialize_only_once(p_pspot_nl_in); + psi_initializer_atomic::initialize(sf, pw_wfc, p_ucell, random_seed, p_pspot_nl); + this->ixy2is_.clear(); + this->ixy2is_.resize(this->pw_wfc_->fftnxy); + this->pw_wfc_->getfftixy2is(this->ixy2is_.data()); } +#endif template -psi::Psi* psi_initializer_atomic_random::cal_psig(int ik) +void psi_initializer_atomic_random::proj_ao_onkG(int ik) { - double rm = this->get_random_mix(); - this->psig->fix_k(ik); - this->psig = psi_initializer_atomic::cal_psig(ik); - psi::Psi psi_random(1, this->psig->get_nbands(), this->psig->get_nbasis(), nullptr); + double rm = this->random_mix(); + this->psig_->fix_k(ik); + psi_initializer_atomic::proj_ao_onkG(ik); + psi::Psi psi_random(1, this->psig_->get_nbands(), this->psig_->get_nbasis(), nullptr); psi_random.fix_k(0); this->random_t(psi_random.get_pointer(), 0, psi_random.get_nbands(), ik); - for(int iband = 0; iband < this->psig->get_nbands(); iband++) + for(int iband = 0; iband < this->psig_->get_nbands(); iband++) { - for(int ibasis = 0; ibasis < this->psig->get_nbasis(); ibasis++) + for(int ibasis = 0; ibasis < this->psig_->get_nbasis(); ibasis++) { - (*(this->psig))(iband, ibasis) = ((Real)(1-rm))*(*(this->psig))(iband, ibasis) + ((Real)rm)*psi_random(iband, ibasis); + (*(this->psig_))(iband, ibasis) = ((Real)(1-rm))*(*(this->psig_))(iband, ibasis) + ((Real)rm)*psi_random(iband, ibasis); } } - return this->psig; } template class psi_initializer_atomic_random, psi::DEVICE_CPU>; diff --git a/source/module_psi/psi_initializer_atomic_random.h b/source/module_psi/psi_initializer_atomic_random.h index 0f72c6c455..d884c28fd7 100644 --- a/source/module_psi/psi_initializer_atomic_random.h +++ b/source/module_psi/psi_initializer_atomic_random.h @@ -13,35 +13,30 @@ class psi_initializer_atomic_random : public psi_initializer_atomic private: using Real = typename GetTypeReal::type; public: - #ifdef __MPI - /// @brief parameterized constructor of psi initializer (with MPI support) - /// @param sf_in interface, link with Structure_Factor ESolver_FP::sf - /// @param pw_wfc_in interface, link with ModulePW::PW_Basis_K* ESolver_FP::pw_wfc - /// @param p_ucell_in interface, link with UnitCell GlobalC::ucell - /// @param p_parakpts_in interface, link with Parallel_Kpoints GlobalC::Pkpoints - /// @param random_seed_in random seed - psi_initializer_atomic_random(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, Parallel_Kpoints* p_parakpts_in, int random_seed_in = 1); + psi_initializer_atomic_random() {this->set_method("atomic+random"); this->set_random_mix(0.05);} + ~psi_initializer_atomic_random() {}; + + #ifdef __MPI // MPI additional implementation + /// @brief initialize the psi_initializer with external data and methods + virtual void initialize(Structure_Factor*, //< structure factor + ModulePW::PW_Basis_K*, //< planewave basis + UnitCell*, //< unit cell + Parallel_Kpoints*, //< parallel kpoints + const int& = 1, //< random seed + pseudopot_cell_vnl* = nullptr, //< nonlocal pseudopotential + const int& = 0) override; //< MPI rank #else - /// @brief parameterized constructor of psi initializer (without MPI support) - /// @param sf_in interface, link with Structure_Factor ESolver_FP::sf - /// @param pw_wfc_in interface, link with ModulePW::PW_Basis_K* ESolver_FP::pw_wfc - /// @param p_ucell_in interface, link with UnitCell GlobalC::ucell - /// @param random_seed_in random seed - psi_initializer_atomic_random(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, int random_seed_in = 1); + /// @brief serial version of initialize function, link psi_initializer with external data and methods + virtual void initialize(Structure_Factor*, //< structure factor + ModulePW::PW_Basis_K*, //< planewave basis + UnitCell*, //< unit cell + const int& = 1, //< random seed + pseudopot_cell_vnl* = nullptr) override;//< nonlocal pseudopotential #endif - - /// @brief default destructor - ~psi_initializer_atomic_random(); - /// @brief for variables can be only initialized for once. - /// @param p_pspot_nl_in (for atomic) interfaces to pseudopot_cell_vnl object, in GlobalC now - /// @attention if one variable is necessary for all methods, initialize it in constructor, not here. - void initialize_only_once(pseudopot_cell_vnl* p_pspot_nl_in = nullptr) override; - // methods - /// @brief calculate and output planewave wavefunction - /// @param ik kpoint index - /// @return initialized planewave wavefunction (psi::Psi>*) - psi::Psi* cal_psig(int ik) override; + virtual void proj_ao_onkG(int ik) override; + virtual void tabulate() override {psi_initializer_atomic::tabulate();}; + private: }; #endif \ No newline at end of file diff --git a/source/module_psi/psi_initializer_nao.cpp b/source/module_psi/psi_initializer_nao.cpp index c9a12e52f5..08ac3f0fe8 100644 --- a/source/module_psi/psi_initializer_nao.cpp +++ b/source/module_psi/psi_initializer_nao.cpp @@ -16,125 +16,77 @@ #include "module_base/parallel_reduce.h" #endif -template -#ifdef __MPI -psi_initializer_nao::psi_initializer_nao(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, Parallel_Kpoints* p_parakpts_in, int random_seed_in) - : psi_initializer(sf_in, pw_wfc_in, p_ucell_in, p_parakpts_in, random_seed_in) -#else -psi_initializer_nao::psi_initializer_nao(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, int random_seed_in) - : psi_initializer(sf_in, pw_wfc_in, p_ucell_in, random_seed_in) -#endif -{ - this->set_method("nao"); -} - -template -psi_initializer_nao::~psi_initializer_nao() {} - /* I don't know why some variables are distributed while others not... for example the orbital_files... We need not only read and import, but also distribute here */ -template -void psi_initializer_nao::set_orbital_files(std::string* orbital_files) + +// free function, not needed to be a member of psi_initializer_nao +void normalize(const std::vector& r, std::vector& flz) { - ModuleBase::timer::tick("psi_initializer_nao", "set_orbital_files"); - #ifdef __MPI - if(GlobalV::MY_RANK == 0) - { - #endif - for (int itype = 0; itype < this->p_ucell->ntype; itype++) - { - this->orbital_files.push_back(orbital_files[itype]); - } - #ifdef __MPI - } - else - { - this->orbital_files.resize(this->p_ucell->ntype); - } - Parallel_Common::bcast_string(this->orbital_files.data(), this->p_ucell->ntype); - #endif - ModuleBase::timer::tick("psi_initializer_nao", "set_orbital_files"); + std::vector flz2r2(r.size()); + std::transform(r.begin(), r.end(), flz.begin(), flz2r2.begin(), [](double r, double flz){return flz*flz*r*r;}); + double dr = r[1] - r[0]; + double norm = ModuleBase::Integral::simpson(r.size(), flz2r2.data(), dr); + norm = sqrt(norm); + std::transform(flz.begin(), flz.end(), flz.begin(), [norm](double flz){return flz/norm;}); } template -void psi_initializer_nao::create_ovlp_Xjlq() +void psi_initializer_nao::read_external_orbs(std::string* orbital_files, + const int& rank) { - // find correct dimension for ovlp_flzjlq - int dim1 = this->p_ucell->ntype; - int dim2 = 0; // dim2 should be the maximum number of zeta for each atomtype - for (int it = 0; it < this->p_ucell->ntype; it++) + ModuleBase::timer::tick("psi_initializer_nao", "read_external_orbs"); + if(rank == 0) { - int nzeta = 0; - for (int l = 0; l < this->p_ucell->atoms[it].nwl+1; l++) + for (int itype = 0; itype < this->p_ucell_->ntype; itype++) { - nzeta += this->p_ucell->atoms[it].l_nchi[l]; + this->orbital_files_.push_back(orbital_files[itype]); } - dim2 = (nzeta > dim2) ? nzeta : dim2; - } - if (dim2 == 0) - { - ModuleBase::WARNING_QUIT("psi_initializer_nao::psi_initializer_nao", "there is not ANY numerical atomic orbital read in present system, quit."); - } - int dim3 = GlobalV::NQX; - // allocate memory for ovlp_flzjlq - this->ovlp_flzjlq.create(dim1, dim2, dim3); - this->ovlp_flzjlq.zero_out(); -} - -template -void psi_initializer_nao::read_orbital_files() -{ - ModuleBase::timer::tick("psi_initializer_nao", "read_orbital_files"); - #ifdef __MPI - if(GlobalV::MY_RANK==0) - { - #endif - for(int it = 0; it < this->p_ucell->ntype; it++) + for(int it = 0; it < this->p_ucell_->ntype; it++) { // number of chi per atomtype int nchi = 0; - for(int l = 0; l <= this->p_ucell->atoms[it].nwl; l++) + for(int l = 0; l <= this->p_ucell_->atoms[it].nwl; l++) { - nchi += this->p_ucell->atoms[it].l_nchi[l]; + nchi += this->p_ucell_->atoms[it].l_nchi[l]; } std::vector n_rgrid_it; std::vector> rgrid_it; - std::vector> flz_it; + std::vector> rvalue_it; std::ifstream ifs_it; - ifs_it.open(GlobalV::global_orbital_dir+this->orbital_files[it]); + ifs_it.open(GlobalV::global_orbital_dir+this->orbital_files_[it]); if(!ifs_it) { - GlobalV::ofs_warning<<"psi_initializer_nao::read_orbital_files: cannot open orbital file: "<orbital_files[it]<::read_orbital_files: cannot open orbital file: "<orbital_files_[it]<::read_orbital_files", "cannot open orbital file."); } else { - GlobalV::ofs_running<<"psi_initializer_nao::read_orbital_files: reading orbital file: "<orbital_files[it]<::read_orbital_files: reading orbital file: "<orbital_files_[it]<p_ucell->atoms[it].nwl; l++) + for(int l = 0; l <= this->p_ucell_->atoms[it].nwl; l++) { - for(int ichi = 0; ichi < this->p_ucell->atoms[it].l_nchi[l]; ichi++) + for(int ichi = 0; ichi < this->p_ucell_->atoms[it].l_nchi[l]; ichi++) { int n_rgrid_ichi; std::vector rgrid_ichi; - std::vector flz_ichi; + std::vector rvalue_ichi; GlobalV::ofs_running<<"-------------------------------------- "<p_ucell->atoms[it].label<p_ucell_->atoms[it].label<::read_orbital_files: cannot find orbital of element "<p_ucell->atoms[it].label<::read_orbital_files: cannot find orbital of element "<p_ucell_->atoms[it].label<n_rgrid.resize(this->p_ucell->ntype); - } - int nchi[this->p_ucell->ntype]; - if(GlobalV::MY_RANK==0) + // bcast fname + if(rank != 0) this->orbital_files_.resize(this->p_ucell_->ntype); + Parallel_Common::bcast_string(this->orbital_files_.data(), this->p_ucell_->ntype); + // bcast orbital data + // resize + if(rank != 0) this->n_rgrid_.resize(this->p_ucell_->ntype); + int nchi[this->p_ucell_->ntype]; + if(rank == 0) { - for(int it = 0; it < this->p_ucell->ntype; it++) - { - nchi[it] = this->n_rgrid[it].size(); - } + for(int it = 0; it < this->p_ucell_->ntype; it++) nchi[it] = this->n_rgrid_[it].size(); } - Parallel_Common::bcast_int(nchi, this->p_ucell->ntype); - if(GlobalV::MY_RANK!=0) + // bcast + Parallel_Common::bcast_int(nchi, this->p_ucell_->ntype); + // resize + if(rank != 0) { - this->n_rgrid.resize(this->p_ucell->ntype); - this->rgrid.resize(this->p_ucell->ntype); - this->flz.resize(this->p_ucell->ntype); - for(int it = 0; it < this->p_ucell->ntype; it++) + this->n_rgrid_.resize(this->p_ucell_->ntype); + this->rgrid_.resize(this->p_ucell_->ntype); + this->rvalue_.resize(this->p_ucell_->ntype); + for(int it = 0; it < this->p_ucell_->ntype; it++) { - this->n_rgrid[it].resize(nchi[it]); - this->rgrid[it].resize(nchi[it]); - this->flz[it].resize(nchi[it]); + this->n_rgrid_[it].resize(nchi[it]); + this->rgrid_[it].resize(nchi[it]); + this->rvalue_[it].resize(nchi[it]); } } - for(int it = 0; it < this->p_ucell->ntype; it++) + // bcast + for(int it = 0; it < this->p_ucell_->ntype; it++) Parallel_Common::bcast_int(this->n_rgrid_[it].data(), nchi[it]); + // resize + if(rank != 0) { - Parallel_Common::bcast_int(this->n_rgrid[it].data(), nchi[it]); - } - if(GlobalV::MY_RANK!=0) - { - for(int it = 0; it < this->p_ucell->ntype; it++) + for(int it = 0; it < this->p_ucell_->ntype; it++) { for(int ichi = 0; ichi < nchi[it]; ichi++) { - this->rgrid[it][ichi].resize(this->n_rgrid[it][ichi]); - this->flz[it][ichi].resize(this->n_rgrid[it][ichi]); + this->rgrid_[it][ichi].resize(this->n_rgrid_[it][ichi]); + this->rvalue_[it][ichi].resize(this->n_rgrid_[it][ichi]); } } } - for(int it = 0; it < this->p_ucell->ntype; it++) + // bcast + for(int it = 0; it < this->p_ucell_->ntype; it++) { for(int ichi = 0; ichi < nchi[it]; ichi++) { - Parallel_Common::bcast_double(this->rgrid[it][ichi].data(), this->n_rgrid[it][ichi]); - Parallel_Common::bcast_double(this->flz[it][ichi].data(), this->n_rgrid[it][ichi]); + Parallel_Common::bcast_double(this->rgrid_[it][ichi].data(), this->n_rgrid_[it][ichi]); + Parallel_Common::bcast_double(this->rvalue_[it][ichi].data(), this->n_rgrid_[it][ichi]); } } #endif - ModuleBase::timer::tick("psi_initializer_nao", "read_orbital_files"); + ModuleBase::timer::tick("psi_initializer_nao", "read_external_orbs"); } template -void psi_initializer_nao::initialize_only_once(pseudopot_cell_vnl* p_pspot_nl_in) +void psi_initializer_nao::allocate_table() { - ModuleBase::timer::tick("psi_initializer_nao", "initialize_only_once"); - this->create_ovlp_Xjlq(); - this->read_orbital_files(); + // find correct dimension for ovlp_flzjlq + int dim1 = this->p_ucell_->ntype; + int dim2 = 0; // dim2 should be the maximum number of zeta for each atomtype + for (int it = 0; it < this->p_ucell_->ntype; it++) + { + int nzeta = 0; + for (int l = 0; l < this->p_ucell_->atoms[it].nwl+1; l++) + { + nzeta += this->p_ucell_->atoms[it].l_nchi[l]; + } + dim2 = (nzeta > dim2) ? nzeta : dim2; + } + if (dim2 == 0) + { + ModuleBase::WARNING_QUIT("psi_initializer_nao::psi_initializer_nao", "there is not ANY numerical atomic orbital read in present system, quit."); + } + int dim3 = GlobalV::NQX; + // allocate memory for ovlp_flzjlq + this->ovlp_flzjlq_.create(dim1, dim2, dim3); + this->ovlp_flzjlq_.zero_out(); +} + + +#ifdef __MPI +template +void psi_initializer_nao::initialize(Structure_Factor* sf, + ModulePW::PW_Basis_K* pw_wfc, + UnitCell* p_ucell, + Parallel_Kpoints* p_parakpts, + const int& random_seed, + pseudopot_cell_vnl* p_pspot_nl, + const int& rank) +{ + ModuleBase::timer::tick("psi_initializer_nao", "initialize_mpi"); + // import + this->sf_ = sf; + this->pw_wfc_ = pw_wfc; + this->p_ucell_ = p_ucell; + this->p_parakpts_ = p_parakpts; + this->p_pspot_nl_ = p_pspot_nl; + this->random_seed_ = random_seed; + // allocate + this->allocate_table(); + this->read_external_orbs(this->p_ucell_->orbital_fn, rank); //this->cal_ovlp_flzjlq(); //because GlobalV::NQX will change during vcrelax, so it should be called in both init and init_after_vc - ModuleBase::timer::tick("psi_initializer_nao", "initialize_only_once"); + ModuleBase::timer::tick("psi_initializer_nao", "initialize_mpi"); } +#else +template +void psi_initializer_nao::initialize(Structure_Factor* sf, + ModulePW::PW_Basis_K* pw_wfc, + UnitCell* p_ucell, + const int& random_seed, + pseudopot_cell_vnl* p_pspot_nl) +{ + ModuleBase::timer::tick("psi_initializer_nao", "initialize_serial"); + // import + this->sf_ = sf; + this->pw_wfc_ = pw_wfc; + this->p_ucell_ = p_ucell; + this->p_pspot_nl_ = p_pspot_nl; + this->random_seed_ = random_seed; + // allocate + this->allocate_table(); + this->read_external_orbs(this->p_ucell_->orbital_fn, 0); + //this->cal_ovlp_flzjlq(); //because GlobalV::NQX will change during vcrelax, so it should be called in both init and init_after_vc + ModuleBase::timer::tick("psi_initializer_nao", "initialize_serial"); +} +#endif template -void psi_initializer_nao::cal_ovlp_flzjlq() +void psi_initializer_nao::tabulate() { - ModuleBase::timer::tick("psi_initializer_nao", "cal_ovlp_flzjlq"); - //this->read_orbital_files(); - this->ovlp_flzjlq.zero_out(); - for(int it=0; itp_ucell->ntype; it++) + ModuleBase::timer::tick("psi_initializer_nao", "tabulate"); + this->ovlp_flzjlq_.zero_out(); + for(int it=0; itp_ucell_->ntype; it++) { int ic=0; - for(int l=0; lp_ucell->atoms[it].nwl+1; l++) + for(int l=0; lp_ucell_->atoms[it].nwl+1; l++) { - for(int izeta=0; izetap_ucell->atoms[it].l_nchi[l]; izeta++) + for(int izeta=0; izetap_ucell_->atoms[it].l_nchi[l]; izeta++) { - double* ovlp_flzjlq_q = new double[GlobalV::NQX]; - double* qgrid = new double[GlobalV::NQX]; + std::vector ovlp_flzjlq_q(GlobalV::NQX); + std::vector qgrid(GlobalV::NQX); for (int iq = 0; iq < GlobalV::NQX; iq++) { qgrid[iq] = iq*GlobalV::DQ; } this->sbt.direct(l, - this->n_rgrid[it][ic], - this->rgrid[it][ic].data(), - this->flz[it][ic].data(), - GlobalV::NQX, qgrid, ovlp_flzjlq_q); + this->n_rgrid_[it][ic], + this->rgrid_[it][ic].data(), + this->rvalue_[it][ic].data(), + GlobalV::NQX, + qgrid.data(), + ovlp_flzjlq_q.data()); for(int iq = 0; iq < GlobalV::NQX; iq++) { - this->ovlp_flzjlq(it, ic, iq) = ovlp_flzjlq_q[iq]; + this->ovlp_flzjlq_(it, ic, iq) = ovlp_flzjlq_q[iq]; } - delete[] ovlp_flzjlq_q; - delete[] qgrid; /* eliminate direct memory leak, kirk0830, 2023/10/20 */ ++ic; } } } - - if(GlobalV::MY_RANK==0) - { - for(int it = 0; it < this->p_ucell->ntype; it++) - { - std::stringstream ss; - ss<p_ucell->atoms[it].label<< "/LOCAL_G.dat"; - std::ofstream ofs(ss.str().c_str()); - for(int iq = 0; iq < GlobalV::NQX; iq++) - { - int ic=0; - double energy_q = pow((double)iq*GlobalV::DQ, 2); - ofs<p_ucell->tpiba2; - for(int l = 0; lp_ucell->atoms[it].nwl + 1; l++) - { - for(int N=0; Np_ucell->atoms[it].l_nchi[l]; N++) - { - ofs<<" "< -psi::Psi* psi_initializer_nao::cal_psig(int ik) +void psi_initializer_nao::proj_ao_onkG(int ik) { ModuleBase::timer::tick("psi_initializer_nao", "initialize"); assert(ik>=0); - this->psig->fix_k(ik); - const int npw = this->pw_wfc->npwk[ik]; - const int total_lm = ( this->p_ucell->lmax + 1) * ( this->p_ucell->lmax + 1); + this->psig_->fix_k(ik); + const int npw = this->pw_wfc_->npwk[ik]; + const int total_lm = ( this->p_ucell_->lmax + 1) * ( this->p_ucell_->lmax + 1); ModuleBase::matrix ylm(total_lm, npw); - std::complex *aux = new std::complex[npw]; - ModuleBase::Vector3 *gk = new ModuleBase::Vector3[npw]; + std::vector> aux(npw); + std::vector> gk(npw); for(int ig=0;igpw_wfc->getgpluskcar(ik, ig); + gk[ig] = this->pw_wfc_->getgpluskcar(ik, ig); } - ModuleBase::YlmReal::Ylm_Real(total_lm, npw, gk, ylm); + ModuleBase::YlmReal::Ylm_Real(total_lm, npw, gk.data(), ylm); //int index = 0; - double *ovlp_flzjlg = new double[npw]; + std::vector ovlp_flzjlg(npw); int ibasis=0; - for (int it = 0; it < this->p_ucell->ntype; it++) + for (int it = 0; it < this->p_ucell_->ntype; it++) { /* HERE LOOP OVER ALL TYPES */ - for (int ia = 0; ia < this->p_ucell->atoms[it].na; ia++) + for (int ia = 0; ia < this->p_ucell_->atoms[it].na; ia++) { /* HERE LOOP OVER ALL ATOMS */ - std::complex* sk = this->sf->get_sk(ik, it, ia, this->pw_wfc); + std::complex* sk = this->sf_->get_sk(ik, it, ia, this->pw_wfc_); int ic = 0; // ic is a flatten index of chi, therefore it is defined here. - for(int L = 0; L < this->p_ucell->atoms[it].nwl+1; L++) + for(int L = 0; L < this->p_ucell_->atoms[it].nwl+1; L++) { std::complex lphase = pow(ModuleBase::NEG_IMAG_UNIT, L); //mohan 2010-04-19 - for(int N=0; N < this->p_ucell->atoms[it].l_nchi[L]; N++) + for(int N=0; N < this->p_ucell_->atoms[it].l_nchi[L]; N++) { /* HERE LOOP OVER ALL NAOS */ /* @@ -377,10 +367,10 @@ psi::Psi* psi_initializer_nao::cal_psig(int ik) for(int ig=0; igovlp_flzjlq, // the spherical bessel transform of numerical orbital function + this->ovlp_flzjlq_, // the spherical bessel transform of numerical orbital function it, ic, // each (it, ic)-pair defines a unique numerical orbital function GlobalV::NQX, GlobalV::DQ, // grid number and grid spacing of q - gk[ig].norm() * this->p_ucell->tpiba // norm of (G+k) = K + gk[ig].norm() * this->p_ucell_->tpiba // norm of (G+k) = K ); } /* FOR EVERY NAO IN EACH ATOM */ @@ -403,8 +393,8 @@ psi::Psi* psi_initializer_nao::cal_psig(int ik) { continue; } - alpha = this->p_ucell->atoms[it].angle1[ia]; - gamma = -1 * this->p_ucell->atoms[it].angle2[ia] + 0.5 * ModuleBase::PI; + alpha = this->p_ucell_->atoms[it].angle1[ia]; + gamma = -1 * this->p_ucell_->atoms[it].angle2[ia] + 0.5 * ModuleBase::PI; for(int m = 0;m<2*L+1;m++) { const int lm = L*L + m; @@ -412,64 +402,31 @@ psi::Psi* psi_initializer_nao::cal_psig(int ik) { aux[ig] = sk[ig] * ylm(lm,ig) * ovlp_flzjlg[ig]; } - std::vector normalization_factors = {0, 0, 0, 0}; for(int ig = 0;igpsig))(ibasis, ig) = + (*(this->psig_))(ibasis, ig) = this->template cast_to_T( (cos(0.5 * gamma) + ModuleBase::IMAG_UNIT * sin(0.5 * gamma)) * fup ); - normalization_factors[0] += this->norm2((*(this->psig))(ibasis, ig)); - (*(this->psig))(ibasis, ig + this->pw_wfc->npwk_max) = + (*(this->psig_))(ibasis, ig + this->pw_wfc_->npwk_max) = this->template cast_to_T( (cos(0.5 * gamma) - ModuleBase::IMAG_UNIT * sin(0.5 * gamma)) * fdown ); - normalization_factors[1] += this->norm2((*(this->psig))(ibasis, ig + this->pw_wfc->npwk_max)); // second rotation with angle gamma around(OZ) fup = cos(0.5 * (alpha + ModuleBase::PI)) * aux[ig]; fdown = ModuleBase::IMAG_UNIT * sin(0.5 * (alpha + ModuleBase::PI))*aux[ig]; - (*(this->psig))(ibasis+2*L+1,ig) = + (*(this->psig_))(ibasis+2*L+1,ig) = this->template cast_to_T( (cos(0.5 * gamma) + ModuleBase::IMAG_UNIT * sin(0.5 * gamma)) * fup ); - normalization_factors[2] += this->norm2((*(this->psig))(ibasis+2*L+1, ig)); - (*(this->psig))(ibasis+2*L+1, ig + this->pw_wfc->npwk_max) = + (*(this->psig_))(ibasis+2*L+1, ig + this->pw_wfc_->npwk_max) = this->template cast_to_T( (cos(0.5 * gamma) - ModuleBase::IMAG_UNIT * sin(0.5 * gamma)) * fdown ); - normalization_factors[3] += this->norm2((*(this->psig))(ibasis+2*L+1, ig + this->pw_wfc->npwk_max)); - } - for(int i = 0; i < 4; i++) - { - #ifdef __MPI - // if MPI, gather the norm2 over all processes - Parallel_Reduce::reduce_all(normalization_factors[i]); - #endif - normalization_factors[i] = sqrt(normalization_factors[i]); - } - for(int ig = 0; ig < npw; ig++) - { - // normalize except the 0/0 case, this indeed happens sometimes when nspin=4, cause diagonalization failure - if(normalization_factors[0] != 0.0) - { - (*(this->psig))(ibasis, ig) /= normalization_factors[0]; - } - if(normalization_factors[1] != 0.0) - { - (*(this->psig))(ibasis, ig + this->pw_wfc->npwk_max) /= normalization_factors[1]; - } - if(normalization_factors[2] != 0.0) - { - (*(this->psig))(ibasis+2*L+1, ig) /= normalization_factors[2]; - } - if(normalization_factors[3] != 0.0) - { - (*(this->psig))(ibasis+2*L+1, ig + this->pw_wfc->npwk_max) /= normalization_factors[3]; - } } ibasis++; } @@ -482,23 +439,9 @@ psi::Psi* psi_initializer_nao::cal_psig(int ik) for(int m = 0; m < 2*L+1; m++) { const int lm = L*L+m; - Real normalization_factor = 0.0; - for(int ig=0; igpsig))(ibasis, ig) = - this->template cast_to_T( - lphase * sk[ig] * ylm(lm, ig) * ovlp_flzjlg[ig] - ); - normalization_factor += this->norm2((*(this->psig))(ibasis, ig)); - } - #ifdef __MPI - // if MPI, gather the norm2 over all processes - Parallel_Reduce::reduce_all(normalization_factor); - #endif - normalization_factor = sqrt(normalization_factor); for(int ig=0; igpsig))(ibasis, ig) /= normalization_factor; + (*(this->psig_))(ibasis, ig) = this->template cast_to_T(lphase * sk[ig] * ylm(lm, ig) * ovlp_flzjlg[ig]); } ++ibasis; } @@ -509,17 +452,12 @@ psi::Psi* psi_initializer_nao::cal_psig(int ik) delete[] sk; } // end for ia } // end for it - delete[] ovlp_flzjlg; - delete[] aux; - delete[] gk; /* complement the rest of bands if there are */ - if(this->get_nbands_complem() > 0) + if(this->nbands_complem() > 0) { - this->random_t(this->psig->get_pointer(), ibasis, this->psig->get_nbands(), ik); + this->random_t(this->psig_->get_pointer(), ibasis, this->psig_->get_nbands(), ik); } ModuleBase::timer::tick("psi_initializer_nao", "initialize"); - - return this->psig; } template class psi_initializer_nao, psi::DEVICE_CPU>; diff --git a/source/module_psi/psi_initializer_nao.h b/source/module_psi/psi_initializer_nao.h index 5d52283a8e..c0a26c2bbf 100644 --- a/source/module_psi/psi_initializer_nao.h +++ b/source/module_psi/psi_initializer_nao.h @@ -12,68 +12,54 @@ class psi_initializer_nao : public psi_initializer private: using Real = typename GetTypeReal::type; public: - #ifdef __MPI - /// @brief parameterized constructor of psi initializer (with MPI support) - /// @param sf_in interface, link with Structure_Factor ESolver_FP::sf - /// @param pw_wfc_in interface, link with ModulePW::PW_Basis_K* ESolver_FP::pw_wfc - /// @param p_ucell_in interface, link with UnitCell GlobalC::ucell - /// @param p_parakpts_in interface, link with Parallel_Kpoints GlobalC::Pkpoints - /// @param random_seed_in random seed - psi_initializer_nao(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, Parallel_Kpoints* p_parakpts_in, int random_seed_in = 1); - #else - /// @brief parameterized constructor of psi initializer (without MPI support) - /// @param sf_in interface, link with Structure_Factor ESolver_FP::sf - /// @param pw_wfc_in interface, link with ModulePW::PW_Basis_K* ESolver_FP::pw_wfc - /// @param p_ucell_in interface, link with UnitCell GlobalC::ucell - /// @param random_seed_in random seed - psi_initializer_nao(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, int random_seed_in = 1); - #endif - /// @brief default destructor - ~psi_initializer_nao(); - - // methods + psi_initializer_nao() {this->set_method("nao");}; + ~psi_initializer_nao() {}; - /// @brief calculate and output planewave wavefunction - /// @param ik kpoint index - /// @return initialized planewave wavefunction (psi::Psi>*) - psi::Psi* cal_psig(int ik) override; + virtual void proj_ao_onkG(int ik) override; - /// @brief initialize only once, for nao, it should be, read numerical orbitals, create ovlp_Xjlq(, calculate ovlp_flzjlq) - /// @param p_pspot_nl_in (for atomic) interfaces to pseudopot_cell_vnl object, in GlobalC now - /// @attention if one variable is necessary for all methods, initialize it in constructor, not here. - void initialize_only_once(pseudopot_cell_vnl* p_pspot_nl_in = nullptr) override; - // setters + #ifdef __MPI // MPI additional implementation + /// @brief initialize the psi_initializer with external data and methods + virtual void initialize(Structure_Factor*, //< structure factor + ModulePW::PW_Basis_K*, //< planewave basis + UnitCell*, //< unit cell + Parallel_Kpoints*, //< parallel kpoints + const int& = 1, //< random seed + pseudopot_cell_vnl* = nullptr, //< nonlocal pseudopotential + const int& = 0) override; //< MPI rank + #else + /// @brief serial version of initialize function, link psi_initializer with external data and methods + virtual void initialize(Structure_Factor*, //< structure factor + ModulePW::PW_Basis_K*, //< planewave basis + UnitCell*, //< unit cell + const int& = 1, //< random seed + pseudopot_cell_vnl* = nullptr) override;//< nonlocal pseudopotential + #endif - /// @brief setter of numerical orbital files - /// @param orbital_files array storing numerical orbital files - void set_orbital_files(std::string* orbital_files) override; - // I wont write a function to set ovlp_flzjlq, it is totally useless - - /// @brief allocate memory for ovlp_flzjlq and initialize all elements to 0 - /// @attention warning! p_ucell must be set in advance! - void create_ovlp_Xjlq() override; - /// @brief before refactor and reorganization of UnitCell class, it is temporary to write this function here. - /// In future version, it will be moved into UnitCell class. - void read_orbital_files(); - /// @brief calculate overlap integral between f_{l\\zeta} the radial numerical orbital and spherical Bessel function - void cal_ovlp_flzjlq() override; + void read_external_orbs(std::string* orbital_files, const int& rank); + virtual void allocate_table() override; + virtual void tabulate() override; - // getters + std::vector external_orbs() const { return orbital_files_; } + std::vector> n_rgrid() const { return n_rgrid_; } + std::vector n_rgrid(const int& itype) const { return n_rgrid_[itype]; } + int n_rgrid(const int& itype, const int& ichi) const { return n_rgrid_[itype][ichi]; } + std::vector>> rvalue() const { return rvalue_; } + std::vector> rvalue(const int& itype) const { return rvalue_[itype]; } + std::vector rvalue(const int& itype, const int& ichi) const { return rvalue_[itype][ichi]; } + double rvalue(const int& itype, const int& ichi, const int& ir) const { return rvalue_[itype][ichi][ir]; } + std::vector>> rgrid() const { return rgrid_; } + std::vector> rgrid(const int& itype) const { return rgrid_[itype]; } + std::vector rgrid(const int& itype, const int& ichi) const { return rgrid_[itype][ichi]; } + double rgrid(const int& itype, const int& ichi, const int& ir) const { return rgrid_[itype][ichi][ir]; } - /// @brief getter of orbital filenames - /// @return orbital filenames in array - std::vector get_orbital_files() const { return orbital_files; } - /// @brief getter of matrix of overlap between numerical orbital and Spherical Bessel function - /// @return ovlp_flzjlq - ModuleBase::realArray get_ovlp_flzjlq() const { return ovlp_flzjlq; } private: - std::vector orbital_files; - ModuleBase::realArray ovlp_flzjlq; + std::vector orbital_files_; + ModuleBase::realArray ovlp_flzjlq_; /// @brief number of realspace grids per type per chi, [itype][ichi] - std::vector> n_rgrid; + std::vector> n_rgrid_; /// @brief data of numerical atomic orbital per type per chi per position, [itype][ichi][ir] - std::vector>> flz; + std::vector>> rvalue_; /// @brief r of numerical atomic orbital per type per chi per position, [itype][ichi][ir] - std::vector>> rgrid; + std::vector>> rgrid_; }; #endif \ No newline at end of file diff --git a/source/module_psi/psi_initializer_nao_random.cpp b/source/module_psi/psi_initializer_nao_random.cpp index a1b777f05b..be58bdfc47 100644 --- a/source/module_psi/psi_initializer_nao_random.cpp +++ b/source/module_psi/psi_initializer_nao_random.cpp @@ -1,44 +1,51 @@ #include "psi_initializer_nao_random.h" -template #ifdef __MPI -psi_initializer_nao_random::psi_initializer_nao_random(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, Parallel_Kpoints* p_parakpts_in, int random_seed_in) - : psi_initializer_nao(sf_in, pw_wfc_in, p_ucell_in, p_parakpts_in, random_seed_in) -#else -psi_initializer_nao_random::psi_initializer_nao_random(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, int random_seed_in) - : psi_initializer_nao(sf_in, pw_wfc_in, p_ucell_in, random_seed_in) -#endif +template +void psi_initializer_nao_random::initialize(Structure_Factor* sf, + ModulePW::PW_Basis_K* pw_wfc, + UnitCell* p_ucell, + Parallel_Kpoints* p_parakpts, + const int& random_seed, + pseudopot_cell_vnl* p_pspot_nl, + const int& rank) { - this->set_random_mix(0.05); - this->set_method("nao+random"); + psi_initializer_nao::initialize(sf, pw_wfc, p_ucell, p_parakpts, random_seed, p_pspot_nl, rank); + this->ixy2is_.clear(); + this->ixy2is_.resize(this->pw_wfc_->fftnxy); + this->pw_wfc_->getfftixy2is(this->ixy2is_.data()); } - -template -psi_initializer_nao_random::~psi_initializer_nao_random() {} - +#else template -void psi_initializer_nao_random::initialize_only_once(pseudopot_cell_vnl* p_pspot_nl_in) +void psi_initializer_nao_random::initialize(Structure_Factor* sf, + ModulePW::PW_Basis_K* pw_wfc, + UnitCell* p_ucell, + const int& random_seed, + pseudopot_cell_vnl* p_pspot_nl) { - psi_initializer_nao::initialize_only_once(); + psi_initializer_nao::initialize(sf, pw_wfc, p_ucell, random_seed, p_pspot_nl); + this->ixy2is_.clear(); + this->ixy2is_.resize(this->pw_wfc_->fftnxy); + this->pw_wfc_->getfftixy2is(this->ixy2is_.data()); } +#endif template -psi::Psi* psi_initializer_nao_random::cal_psig(int ik) +void psi_initializer_nao_random::proj_ao_onkG(int ik) { - double rm = this->get_random_mix(); - this->psig->fix_k(ik); - this->psig = psi_initializer_nao::cal_psig(ik); - psi::Psi psi_random(1, this->psig->get_nbands(), this->psig->get_nbasis(), nullptr); + double rm = this->random_mix(); + this->psig_->fix_k(ik); + psi_initializer_nao::proj_ao_onkG(ik); + psi::Psi psi_random(1, this->psig_->get_nbands(), this->psig_->get_nbasis(), nullptr); psi_random.fix_k(0); this->random_t(psi_random.get_pointer(), 0, psi_random.get_nbands(), ik); - for(int iband = 0; iband < this->psig->get_nbands(); iband++) + for(int iband = 0; iband < this->psig_->get_nbands(); iband++) { - for(int ibasis = 0; ibasis < this->psig->get_nbasis(); ibasis++) + for(int ibasis = 0; ibasis < this->psig_->get_nbasis(); ibasis++) { - (*(this->psig))(iband, ibasis) = ((Real)(1-rm))*(*(this->psig))(iband, ibasis) + ((Real)rm)*psi_random(iband, ibasis); + (*(this->psig_))(iband, ibasis) = ((Real)(1-rm))*(*(this->psig_))(iband, ibasis) + ((Real)rm)*psi_random(iband, ibasis); } } - return this->psig; } template class psi_initializer_nao_random, psi::DEVICE_CPU>; diff --git a/source/module_psi/psi_initializer_nao_random.h b/source/module_psi/psi_initializer_nao_random.h index 595751ce3d..736d49c5d2 100644 --- a/source/module_psi/psi_initializer_nao_random.h +++ b/source/module_psi/psi_initializer_nao_random.h @@ -13,30 +13,28 @@ class psi_initializer_nao_random : public psi_initializer_nao private: using Real = typename GetTypeReal::type; public: - #ifdef __MPI - /// @brief parameterized constructor of psi initializer (with MPI support) - /// @param sf_in interface, link with Structure_Factor ESolver_FP::sf - /// @param pw_wfc_in interface, link with ModulePW::PW_Basis_K* ESolver_FP::pw_wfc - /// @param p_ucell_in interface, link with UnitCell GlobalC::ucell - /// @param p_parakpts_in interface, link with Parallel_Kpoints GlobalC::Pkpoints - /// @param random_seed_in random seed - psi_initializer_nao_random(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, Parallel_Kpoints* p_parakpts_in, int random_seed_in = 1); + psi_initializer_nao_random() {this->set_method("nao+random"); this->set_random_mix(0.05);}; + ~psi_initializer_nao_random() {}; + + #ifdef __MPI // MPI additional implementation + /// @brief initialize the psi_initializer with external data and methods + virtual void initialize(Structure_Factor*, //< structure factor + ModulePW::PW_Basis_K*, //< planewave basis + UnitCell*, //< unit cell + Parallel_Kpoints*, //< parallel kpoints + const int& = 1, //< random seed + pseudopot_cell_vnl* = nullptr, //< nonlocal pseudopotential + const int& = 0) override; //< MPI rank #else - /// @brief parameterized constructor of psi initializer (without MPI support) - /// @param sf_in interface, link with Structure_Factor ESolver_FP::sf - /// @param pw_wfc_in interface, link with ModulePW::PW_Basis_K* ESolver_FP::pw_wfc - /// @param p_ucell_in interface, link with UnitCell GlobalC::ucell - /// @param random_seed_in random seed - psi_initializer_nao_random(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, int random_seed_in = 1); + /// @brief serial version of initialize function, link psi_initializer with external data and methods + virtual void initialize(Structure_Factor*, //< structure factor + ModulePW::PW_Basis_K*, //< planewave basis + UnitCell*, //< unit cell + const int& = 1, //< random seed + pseudopot_cell_vnl* = nullptr) override;//< nonlocal pseudopotential #endif - /// @brief default destructor - ~psi_initializer_nao_random(); - void initialize_only_once(pseudopot_cell_vnl* p_pspot_nl_in = nullptr) override; - /// @brief calculate and output planewave wavefunction - /// @param ik kpoint index - /// @return initialized planewave wavefunction (psi::Psi>*) - psi::Psi* cal_psig(int ik) override; - private: + virtual void proj_ao_onkG(int ik) override; + virtual void tabulate() override {psi_initializer_nao::tabulate();}; }; #endif \ No newline at end of file diff --git a/source/module_psi/psi_initializer_random.cpp b/source/module_psi/psi_initializer_random.cpp index a74231fa70..7dad401a5a 100644 --- a/source/module_psi/psi_initializer_random.cpp +++ b/source/module_psi/psi_initializer_random.cpp @@ -7,20 +7,42 @@ // basic functions support #include "module_base/timer.h" -template #ifdef __MPI -psi_initializer_random::psi_initializer_random(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, Parallel_Kpoints* p_parakpts_in, int random_seed_in) - : psi_initializer(sf_in, pw_wfc_in, p_ucell_in, p_parakpts_in, random_seed_in) -#else -psi_initializer_random::psi_initializer_random(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, int random_seed_in) - : psi_initializer(sf_in, pw_wfc_in, p_ucell_in, random_seed_in) -#endif +template +void psi_initializer_random::initialize(Structure_Factor* sf, + ModulePW::PW_Basis_K* pw_wfc, + UnitCell* p_ucell, + Parallel_Kpoints* p_parakpts, + const int& random_seed, + pseudopot_cell_vnl* p_pspot_nl, + const int& rank) { - this->set_method("random"); + this->pw_wfc_ = pw_wfc; + this->p_ucell_ = p_ucell; + this->p_parakpts_ = p_parakpts; + this->random_seed_ = random_seed; + this->p_pspot_nl_ = p_pspot_nl; + this->ixy2is_.clear(); + this->ixy2is_.resize(this->pw_wfc_->fftnxy); + this->pw_wfc_->getfftixy2is(this->ixy2is_.data()); } - +#else template -psi_initializer_random::~psi_initializer_random() {} +void psi_initializer_random::initialize(Structure_Factor* sf, + ModulePW::PW_Basis_K* pw_wfc, + UnitCell* p_ucell, + const int& random_seed, + pseudopot_cell_vnl* p_pspot_nl) +{ + this->pw_wfc_ = pw_wfc; + this->p_ucell_ = p_ucell; + this->random_seed_ = random_seed; + this->p_pspot_nl_ = p_pspot_nl; + this->ixy2is_.clear(); + this->ixy2is_.resize(this->pw_wfc_->fftnxy); + this->pw_wfc_->getfftixy2is(this->ixy2is_.data()); +} +#endif template void psi_initializer_random::random(T* psi, @@ -34,16 +56,12 @@ void psi_initializer_random::random(T* psi, } template -psi::Psi* psi_initializer_random::cal_psig(int ik) +void psi_initializer_random::proj_ao_onkG(int ik) { ModuleBase::timer::tick("psi_initializer_random", "initialize"); - //this->print_status(psi); - this->psig->fix_k(ik); - this->random(this->psig->get_pointer(), 0, this->psig->get_nbands(), ik); - // we still need to diagonalize the obtained psi from hsolver::DiagoIterAssist::diagH_subspace - // will do it in HSolver function... + this->psig_->fix_k(ik); + this->random(this->psig_->get_pointer(), 0, this->psig_->get_nbands(), ik); ModuleBase::timer::tick("psi_initializer_random", "initialize"); - return this->psig; } template class psi_initializer_random, psi::DEVICE_CPU>; diff --git a/source/module_psi/psi_initializer_random.h b/source/module_psi/psi_initializer_random.h index dbbab2dd0a..0c1f53edbd 100644 --- a/source/module_psi/psi_initializer_random.h +++ b/source/module_psi/psi_initializer_random.h @@ -13,43 +13,34 @@ class psi_initializer_random : public psi_initializer private: using Real = typename GetTypeReal::type; public: - #ifdef __MPI - /// @brief parameterized constructor of psi initializer (with MPI support) - /// @param sf_in interface, link with Structure_Factor ESolver_FP::sf - /// @param pw_wfc_in interface, link with ModulePW::PW_Basis_K* ESolver_FP::pw_wfc - /// @param p_ucell_in interface, link with UnitCell GlobalC::ucell - /// @param p_parakpts_in interface, link with Parallel_Kpoints GlobalC::Pkpoints - /// @param random_seed_in random seed - psi_initializer_random(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, Parallel_Kpoints* p_parakpts_in, int random_seed_in = 1); - #else - /// @brief parameterized constructor of psi initializer (without MPI support) - /// @param sf_in interface, link with Structure_Factor ESolver_FP::sf - /// @param pw_wfc_in interface, link with ModulePW::PW_Basis_K* ESolver_FP::pw_wfc - /// @param p_ucell_in interface, link with UnitCell GlobalC::ucell - /// @param random_seed_in random seed - psi_initializer_random(Structure_Factor* sf_in, ModulePW::PW_Basis_K* pw_wfc_in, UnitCell* p_ucell_in, int random_seed_in = 1); - #endif - /// @brief default destructor - ~psi_initializer_random(); - - // methods - - /// @brief kernel function, generating psi value in certain band range - /// @param psi psi data carrier - /// @param iw_start the starting band index to fill random value - /// @param iw_end the end band index - /// @param ik kpoint index - void random(T* psi, - const int iw_start, - const int iw_end, - const int ik) override; + psi_initializer_random() {this->set_method("random");}; + ~psi_initializer_random() {}; + /// @brief write random number to psi in certain range specified by ik, iw_start, iw_end + void random(T* psi, //< psi + const int iw_start, //< iw_start, starting band index of present kpoint + const int iw_end, //< iw_end, ending band index of present kpoint + const int ik) override; //< ik, kpoint index /// @brief calculate and output planewave wavefunction /// @param ik kpoint index /// @return initialized planewave wavefunction (psi::Psi>*) - psi::Psi* cal_psig(int ik) override; - /// @brief for variables can be only initialized for once. - /// @param p_pspot_nl_in (for atomic) interfaces to pseudopot_cell_vnl object, in GlobalC now - /// @attention if one variable is necessary for all methods, initialize it in constructor, not here. - void initialize_only_once(pseudopot_cell_vnl* p_pspot_nl_in = nullptr) override {}; + virtual void proj_ao_onkG(int ik) override; + #ifdef __MPI // MPI additional implementation + /// @brief initialize the psi_initializer with external data and methods + virtual void initialize(Structure_Factor*, //< structure factor + ModulePW::PW_Basis_K*, //< planewave basis + UnitCell*, //< unit cell + Parallel_Kpoints*, //< parallel kpoints + const int& = 1, //< random seed + pseudopot_cell_vnl* = nullptr, //< nonlocal pseudopotential + const int& = 0) override; //< MPI rank + #else + /// @brief serial version of initialize function, link psi_initializer with external data and methods + virtual void initialize(Structure_Factor*, //< structure factor + ModulePW::PW_Basis_K*, //< planewave basis + UnitCell*, //< unit cell + const int& = 1, //< random seed + pseudopot_cell_vnl* = nullptr) override ; //< nonlocal pseudopotential + #endif + virtual void tabulate() override {}; }; #endif \ No newline at end of file diff --git a/source/module_psi/test/psi_initializer_unit_test.cpp b/source/module_psi/test/psi_initializer_unit_test.cpp index 89e845a06d..28cb14faac 100644 --- a/source/module_psi/test/psi_initializer_unit_test.cpp +++ b/source/module_psi/test/psi_initializer_unit_test.cpp @@ -33,17 +33,17 @@ psi initializer unit test - allocate wavefunctions with nao-specific method - psi_initializer_nao_random::allocate - allocate wavefunctions with nao-specific method - - psi_initializer_random::cal_psig + - psi_initializer_random::proj_ao_onkG - calculate wavefunction initial guess (before diagonalization) by randomly generating numbers - - psi_initializer_atomic::cal_psig + - psi_initializer_atomic::proj_ao_onkG - calculate wavefunction initial guess (before diagonalization) with atomic pseudo wavefunctions - nspin = 4 case - nspin = 4 with has_so case - - psi_initializer_atomic_random::cal_psig + - psi_initializer_atomic_random::proj_ao_onkG - calculate wavefunction initial guess (before diagonalization) with atomic pseudo wavefunctions and random numbers - - psi_initializer_nao::cal_psig + - psi_initializer_nao::proj_ao_onkG - calculate wavefunction initial guess (before diagonalization) with numerical atomic orbital wavefunctions - - psi_initializer_nao_random::cal_psig + - psi_initializer_nao_random::proj_ao_onkG - calculate wavefunction initial guess (before diagonalization) with numerical atomic orbital wavefunctions and random numbers */ @@ -203,6 +203,7 @@ class PsiIntializerUnitTest : public ::testing::Test { this->p_pw_wfc->fftnxy = 1; this->p_pw_wfc->fftnz = 1; this->p_pw_wfc->nst = 1; + this->p_pw_wfc->nz = 1; if(this->p_pw_wfc->is2fftixy != nullptr) delete[] this->p_pw_wfc->is2fftixy; this->p_pw_wfc->is2fftixy = new int[1]; this->p_pw_wfc->is2fftixy[0] = 0; @@ -237,6 +238,8 @@ class PsiIntializerUnitTest : public ::testing::Test { this->p_pw_wfc->kvec_d = new ModuleBase::Vector3[1]; this->p_pw_wfc->kvec_d[0] = {0.0, 0.0, 0.0}; + this->p_pspot_vnl->lmaxkb = 0; + #ifdef __MPI if(this->p_parakpts->startk_pool != nullptr) delete[] this->p_parakpts->startk_pool; this->p_parakpts->startk_pool = new int[1]; @@ -257,91 +260,32 @@ class PsiIntializerUnitTest : public ::testing::Test { }; TEST_F(PsiIntializerUnitTest, ConstructorRandom) { - #ifdef __MPI - this->psi_init = new psi_initializer_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); - #else - this->psi_init = new psi_initializer_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); - #endif - EXPECT_EQ("random", this->psi_init->get_method()); - EXPECT_EQ(this->p_sf, this->psi_init->get_interface_sf()); - EXPECT_EQ(this->p_pw_wfc, this->psi_init->get_interface_pw_wfc()); - EXPECT_EQ(this->p_ucell, this->psi_init->get_interface_ucell()); - EXPECT_EQ(this->random_seed, this->psi_init->get_random_seed()); - #ifdef __MPI - EXPECT_EQ(this->p_parakpts, this->psi_init->get_interface_parakpts()); - #endif + this->psi_init = new psi_initializer_random, psi::DEVICE_CPU>(); + EXPECT_EQ("random", this->psi_init->method()); } TEST_F(PsiIntializerUnitTest, ConstructorAtomic) { - #ifdef __MPI - this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); - #else - this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); - #endif - EXPECT_EQ("atomic", this->psi_init->get_method()); - EXPECT_EQ(this->p_sf, this->psi_init->get_interface_sf()); - EXPECT_EQ(this->p_pw_wfc, this->psi_init->get_interface_pw_wfc()); - EXPECT_EQ(this->p_ucell, this->psi_init->get_interface_ucell()); - EXPECT_EQ(this->random_seed, this->psi_init->get_random_seed()); - #ifdef __MPI - EXPECT_EQ(this->p_parakpts, this->psi_init->get_interface_parakpts()); - #endif + this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(); + EXPECT_EQ("atomic", this->psi_init->method()); } TEST_F(PsiIntializerUnitTest, ConstructorAtomicRandom) { - #ifdef __MPI - this->psi_init = new psi_initializer_atomic_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); - #else - this->psi_init = new psi_initializer_atomic_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); - #endif - EXPECT_EQ("atomic+random", this->psi_init->get_method()); - EXPECT_EQ(this->p_sf, this->psi_init->get_interface_sf()); - EXPECT_EQ(this->p_pw_wfc, this->psi_init->get_interface_pw_wfc()); - EXPECT_EQ(this->p_ucell, this->psi_init->get_interface_ucell()); - EXPECT_EQ(this->random_seed, this->psi_init->get_random_seed()); - #ifdef __MPI - EXPECT_EQ(this->p_parakpts, this->psi_init->get_interface_parakpts()); - #endif + this->psi_init = new psi_initializer_atomic_random, psi::DEVICE_CPU>(); + EXPECT_EQ("atomic+random", this->psi_init->method()); } TEST_F(PsiIntializerUnitTest, ConstructorNao) { - #ifdef __MPI - this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); - #else - this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); - #endif - EXPECT_EQ("nao", this->psi_init->get_method()); - EXPECT_EQ(this->p_sf, this->psi_init->get_interface_sf()); - EXPECT_EQ(this->p_pw_wfc, this->psi_init->get_interface_pw_wfc()); - EXPECT_EQ(this->p_ucell, this->psi_init->get_interface_ucell()); - EXPECT_EQ(this->random_seed, this->psi_init->get_random_seed()); - #ifdef __MPI - EXPECT_EQ(this->p_parakpts, this->psi_init->get_interface_parakpts()); - #endif + this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(); + EXPECT_EQ("nao", this->psi_init->method()); } TEST_F(PsiIntializerUnitTest, ConstructorNaoRandom) { - #ifdef __MPI - this->psi_init = new psi_initializer_nao_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); - #else - this->psi_init = new psi_initializer_nao_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); - #endif - EXPECT_EQ("nao+random", this->psi_init->get_method()); - EXPECT_EQ(this->p_sf, this->psi_init->get_interface_sf()); - EXPECT_EQ(this->p_pw_wfc, this->psi_init->get_interface_pw_wfc()); - EXPECT_EQ(this->p_ucell, this->psi_init->get_interface_ucell()); - EXPECT_EQ(this->random_seed, this->psi_init->get_random_seed()); - #ifdef __MPI - EXPECT_EQ(this->p_parakpts, this->psi_init->get_interface_parakpts()); - #endif + this->psi_init = new psi_initializer_nao_random, psi::DEVICE_CPU>(); + EXPECT_EQ("nao+random", this->psi_init->method()); } TEST_F(PsiIntializerUnitTest, CastToT) { - #ifdef __MPI - this->psi_init = new psi_initializer_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); - #else - this->psi_init = new psi_initializer_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); - #endif + this->psi_init = new psi_initializer_random, psi::DEVICE_CPU>(); std::complex cd = {1.0, 2.0}; std::complex cf = {1.0, 2.0}; double d = 1.0; @@ -354,125 +298,205 @@ TEST_F(PsiIntializerUnitTest, CastToT) { TEST_F(PsiIntializerUnitTest, AllocateRandom) { GlobalV::init_wfc = "random"; + this->psi_init = new psi_initializer_random, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif - this->psi_init->initialize_only_once(); + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - EXPECT_EQ(0, this->psi_init->get_nbands_complem()); + EXPECT_EQ(0, this->psi_init->nbands_complem()); EXPECT_EQ(1, psi->get_nk()); EXPECT_EQ(1, psi->get_nbands()); EXPECT_EQ(1, psi->get_nbasis()); - EXPECT_EQ(1, this->psi_init->psig->get_nk()); - EXPECT_EQ(1, this->psi_init->psig->get_nbands()); - EXPECT_EQ(1, this->psi_init->psig->get_nbasis()); + auto psig = this->psi_init->share_psig().lock(); + EXPECT_EQ(1, psig->get_nk()); + EXPECT_EQ(1, psig->get_nbands()); + EXPECT_EQ(1, psig->get_nbasis()); delete psi; } TEST_F(PsiIntializerUnitTest, AllocateAtomic) { GlobalV::init_wfc = "atomic"; + this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif - this->psi_init->initialize_only_once(this->p_pspot_vnl); + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - EXPECT_EQ(0, this->psi_init->get_nbands_complem()); + EXPECT_EQ(0, this->psi_init->nbands_complem()); EXPECT_EQ(1, psi->get_nk()); EXPECT_EQ(1, psi->get_nbands()); EXPECT_EQ(1, psi->get_nbasis()); - EXPECT_EQ(1, this->psi_init->psig->get_nk()); - EXPECT_EQ(4, this->psi_init->psig->get_nbands()); - EXPECT_EQ(1, this->psi_init->psig->get_nbasis()); + auto psig = this->psi_init->share_psig().lock(); + EXPECT_EQ(1, psig->get_nk()); + EXPECT_EQ(4, psig->get_nbands()); + EXPECT_EQ(1, psig->get_nbasis()); delete psi; } TEST_F(PsiIntializerUnitTest, AllocateAtomicRandom) { GlobalV::init_wfc = "atomic+random"; + this->psi_init = new psi_initializer_atomic_random, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_atomic_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_atomic_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif - this->psi_init->initialize_only_once(this->p_pspot_vnl); + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - EXPECT_EQ(0, this->psi_init->get_nbands_complem()); + EXPECT_EQ(0, this->psi_init->nbands_complem()); EXPECT_EQ(1, psi->get_nk()); EXPECT_EQ(1, psi->get_nbands()); EXPECT_EQ(1, psi->get_nbasis()); - EXPECT_EQ(1, this->psi_init->psig->get_nk()); - EXPECT_EQ(4, this->psi_init->psig->get_nbands()); - EXPECT_EQ(1, this->psi_init->psig->get_nbasis()); + auto psig = this->psi_init->share_psig().lock(); + EXPECT_EQ(1, psig->get_nk()); + EXPECT_EQ(4, psig->get_nbands()); + EXPECT_EQ(1, psig->get_nbasis()); delete psi; } TEST_F(PsiIntializerUnitTest, AllocateNao) { GlobalV::init_wfc = "nao"; + this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif - this->psi_init->set_orbital_files(this->p_ucell->orbital_fn); - this->psi_init->initialize_only_once(); + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - EXPECT_EQ(0, this->psi_init->get_nbands_complem()); + EXPECT_EQ(0, this->psi_init->nbands_complem()); EXPECT_EQ(1, psi->get_nk()); EXPECT_EQ(1, psi->get_nbands()); EXPECT_EQ(1, psi->get_nbasis()); - EXPECT_EQ(1, this->psi_init->psig->get_nk()); - EXPECT_EQ(13, this->psi_init->psig->get_nbands()); - EXPECT_EQ(1, this->psi_init->psig->get_nbasis()); + auto psig = this->psi_init->share_psig().lock(); + EXPECT_EQ(1, psig->get_nk()); + EXPECT_EQ(13, psig->get_nbands()); + EXPECT_EQ(1, psig->get_nbasis()); delete psi; } TEST_F(PsiIntializerUnitTest, AllocateNaoRandom) { GlobalV::init_wfc = "nao+random"; + this->psi_init = new psi_initializer_nao_random, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_nao_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_nao_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif - this->psi_init->set_orbital_files(this->p_ucell->orbital_fn); - this->psi_init->initialize_only_once(); + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - EXPECT_EQ(0, this->psi_init->get_nbands_complem()); + EXPECT_EQ(0, this->psi_init->nbands_complem()); EXPECT_EQ(1, psi->get_nk()); EXPECT_EQ(1, psi->get_nbands()); EXPECT_EQ(1, psi->get_nbasis()); - EXPECT_EQ(1, this->psi_init->psig->get_nk()); - EXPECT_EQ(13, this->psi_init->psig->get_nbands()); - EXPECT_EQ(1, this->psi_init->psig->get_nbasis()); + auto psig = this->psi_init->share_psig().lock(); + EXPECT_EQ(1, psig->get_nk()); + EXPECT_EQ(13, psig->get_nbands()); + EXPECT_EQ(1, psig->get_nbasis()); delete psi; } TEST_F(PsiIntializerUnitTest, CalPsigRandom) { GlobalV::init_wfc = "random"; + this->psi_init = new psi_initializer_random, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - psi::Psi>* psig = this->psi_init->cal_psig(0); + this->psi_init->proj_ao_onkG(0); EXPECT_NEAR(0, psi->operator()(0,0,0).real(), 1e-12); delete psi; } TEST_F(PsiIntializerUnitTest, CalPsigAtomic) { GlobalV::init_wfc = "atomic"; + this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif - this->psi_init->initialize_only_once(this->p_pspot_vnl); - this->psi_init->cal_ovlp_pswfcjlq(); + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - psi::Psi>* psig = this->psi_init->cal_psig(0); + this->psi_init->proj_ao_onkG(0); EXPECT_NEAR(0, psi->operator()(0,0,0).real(), 1e-12); delete psi; } @@ -483,15 +507,25 @@ TEST_F(PsiIntializerUnitTest, CalPsigAtomicSoc) { GlobalV::NPOL = 2; this->p_ucell->atoms[0].ncpp.has_so = false; this->p_ucell->natomwfc *= 2; + this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif - this->psi_init->initialize_only_once(this->p_pspot_vnl); - this->psi_init->cal_ovlp_pswfcjlq(); + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - psi::Psi>* psig = this->psi_init->cal_psig(0); + this->psi_init->proj_ao_onkG(0); EXPECT_NEAR(0, psi->operator()(0,0,0).real(), 1e-12); GlobalV::NSPIN = 1; GlobalV::NPOL = 1; @@ -506,15 +540,25 @@ TEST_F(PsiIntializerUnitTest, CalPsigAtomicSocHasSo) { GlobalV::NPOL = 2; this->p_ucell->atoms[0].ncpp.has_so = true; this->p_ucell->natomwfc *= 2; + this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_atomic, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif - this->psi_init->initialize_only_once(this->p_pspot_vnl); - this->psi_init->cal_ovlp_pswfcjlq(); + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - psi::Psi>* psig = this->psi_init->cal_psig(0); + this->psi_init->proj_ao_onkG(0); EXPECT_NEAR(0, psi->operator()(0,0,0).real(), 1e-12); GlobalV::NSPIN = 1; GlobalV::NPOL = 1; @@ -525,47 +569,75 @@ TEST_F(PsiIntializerUnitTest, CalPsigAtomicSocHasSo) { TEST_F(PsiIntializerUnitTest, CalPsigAtomicRandom) { GlobalV::init_wfc = "atomic+random"; + this->psi_init = new psi_initializer_atomic_random, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_atomic_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_atomic_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif - this->psi_init->initialize_only_once(this->p_pspot_vnl); - this->psi_init->cal_ovlp_pswfcjlq(); + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - psi::Psi>* psig = this->psi_init->cal_psig(0); + this->psi_init->proj_ao_onkG(0); EXPECT_NEAR(0, psi->operator()(0,0,0).real(), 1e-12); delete psi; } TEST_F(PsiIntializerUnitTest, CalPsigNao) { GlobalV::init_wfc = "nao"; + this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif - this->psi_init->set_orbital_files(this->p_ucell->orbital_fn); - this->psi_init->initialize_only_once(); - this->psi_init->cal_ovlp_flzjlq(); + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - psi::Psi>* psig = this->psi_init->cal_psig(0); + this->psi_init->proj_ao_onkG(0); EXPECT_NEAR(0, psi->operator()(0,0,0).real(), 1e-12); delete psi; } TEST_F(PsiIntializerUnitTest, CalPsigNaoRandom) { GlobalV::init_wfc = "nao+random"; + this->psi_init = new psi_initializer_nao_random, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_nao_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_nao_random, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif - this->psi_init->set_orbital_files(this->p_ucell->orbital_fn); - this->psi_init->initialize_only_once(); - this->psi_init->cal_ovlp_flzjlq(); + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - psi::Psi>* psig = this->psi_init->cal_psig(0); + this->psi_init->proj_ao_onkG(0); EXPECT_NEAR(0, psi->operator()(0,0,0).real(), 1e-12); delete psi; } @@ -577,16 +649,25 @@ TEST_F(PsiIntializerUnitTest, CalPsigNaoSoc) { this->p_ucell->atoms[0].ncpp.has_so = false; GlobalV::DOMAG = false; GlobalV::DOMAG_Z = false; + this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif - this->psi_init->set_orbital_files(this->p_ucell->orbital_fn); - this->psi_init->initialize_only_once(); - this->psi_init->cal_ovlp_flzjlq(); + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - psi::Psi>* psig = this->psi_init->cal_psig(0); + this->psi_init->proj_ao_onkG(0); EXPECT_NEAR(0, psi->operator()(0,0,0).real(), 1e-12); delete psi; } @@ -598,16 +679,25 @@ TEST_F(PsiIntializerUnitTest, CalPsigNaoSocHasSo) { this->p_ucell->atoms[0].ncpp.has_so = true; GlobalV::DOMAG = false; GlobalV::DOMAG_Z = false; + this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif - this->psi_init->set_orbital_files(this->p_ucell->orbital_fn); - this->psi_init->initialize_only_once(); - this->psi_init->cal_ovlp_flzjlq(); + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - psi::Psi>* psig = this->psi_init->cal_psig(0); + this->psi_init->proj_ao_onkG(0); EXPECT_NEAR(0, psi->operator()(0,0,0).real(), 1e-12); delete psi; } @@ -619,16 +709,25 @@ TEST_F(PsiIntializerUnitTest, CalPsigNaoSocHasSoDOMAG) { this->p_ucell->atoms[0].ncpp.has_so = true; GlobalV::DOMAG = true; GlobalV::DOMAG_Z = false; + this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(); #ifdef __MPI - this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->p_parakpts, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->p_parakpts, + this->random_seed, + this->p_pspot_vnl, + GlobalV::MY_RANK); #else - this->psi_init = new psi_initializer_nao, psi::DEVICE_CPU>(this->p_sf, this->p_pw_wfc, this->p_ucell, this->random_seed); + this->psi_init->initialize(this->p_sf, + this->p_pw_wfc, + this->p_ucell, + this->random_seed, + this->p_pspot_vnl); #endif - this->psi_init->set_orbital_files(this->p_ucell->orbital_fn); - this->psi_init->initialize_only_once(); - this->psi_init->cal_ovlp_flzjlq(); + this->psi_init->tabulate(); // always: new, initialize, tabulate, allocate, proj_ao_onkG psi::Psi>* psi = this->psi_init->allocate(); - psi::Psi>* psig = this->psi_init->cal_psig(0); + this->psi_init->proj_ao_onkG(0); EXPECT_NEAR(0, psi->operator()(0,0,0).real(), 1e-12); delete psi; } diff --git a/source/module_relax/relax_driver.cpp b/source/module_relax/relax_driver.cpp index 78c4710e1a..28f2485bc9 100644 --- a/source/module_relax/relax_driver.cpp +++ b/source/module_relax/relax_driver.cpp @@ -5,6 +5,10 @@ #include "module_io/print_info.h" #include "module_io/write_wfc_r.h" +#include "module_io/json_output/output_info.h" + + + template void Relax_Driver::relax_driver(ModuleESolver::ESolver *p_esolver) { @@ -39,12 +43,17 @@ void Relax_Driver::relax_driver(ModuleESolver::ESolver *p_esolve Print_Info::print_screen(stress_step, force_step, istep); } +#ifdef __RAPIDJSON + Json::init_output_array_obj(); +#endif //__RAPIDJSON + // mohan added eiter to count for the electron iteration number, 2021-01-28 - p_esolver->Run(istep - 1, GlobalC::ucell); + p_esolver->run(istep - 1, GlobalC::ucell); time_t eend = time(NULL); time_t fstart = time(NULL); - + ModuleBase::matrix force; + ModuleBase::matrix stress; if (GlobalV::CALCULATION == "scf" || GlobalV::CALCULATION == "relax" || GlobalV::CALCULATION == "cell-relax") { // I'm considering putting force and stress @@ -53,19 +62,17 @@ void Relax_Driver::relax_driver(ModuleESolver::ESolver *p_esolve // but I'll use force and stress explicitly here for now // calculate the total energy - this->etot = p_esolver->cal_Energy(); + this->etot = p_esolver->cal_energy(); // calculate and gather all parts of total ionic forces - ModuleBase::matrix force; if (GlobalV::CAL_FORCE) { - p_esolver->cal_Force(force); + p_esolver->cal_force(force); } // calculate and gather all parts of stress - ModuleBase::matrix stress; if (GlobalV::CAL_STRESS) { - p_esolver->cal_Stress(stress); + p_esolver->cal_stress(stress); } if (GlobalV::CALCULATION == "relax" || GlobalV::CALCULATION == "cell-relax") @@ -98,8 +105,12 @@ void Relax_Driver::relax_driver(ModuleESolver::ESolver *p_esolve GlobalC::ucell.print_cell_cif("STRU_NOW.cif"); } - ModuleESolver::ESolver_KS* p_esolver_ks = dynamic_cast*>(p_esolver); - if (p_esolver_ks && stop && p_esolver_ks->maxniter == p_esolver_ks->niter && !(p_esolver_ks->conv_elec)) + ModuleESolver::ESolver_KS* p_esolver_ks + = dynamic_cast*>(p_esolver); + if (p_esolver_ks + && stop + && p_esolver_ks->maxniter == p_esolver_ks->niter + && !(p_esolver_ks->conv_elec)) { std::cout << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << std::endl; std::cout << "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" << std::endl; @@ -116,6 +127,16 @@ void Relax_Driver::relax_driver(ModuleESolver::ESolver *p_esolve } } } +#ifdef __RAPIDJSON + //add Json of cell coo stress force + double unit_transform = ModuleBase::RYDBERG_SI / pow(ModuleBase::BOHR_RADIUS_SI, 3) * 1.0e-8; + double fac = ModuleBase::Ry_to_eV / 0.529177; + Json::add_output_cell_coo_stress_force( + &GlobalC::ucell, + force,fac, + stress,unit_transform); +#endif //__RAPIDJSON + time_t fend = time(NULL); ++istep; @@ -136,4 +157,4 @@ void Relax_Driver::relax_driver(ModuleESolver::ESolver *p_esolve } template class Relax_Driver; -template class Relax_Driver; \ No newline at end of file +template class Relax_Driver; diff --git a/source/module_relax/relax_new/relax.cpp b/source/module_relax/relax_new/relax.cpp index bf4b5d0279..06b75acb44 100644 --- a/source/module_relax/relax_new/relax.cpp +++ b/source/module_relax/relax_new/relax.cpp @@ -411,7 +411,8 @@ void Relax::new_direction() //prepare for line search bool restart = true; double x=0, y=etot; - double xnew, yd; + //TODO: add a certain threshold for the progress. + double xnew, yd = 1e-8; this->ls.line_search(restart, x, y, f, xnew, yd); diff --git a/source/module_ri/Exx_LRI.h b/source/module_ri/Exx_LRI.h index 2309170189..634417cefa 100644 --- a/source/module_ri/Exx_LRI.h +++ b/source/module_ri/Exx_LRI.h @@ -45,7 +45,7 @@ class Exx_LRI void cal_exx_stress(); std::vector< std::map>>> Hexxs; - Tdata Eexx; + double Eexx; ModuleBase::matrix force_exx; ModuleBase::matrix stress_exx; @@ -64,7 +64,7 @@ class Exx_LRI void cal_exx_ions(); void cal_exx_elec(const std::vector>>> &Ds, const Parallel_Orbitals &pv); void post_process_Hexx( std::map>> &Hexxs_io ) const; - Tdata post_process_Eexx( const Tdata &Eexx_in ) const; + double post_process_Eexx(const double& Eexx_in) const; friend class RPA_LRI; friend class RPA_LRI, Tdata>; diff --git a/source/module_ri/Exx_LRI.hpp b/source/module_ri/Exx_LRI.hpp index c9b3b69601..591deabf04 100644 --- a/source/module_ri/Exx_LRI.hpp +++ b/source/module_ri/Exx_LRI.hpp @@ -190,7 +190,7 @@ void Exx_LRI::cal_exx_elec(const std::vectorHexxs[is] = RI::Communicate_Tensors_Map_Judge::comm_map2_first( this->mpi_comm, std::move(this->exx_lri.Hs), std::get<0>(judge[is]), std::get<1>(judge[is])); - this->Eexx += this->exx_lri.energy; + this->Eexx += std::real(this->exx_lri.energy); post_process_Hexx(this->Hexxs[is]); } this->Eexx = post_process_Eexx(this->Eexx); @@ -209,11 +209,11 @@ void Exx_LRI::post_process_Hexx( std::map -Tdata Exx_LRI::post_process_Eexx( const Tdata &Eexx_in ) const +double Exx_LRI::post_process_Eexx(const double& Eexx_in) const { ModuleBase::TITLE("Exx_LRI","post_process_Eexx"); - const Tdata SPIN_multiple = std::map{{1,2}, {2,1}, {4,1}}.at(GlobalV::NSPIN); // why? - const Tdata frac = - SPIN_multiple; + const double SPIN_multiple = std::map{ {1,2}, {2,1}, {4,1} }.at(GlobalV::NSPIN); // why? + const double frac = -SPIN_multiple; return frac * Eexx_in; } diff --git a/source/module_ri/Exx_LRI_interface.h b/source/module_ri/Exx_LRI_interface.h index a6c67a7971..13254909e0 100644 --- a/source/module_ri/Exx_LRI_interface.h +++ b/source/module_ri/Exx_LRI_interface.h @@ -30,7 +30,7 @@ class Exx_LRI_Interface using TAC = std::pair>; std::vector< std::map>>>& get_Hexxs() const { return this->exx_ptr->Hexxs; } - Tdata& get_Eexx() const { return this->exx_ptr->Eexx; } + double& get_Eexx() const { return this->exx_ptr->Eexx; } // Processes in ESolver_KS_LCAO /// @brief in beforescf: set xc type, opt_orb, do DM mixing @@ -41,7 +41,7 @@ class Exx_LRI_Interface const int& iter); /// @brief in hamilt2density: calculate Hexx and Eexx - void exx_hamilt2density(elecstate::ElecState& elec, const Parallel_Orbitals& pv); + void exx_hamilt2density(elecstate::ElecState& elec, const Parallel_Orbitals& pv, const int iter); /// @brief: in do_after_converge: add exx operators; do DM mixing if seperate loop bool exx_after_converge( @@ -50,11 +50,10 @@ class Exx_LRI_Interface const elecstate::DensityMatrix& dm/**< double should be Tdata if complex-PBE-DM is supported*/, const K_Vectors& kv, int& iter); - + int two_level_step = 0; private: std::shared_ptr> exx_ptr; Mix_DMk_2D mix_DMk_2D; - int two_level_step = 0; }; #include "Exx_LRI_interface.hpp" diff --git a/source/module_ri/Exx_LRI_interface.hpp b/source/module_ri/Exx_LRI_interface.hpp index cf07890e04..ca13f6f977 100644 --- a/source/module_ri/Exx_LRI_interface.hpp +++ b/source/module_ri/Exx_LRI_interface.hpp @@ -34,15 +34,22 @@ template void Exx_LRI_Interface::exx_beforescf(const K_Vectors& kv, const Charge_Mixing& chgmix) { #ifdef __MPI - if ( GlobalC::exx_info.info_global.cal_exx ) - { + if (GlobalC::exx_info.info_global.cal_exx) + { + if (GlobalC::restart.info_load.load_H_finish && !GlobalC::restart.info_load.restart_exx) XC_Functional::set_xc_type(GlobalC::ucell.atoms[0].ncpp.xc_func); + else + { if (GlobalC::ucell.atoms[0].ncpp.xc_func == "HF" || GlobalC::ucell.atoms[0].ncpp.xc_func == "PBE0" || GlobalC::ucell.atoms[0].ncpp.xc_func == "HSE") + { XC_Functional::set_xc_type("pbe"); + } else if (GlobalC::ucell.atoms[0].ncpp.xc_func == "SCAN0") + { XC_Functional::set_xc_type("scan"); - - this->exx_ptr->cal_exx_ions(); - } + } + } + this->exx_ptr->cal_exx_ions(); + } if (Exx_Abfs::Jle::generate_matrix) { @@ -86,27 +93,21 @@ void Exx_LRI_Interface::exx_eachiterinit(const elecstate::DensityMatri } template -void Exx_LRI_Interface::exx_hamilt2density(elecstate::ElecState& elec, const Parallel_Orbitals& pv) +void Exx_LRI_Interface::exx_hamilt2density(elecstate::ElecState& elec, const Parallel_Orbitals& pv, const int iter) { // Peize Lin add 2020.04.04 if (XC_Functional::get_func_type() == 4 || XC_Functional::get_func_type() == 5) { // add exx // Peize Lin add 2016-12-03 - elec.set_exx(this->get_Eexx()); - - if (GlobalC::restart.info_load.load_H && GlobalC::restart.info_load.load_H_finish - && !GlobalC::restart.info_load.restart_exx) + if (GlobalC::restart.info_load.load_H_finish && !GlobalC::restart.info_load.restart_exx + && this->two_level_step == 0 && iter == 1) { - XC_Functional::set_xc_type(GlobalC::ucell.atoms[0].ncpp.xc_func); - - const std::vector>,RI::Tensor>>> - Ds = GlobalV::GAMMA_ONLY_LOCAL - ? RI_2D_Comm::split_m2D_ktoR(*this->exx_ptr->p_kv, this->mix_DMk_2D.get_DMk_gamma_out(), pv) - : RI_2D_Comm::split_m2D_ktoR(*this->exx_ptr->p_kv, this->mix_DMk_2D.get_DMk_k_out(), pv); - this->exx_ptr->cal_exx_elec(Ds, pv); - GlobalC::restart.info_load.restart_exx = true; + if (GlobalV::MY_RANK == 0)GlobalC::restart.load_disk("Eexx", 0, 1, &this->exx_ptr->Eexx); + Parallel_Common::bcast_double(this->exx_ptr->Eexx); + this->exx_ptr->Eexx /= GlobalC::exx_info.info_global.hybrid_alpha; } + elec.set_exx(this->get_Eexx()); } else { @@ -122,47 +123,11 @@ bool Exx_LRI_Interface::exx_after_converge( const K_Vectors& kv, int& iter) { - // Add EXX operator - auto add_exx_operator = [&]() { - if (GlobalV::GAMMA_ONLY_LOCAL) - { - hamilt::HamiltLCAO* hamilt_lcao = dynamic_cast*>(&hamilt); - hamilt::Operator* exx - = new hamilt::OperatorEXX>(&lm, - hamilt_lcao->getHR(), - &(hamilt_lcao->getHk(&lm)), - kv); - hamilt_lcao->getOperator()->add(exx); - } - else - { - if(GlobalV::NSPIN < 4) - { - hamilt::HamiltLCAO, double>* hamilt_lcao - = dynamic_cast, double>*>(&hamilt); - hamilt::Operator>* exx - = new hamilt::OperatorEXX, double>>( - &lm, - hamilt_lcao->getHR(), - &(hamilt_lcao->getHk(&lm)), - kv); - hamilt_lcao->getOperator()->add(exx); - } - else - { - hamilt::HamiltLCAO, std::complex>* hamilt_lcao - = dynamic_cast, std::complex>*>(&hamilt); - hamilt::Operator>* exx - = new hamilt::OperatorEXX, std::complex>>( - &lm, - hamilt_lcao->getHR(), - &(hamilt_lcao->getHk(&lm)), - kv); - hamilt_lcao->getOperator()->add(exx); - } - } - }; - + auto restart_reset = [this]() + { // avoid calling restart related procedure in the subsequent ion steps + GlobalC::restart.info_load.restart_exx = true; + this->exx_ptr->Eexx = 0; + }; if (GlobalC::exx_info.info_global.cal_exx) { // no separate_loop case @@ -176,6 +141,7 @@ bool Exx_LRI_Interface::exx_after_converge( if (this->two_level_step) { + restart_reset(); return true; } else @@ -185,17 +151,15 @@ bool Exx_LRI_Interface::exx_after_converge( iter = 0; std::cout << " Entering 2nd SCF, where EXX is updated" << std::endl; this->two_level_step++; - - add_exx_operator(); - return false; } } // has separate_loop case // exx converged or get max exx steps else if (this->two_level_step == GlobalC::exx_info.info_global.hybrid_step - || (iter == 1 && this->two_level_step != 0)) + || (iter == 1 && this->two_level_step != 0)) { + restart_reset(); return true; } else @@ -203,7 +167,6 @@ bool Exx_LRI_Interface::exx_after_converge( // update exx and redo scf if (this->two_level_step == 0) { - add_exx_operator(); XC_Functional::set_xc_type(GlobalC::ucell.atoms[0].ncpp.xc_func); } @@ -230,10 +193,7 @@ bool Exx_LRI_Interface::exx_after_converge( return false; } } - else - { - return true; - } + restart_reset(); + return true; } - #endif \ No newline at end of file diff --git a/source/version.h b/source/version.h index 9465a46987..4d3b33a572 100644 --- a/source/version.h +++ b/source/version.h @@ -1,3 +1,3 @@ #ifndef VERSION -#define VERSION "v3.5.4" +#define VERSION "v3.6.0" #endif diff --git a/tests/PP_ORB/Fe_gga_6au_100Ry_4s2p2d1f.orb b/tests/PP_ORB/Fe_gga_6au_100Ry_4s2p2d1f.orb new file mode 100644 index 0000000000..e30e99ebed --- /dev/null +++ b/tests/PP_ORB/Fe_gga_6au_100Ry_4s2p2d1f.orb @@ -0,0 +1,1391 @@ +--------------------------------------------------------------------------- +Element Fe +Energy Cutoff(Ry) 100 +Radius Cutoff(a.u.) 6 +Lmax 3 +Number of Sorbital--> 4 +Number of Porbital--> 2 +Number of Dorbital--> 2 +Number of Forbital--> 1 +--------------------------------------------------------------------------- +SUMMARY END + +Mesh 601 +dr 0.01 + Type L N + 0 0 0 +8.49760986462424e-01 8.49753065426807e-01 8.49729074558214e-01 8.49688332062355e-01 +8.49629706574993e-01 8.49551624565653e-01 8.49452080631789e-01 8.49328650613005e-01 +8.49178507435720e-01 8.48998439580167e-01 8.48784872043829e-01 8.48533889658682e-01 +8.48241262603859e-01 8.47902473940807e-01 8.47512748984769e-01 8.47067086314511e-01 +8.46560290211825e-01 8.45987004313464e-01 8.45341746250862e-01 8.44618943047411e-01 +8.43812967039078e-01 8.42918172081942e-01 8.41928929809684e-01 8.40839665705267e-01 +8.39644894753915e-01 8.38339256449029e-01 8.36917548928859e-01 8.35374762029425e-01 +8.33706109048443e-01 8.31907057025566e-01 8.29973355356257e-01 8.27901062569716e-01 +8.25686571115599e-01 8.23326630019526e-01 8.20818365283499e-01 8.18159297924274e-01 +8.15347359560190e-01 8.12380905474930e-01 8.09258725104974e-01 8.05980049915977e-01 +8.02544558651804e-01 7.98952379958377e-01 7.95204092402634e-01 7.91300721924716e-01 +7.87243736778741e-01 7.83035040034191e-01 7.78676959725774e-01 7.74172236754675e-01 +7.69524010658073e-01 7.64735803376797e-01 7.59811501162726e-01 7.54755334778119e-01 +7.49571858148250e-01 7.44265925636632e-01 7.38842668118538e-01 7.33307468033596e-01 +7.27665933601759e-01 7.21923872389120e-01 7.16087264410632e-01 7.10162234956059e-01 +7.04155027323241e-01 6.98071975639217e-01 6.91919477944836e-01 6.85703969712329e-01 +6.79431897957977e-01 6.73109696103548e-01 6.66743759730682e-01 6.60340423362013e-01 +6.53905938391537e-01 6.47446452274820e-01 6.40967989077009e-01 6.34476431463597e-01 +6.27977504205396e-01 6.21476759255486e-01 6.14979562442064e-01 6.08491081807217e-01 +6.02016277607906e-01 5.95559893981842e-01 5.89126452267718e-01 5.82720245956406e-01 +5.76345337237488e-01 5.70005555093744e-01 5.63704494885326e-01 5.57445519355141e-01 +5.51231760977649e-01 5.45066125564931e-01 5.38951297036436e-01 5.32889743252480e-01 +5.26883722806199e-01 5.20935292664465e-01 5.15046316545116e-01 5.09218473915799e-01 +5.03453269498825e-01 4.97752043166537e-01 4.92115980112929e-01 4.86546121189455e-01 +4.81043373296194e-01 4.75608519723654e-01 4.70242230345533e-01 4.64945071568546e-01 +4.59717515951999e-01 4.54559951416975e-01 4.49472689972807e-01 4.44455975896763e-01 +4.39509993311526e-01 4.34634873114070e-01 4.29830699218669e-01 4.25097514086119e-01 +4.20435323520581e-01 4.15844100724721e-01 4.11323789612921e-01 4.06874307391251e-01 +4.02495546421382e-01 3.98187375393814e-01 3.93949639843409e-01 3.89782162047375e-01 +3.85684740352330e-01 3.81657147982922e-01 3.77699131389627e-01 3.73810408197704e-01 +3.69990664822914e-01 3.66239553822379e-01 3.62556691050925e-01 3.58941652694397e-01 +3.55393972251757e-01 3.51913137537210e-01 3.48498587772360e-01 3.45149710836236e-01 +3.41865840738230e-01 3.38646255375426e-01 3.35490174631588e-01 3.32396758870258e-01 +3.29365107869072e-01 3.26394260236492e-01 3.23483193345950e-01 3.20630823815686e-01 +3.17836008555733e-01 3.15097546396347e-01 3.12414180304935e-01 3.09784600191313e-01 +3.07207446293770e-01 3.04681313131360e-01 3.02204754000794e-01 2.99776285989620e-01 +2.97394395470953e-01 2.95057544039004e-01 2.92764174839078e-01 2.90512719240624e-01 +2.88301603797412e-01 2.86129257434978e-01 2.83994118802159e-01 2.81894643720959e-01 +2.79829312666999e-01 2.77796638211611e-01 2.75795172356121e-01 2.73823513689048e-01 +2.71880314297940e-01 2.69964286369151e-01 2.68074208411227e-01 2.66208931040564e-01 +2.64367382271618e-01 2.62548572258195e-01 2.60751597437118e-01 2.58975644030856e-01 +2.57219990871455e-01 2.55484011514212e-01 2.53767175616034e-01 2.52069049560147e-01 +2.50389296315735e-01 2.48727674528197e-01 2.47084036842815e-01 2.45458327471762e-01 +2.43850579021440e-01 2.42260908604019e-01 2.40689513263787e-01 2.39136664755281e-01 +2.37602703716305e-01 2.36088033284590e-01 2.34593112212078e-01 2.33118447535575e-01 +2.31664586866652e-01 2.30232110367317e-01 2.28821622480918e-01 2.27433743490083e-01 +2.26069100975167e-01 2.24728321247633e-01 2.23412020833087e-01 2.22120798078286e-01 +2.20855224955303e-01 2.19615839134289e-01 2.18403136393831e-01 2.17217563434791e-01 +2.16059511159896e-01 2.14929308477047e-01 2.13827216679572e-01 2.12753424451376e-01 +2.11708043539259e-01 2.10691105128615e-01 2.09702556952310e-01 2.08742261155956e-01 +2.07809992935877e-01 2.06905439959189e-01 2.06028202568294e-01 2.05177794765117e-01 +2.04353645963431e-01 2.03555103490756e-01 2.02781435814713e-01 2.02031836462309e-01 +2.01305428594544e-01 2.00601270193062e-01 1.99918359810254e-01 1.99255642829414e-01 +1.98612018177261e-01 1.97986345427365e-01 1.97377452229842e-01 1.96784142000140e-01 +1.96205201797761e-01 1.95639410324500e-01 1.95085545971135e-01 1.94542394841485e-01 +1.94008758683472e-01 1.93483462658052e-01 1.92965362878897e-01 1.92453353658150e-01 +1.91946374396776e-01 1.91443416061613e-01 1.90943527195434e-01 1.90445819410942e-01 +1.89949472324665e-01 1.89453737892133e-01 1.88957944111457e-01 1.88461498068418e-01 +1.87963888302348e-01 1.87464686478472e-01 1.86963548358735e-01 1.86460214069636e-01 +1.85954507671959e-01 1.85446336043616e-01 1.84935687092950e-01 1.84422627325793e-01 +1.83907298795232e-01 1.83389915468388e-01 1.82870759049489e-01 1.82350174303084e-01 +1.81828563925369e-01 1.81306383015225e-01 1.80784133199666e-01 1.80262356470982e-01 +1.79741628794854e-01 1.79222553550168e-01 1.78705754862056e-01 1.78191870890004e-01 +1.77681547132471e-01 1.77175429808601e-01 1.76674159376097e-01 1.76178364242319e-01 +1.75688654723115e-01 1.75205617300860e-01 1.74729809229654e-01 1.74261753531745e-01 +1.73801934424899e-01 1.73350793215827e-01 1.72908724689837e-01 1.72476074021708e-01 +1.72053134227441e-01 1.71640144171054e-01 1.71237287135002e-01 1.70844689957261e-01 +1.70462422732501e-01 1.70090499069364e-01 1.69728876890469e-01 1.69377459756677e-01 +1.69036098692209e-01 1.68704594482598e-01 1.68382700413165e-01 1.68070125411786e-01 +1.67766537556168e-01 1.67471567902794e-01 1.67184814592035e-01 1.66905847181797e-01 +1.66634211160417e-01 1.66369432588373e-01 1.66111022817786e-01 1.65858483238558e-01 +1.65611310000449e-01 1.65368998661289e-01 1.65131048712994e-01 1.64896967938919e-01 +1.64666276558472e-01 1.64438511117684e-01 1.64213228087634e-01 1.63990007136161e-01 +1.63768454042176e-01 1.63548203226038e-01 1.63328919873845e-01 1.63110301638095e-01 +1.62892079901864e-01 1.62674020598509e-01 1.62455924583748e-01 1.62237627561838e-01 +1.62018999572398e-01 1.61799944049101e-01 1.61580396466060e-01 1.61360322592052e-01 +1.61139716376886e-01 1.60918597498037e-01 1.60697008599224e-01 1.60475012255757e-01 +1.60252687704286e-01 1.60030127376982e-01 1.59807433282092e-01 1.59584713274367e-01 +1.59362077259837e-01 1.59139633380046e-01 1.58917484220869e-01 1.58695723090732e-01 +1.58474430412129e-01 1.58253670269063e-01 1.58033487151265e-01 1.57813902933861e-01 +1.57594914128573e-01 1.57376489439591e-01 1.57158567653954e-01 1.56941055892651e-01 +1.56723828244810e-01 1.56506724803209e-01 1.56289551115062e-01 1.56072078057600e-01 +1.55854042143412e-01 1.55635146255973e-01 1.55415060811127e-01 1.55193425335823e-01 +1.54969850450886e-01 1.54743920240314e-01 1.54515194985433e-01 1.54283214238332e-01 +1.54047500205310e-01 1.53807561407727e-01 1.53562896584588e-01 1.53312998798535e-01 +1.53057359704611e-01 1.52795473939302e-01 1.52526843585901e-01 1.52250982671238e-01 +1.51967421648287e-01 1.51675711819037e-01 1.51375429652431e-01 1.51066180952957e-01 +1.50747604836804e-01 1.50419377474159e-01 1.50081215558401e-01 1.49732879465430e-01 +1.49374176069320e-01 1.49004961183692e-01 1.48625141601780e-01 1.48234676711993e-01 +1.47833579669839e-01 1.47421918111359e-01 1.46999814397619e-01 1.46567445384373e-01 +1.46125041715572e-01 1.45672886644058e-01 1.45211314387320e-01 1.44740708030781e-01 +1.44261496995427e-01 1.43774154090890e-01 1.43279192179113e-01 1.42777160477534e-01 +1.42268640534288e-01 1.41754241911085e-01 1.41234597612331e-01 1.40710359301556e-01 +1.40182192348271e-01 1.39650770750106e-01 1.39116771976279e-01 1.38580871779273e-01 +1.38043739021921e-01 1.37506030566980e-01 1.36968386275717e-01 1.36431424160968e-01 +1.35895735738701e-01 1.35361881620189e-01 1.34830387384598e-01 1.34301739769118e-01 +1.33776383210696e-01 1.33254716770073e-01 1.32737091465113e-01 1.32223808036531e-01 +1.31715115164915e-01 1.31211208153639e-01 1.30712228087768e-01 1.30218261474491e-01 +1.29729340366005e-01 1.29245442961145e-01 1.28766494677466e-01 1.28292369681006e-01 +1.27822892856581e-01 1.27357842197264e-01 1.26896951587743e-01 1.26439913952507e-01 +1.25986384736374e-01 1.25535985681783e-01 1.25088308864469e-01 1.24642920946807e-01 +1.24199367606086e-01 1.23757178093456e-01 1.23315869878144e-01 1.22874953330873e-01 +1.22433936400207e-01 1.21992329235768e-01 1.21549648712983e-01 1.21105422815130e-01 +1.20659194830053e-01 1.20210527320886e-01 1.19759005832534e-01 1.19304242298414e-01 +1.18845878115086e-01 1.18383586855814e-01 1.17917076597857e-01 1.17446091842195e-01 +1.16970415008629e-01 1.16489867493466e-01 1.16004310281527e-01 1.15513644108703e-01 +1.15017809175882e-01 1.14516784419650e-01 1.14010586349646e-01 1.13499267466884e-01 +1.12982914281615e-01 1.12461644953383e-01 1.11935606579787e-01 1.11404972164032e-01 +1.10869937294674e-01 1.10330716573906e-01 1.09787539833305e-01 1.09240648178221e-01 +1.08690289903730e-01 1.08136716326482e-01 1.07580177577692e-01 1.07020918402987e-01 +1.06459174014851e-01 1.05895166042980e-01 1.05329098626952e-01 1.04761154694279e-01 +1.04191492465151e-01 1.03620242222989e-01 1.03047503387328e-01 1.02473341922615e-01 +1.01897788113205e-01 1.01320834731235e-01 1.00742435620157e-01 1.00162504712620e-01 +9.95809154970503e-02 9.89975009428167e-02 9.84120538892695e-02 9.78243278993052e-02 +9.72340385734138e-02 9.66408653155244e-02 9.60444535373712e-02 9.54444172836374e-02 +9.48403422558161e-02 9.42317892086158e-02 9.36182976888633e-02 9.29993900832659e-02 +9.23745759381116e-02 9.17433565110565e-02 9.11052295125936e-02 9.04596939926415e-02 +8.98062553259683e-02 8.91444302488766e-02 8.84737518987483e-02 8.77937748076826e-02 +8.71040798015695e-02 8.64042787565153e-02 8.56940191655830e-02 8.49729884703097e-02 +8.42409181134121e-02 8.34975872714600e-02 8.27428262290818e-02 8.19765193594206e-02 +8.11986076790743e-02 8.04090909495758e-02 7.96080293015887e-02 7.87955443623410e-02 +7.79718198713856e-02 7.71371017744920e-02 7.62916977903108e-02 7.54359764493555e-02 +7.45703656097834e-02 7.36953504593524e-02 7.28114710177803e-02 7.19193191584429e-02 +7.10195351729169e-02 7.01128039062244e-02 6.91998504947477e-02 6.82814357426075e-02 +6.73583511757983e-02 6.64314138165225e-02 6.55014607229205e-02 6.45693433417405e-02 +6.36359217233976e-02 6.27020586503267e-02 6.17686137305091e-02 6.08364375085577e-02 +5.99063656467554e-02 5.89792132279677e-02 5.80557692313898e-02 5.71367912306535e-02 +5.62230003619163e-02 5.53150766072102e-02 5.44136544355507e-02 5.35193188411319e-02 +5.26326018143867e-02 5.17539792778014e-02 5.08838685141859e-02 5.00226261106369e-02 +4.91705464367583e-02 4.83278606708298e-02 4.74947363826240e-02 4.66712776764781e-02 +4.58575258930954e-02 4.50534608634232e-02 4.42590027028840e-02 4.34740141292555e-02 +4.26983032826736e-02 4.19316270215884e-02 4.11736946641083e-02 4.04241721400334e-02 +3.96826865150711e-02 3.89488308452599e-02 3.82221693165489e-02 3.75022426218044e-02 +3.67885735252792e-02 3.60806725627915e-02 3.53780438245418e-02 3.46801907666463e-02 +3.39866219970899e-02 3.32968569818844e-02 3.26104316177420e-02 3.19269036184915e-02 +3.12458576637321e-02 3.05669102597380e-02 2.98897142642931e-02 2.92139630287923e-02 +2.85393941123873e-02 2.78657925239397e-02 2.71929934477516e-02 2.65208844081332e-02 +2.58494068254300e-02 2.51785569118073e-02 2.45083858485319e-02 2.38389991775520e-02 +2.31705553289587e-02 2.25032631929910e-02 2.18373786318268e-02 2.11731998145609e-02 +2.05110612516480e-02 1.98513264070276e-02 1.91943787827332e-02 1.85406114086757e-02 +1.78904147367499e-02 1.72441630405979e-02 1.66021995660779e-02 1.59648208657293e-02 +1.53322609815967e-02 1.47046764064147e-02 1.40821330367523e-02 1.34645966071832e-02 +1.28519283261625e-02 1.22438875779929e-02 1.16401435618334e-02 1.10402975588390e-02 +1.04439171098072e-02 9.85058272083739e-03 9.25994678992888e-03 8.67180329092835e-03 +8.08616542711843e-03 7.50334707692795e-03 6.92404253411096e-03 6.34939795293298e-03 +5.78106721156401e-03 5.22124475738073e-03 4.67266851451490e-03 4.13858717859590e-03 +3.62268818480489e-03 3.12898521930047e-03 2.66166717576570e-03 2.22491369429906e-03 +1.82268556902726e-03 1.45850106813560e-03 1.13521128921714e-03 8.54788840576119e-04 +6.18144242808373e-04 4.24983430837541e-04 2.73717655397171e-04 1.61434083284831e-04 +8.39317061986988e-05 3.58230719411328e-05 1.06981584474221e-05 1.34272735821821e-06 +-0.00000000000000e+00 + Type L N + 0 0 1 +-2.11707406727404e+00 -2.11712959718659e+00 -2.11729524056738e+00 -2.11756816269953e+00 +-2.11794365354519e+00 -2.11841514940329e+00 -2.11897426307522e+00 -2.11961082238485e+00 +-2.12031291685635e+00 -2.12106695231243e+00 -2.12185771311565e+00 -2.12266843173739e+00 +-2.12348086530265e+00 -2.12427537872478e+00 -2.12503103401221e+00 -2.12572568529990e+00 +-2.12633607913115e+00 -2.12683795949173e+00 -2.12720617707659e+00 -2.12741480225169e+00 +-2.12743724115819e+00 -2.12724635439427e+00 -2.12681457770133e+00 -2.12611404407572e+00 +-2.12511670672482e+00 -2.12379446228765e+00 -2.12211927374387e+00 -2.12006329244286e+00 +-2.11759897869455e+00 -2.11469922037730e+00 -2.11133744903410e+00 -2.10748775294752e+00 +-2.10312498670512e+00 -2.09822487679107e+00 -2.09276412276579e+00 -2.08672049362365e+00 +-2.08007291894890e+00 -2.07280157452147e+00 -2.06488796205764e+00 -2.05631498280474e+00 +-2.04706700474436e+00 -2.03712992319476e+00 -2.02649121463943e+00 -2.01513998364592e+00 +-2.00306700277579e+00 -1.99026474542328e+00 -1.97672741155686e+00 -1.96245094637324e+00 +-1.94743305190866e+00 -1.93167319168619e+00 -1.91517258851034e+00 -1.89793421555196e+00 +-1.87996278089605e+00 -1.86126470575336e+00 -1.84184809656328e+00 -1.82172271123946e+00 +-1.80089991983265e+00 -1.77939265990514e+00 -1.75721538692939e+00 -1.73438402003955e+00 +-1.71091588347771e+00 -1.68682964408865e+00 -1.66214524522520e+00 -1.63688383743348e+00 +-1.61106770629159e+00 -1.58472019777739e+00 -1.55786564154117e+00 -1.53052927245695e+00 +-1.50273715082198e+00 -1.47451608156802e+00 -1.44589353284004e+00 -1.41689755428867e+00 +-1.38755669541129e+00 -1.35789992426424e+00 -1.32795654685467e+00 -1.29775612750537e+00 +-1.26732841046998e+00 -1.23670324305867e+00 -1.20591050051701e+00 -1.17498001288191e+00 +-1.14394149402024e+00 -1.11282447303626e+00 -1.08165822821496e+00 -1.05047172364901e+00 +-1.01929354867802e+00 -9.88151860249771e-01 -9.57074328294649e-01 -9.26088084186269e-01 +-8.95219672343969e-01 -8.64495005015851e-01 -8.33939320265033e-01 -8.03577143166467e-01 +-7.73432250207319e-01 -7.43527636870433e-01 -7.13885488367952e-01 -6.84527153480714e-01 +-6.55473121448631e-01 -6.26743001847885e-01 -5.98355507382469e-01 -5.70328439510344e-01 +-5.42678676818203e-01 -5.15422166053646e-01 -4.88573915719259e-01 -4.62147992129790e-01 +-4.36157517831115e-01 -4.10614672278135e-01 -3.85530694667822e-01 -3.60915888823567e-01 +-3.36779630027448e-01 -3.13130373698172e-01 -2.89975665814002e-01 -2.67322154982083e-01 +-2.45175606057941e-01 -2.23540915221664e-01 -2.02422126420224e-01 -1.81822449088468e-01 +-1.61744277064539e-01 -1.42189208618699e-01 -1.23158067517739e-01 -1.04650925050325e-01 +-8.66671229416063e-02 -6.92052970883037e-02 -5.22634020481065e-02 -3.58387362196595e-02 +-1.99279676515483e-02 -4.52716042058478e-03 1.03681984787196e-02 2.47631717903278e-02 +3.86633442543283e-02 5.20747945212186e-02 6.50040667775554e-02 7.74581421375728e-02 +8.94444098554725e-02 1.00970638413441e-01 1.12044946540945e-01 1.22675774221578e-01 +1.32871853744528e-01 1.42642180858618e-01 1.51995986087866e-01 1.60942706268408e-01 +1.69491956367573e-01 1.77653501646720e-01 1.85437230230137e-01 1.92853126142870e-01 +1.99911242880654e-01 2.06621677575226e-01 2.12994545818096e-01 2.19039957205353e-01 +2.24767991665246e-01 2.30188676629046e-01 2.35311965104127e-01 2.40147714706176e-01 +2.44705667705052e-01 2.48995432135944e-01 2.53026464024264e-01 2.56808050769000e-01 +2.60349295725188e-01 2.63659104021676e-01 2.66746169645511e-01 2.69618963819078e-01 +2.72285724690576e-01 2.74754448352653e-01 2.77032881197908e-01 2.79128513613763e-01 +2.81048575012721e-01 2.82800030187540e-01 2.84389576974206e-01 2.85823645198993e-01 +2.87108396879307e-01 2.88249727641547e-01 2.89253269312863e-01 2.90124393637596e-01 +2.90868217063276e-01 2.91489606535553e-01 2.91993186236168e-01 2.92383345193370e-01 +2.92664245689762e-01 2.92839832388776e-01 2.92913842097662e-01 2.92889814082081e-01 +2.92771100845312e-01 2.92560879283475e-01 2.92262162127306e-01 2.91877809580748e-01 +2.91410541067004e-01 2.90862946993745e-01 2.90237500450873e-01 2.89536568756526e-01 +2.88762424769997e-01 2.87917257893771e-01 2.87003184690975e-01 2.86022259049222e-01 +2.84976481826959e-01 2.83867809924018e-01 2.82698164724127e-01 2.81469439863464e-01 +2.80183508286032e-01 2.78842228553576e-01 2.77447450384831e-01 2.76001019406177e-01 +2.74504781103037e-01 2.72960583968700e-01 2.71370281854462e-01 2.69735735532108e-01 +2.68058813486715e-01 2.66341391964407e-01 2.64585354306111e-01 2.62792589604378e-01 +2.60964990725973e-01 2.59104451748067e-01 2.57212864860581e-01 2.55292116791310e-01 +2.53344084814044e-01 2.51370632402840e-01 2.49373604597943e-01 2.47354823150531e-01 +2.45316081514493e-01 2.43259139753856e-01 2.41185719434174e-01 2.39097498565267e-01 +2.36996106661157e-01 2.34883119980841e-01 2.32760057010791e-01 2.30628374246716e-01 +2.28489462328261e-01 2.26344642575969e-01 2.24195163975019e-01 2.22042200645079e-01 +2.19886849830048e-01 2.17730130435658e-01 2.15572982136819e-01 2.13416265070377e-01 +2.11260760122606e-01 2.09107169814339e-01 2.06956119780280e-01 2.04808160832720e-01 +2.02663771593681e-01 2.00523361673559e-01 1.98387275368556e-01 1.96255795843796e-01 +1.94129149763899e-01 1.92007512328155e-01 1.89891012663149e-01 1.87779739521996e-01 +1.85673747236087e-01 1.83573061862564e-01 1.81477687468664e-01 1.79387612492531e-01 +1.77302816119195e-01 1.75223274610128e-01 1.73148967525086e-01 1.71079883775873e-01 +1.69016027453186e-01 1.66957423369794e-01 1.64904122265946e-01 1.62856205626126e-01 +1.60813790059911e-01 1.58777031203878e-01 1.56746127106041e-01 1.54721321059271e-01 +1.52702903855385e-01 1.50691215437183e-01 1.48686645931414e-01 1.46689636051652e-01 +1.44700676866032e-01 1.42720308930929e-01 1.40749120797710e-01 1.38787746905710e-01 +1.36836864880440e-01 1.34897192261764e-01 1.32969482692203e-01 1.31054521600719e-01 +1.29153121422158e-01 1.27266116396961e-01 1.25394356999798e-01 1.23538704049314e-01 +1.21700022554256e-01 1.19879175353762e-01 1.18077016611605e-01 1.16294385225580e-01 +1.14532098214091e-01 1.12790944142217e-01 1.11071676649245e-01 1.09375008138715e-01 +1.07701603690540e-01 1.06052075252755e-01 1.04426976167811e-01 1.02826796085316e-01 +1.01251956309479e-01 9.97028056255792e-02 9.81796166452843e-02 9.66825827059437e-02 +9.52118153538097e-02 9.37673424358339e-02 9.23491068190740e-02 9.09569657510210e-02 +8.95906908682996e-02 8.82499688553083e-02 8.69344027484544e-02 8.56435138758237e-02 +8.43767444163900e-02 8.31334605573322e-02 8.19129562226953e-02 8.07144573415665e-02 +7.95371266192117e-02 7.83800687702265e-02 7.72423361687806e-02 7.61229348674971e-02 +7.50208309334327e-02 7.39349570470395e-02 7.28642193079516e-02 7.18075041898807e-02 +7.07636855859640e-02 6.97316318854518e-02 6.87102130227686e-02 6.76983074406588e-02 +6.66948089103391e-02 6.56986331533412e-02 6.47087242119711e-02 6.37240605180485e-02 +6.27436606127879e-02 6.17665884742807e-02 6.07919584130392e-02 5.98189395003971e-02 +5.88467594991953e-02 5.78747082710649e-02 5.69021406397198e-02 5.59284786949012e-02 +5.49532135269772e-02 5.39759063875797e-02 5.29961892770638e-02 5.20137649649033e-02 +5.10284064543656e-02 5.00399559078757e-02 4.90483230543491e-02 4.80534831043721e-02 +4.70554742034372e-02 4.60543944574042e-02 4.50503985679683e-02 4.40436941191164e-02 +4.30345375583070e-02 4.20232299184133e-02 4.10101123282902e-02 3.99955613611505e-02 +3.89799842707544e-02 3.79638141657278e-02 3.69475051721236e-02 3.59315276336306e-02 +3.49163633976445e-02 3.39025012337138e-02 3.28904324287601e-02 3.18806466008630e-02 +3.08736277704419e-02 2.98698507242875e-02 2.88697777042064e-02 2.78738554480345e-02 +2.68825126065259e-02 2.58961575551485e-02 2.49151766151819e-02 2.39399326937584e-02 +2.29707643476680e-02 2.20079852709025e-02 2.10518842011011e-02 2.01027252353376e-02 +1.91607485410737e-02 1.82261714436871e-02 1.72991898677749e-02 1.63799801054853e-02 +1.54687008815045e-02 1.45654956810154e-02 1.36704953040378e-02 1.27838206070270e-02 +1.19055853905302e-02 1.10358993900645e-02 1.01748713261949e-02 9.32261196912786e-03 +8.47923717290266e-03 7.64487083457118e-03 6.81964773451563e-03 6.00371621530619e-03 +5.19724065821133e-03 4.40040371864202e-03 3.61340828439205e-03 2.83647912353203e-03 +2.06986419216609e-03 1.31383557596085e-03 5.68690043348983e-04 -1.65250807446240e-04 +-8.87640820939912e-04 -1.59810998521771e-03 -2.29626556505322e-03 -2.98169366646154e-03 +-3.65396122698077e-03 -4.31261842113582e-03 -4.95720146577515e-03 -5.58723580534233e-03 +-6.20223965265313e-03 -6.80172785652039e-03 -7.38521606355442e-03 -7.95222513778782e-03 +-8.50228579841223e-03 -9.03494343294828e-03 -9.54976304059152e-03 -1.00463342583501e-02 +-1.05242764209145e-02 -1.09832436040021e-02 -1.14229296002130e-02 -1.18430727762410e-02 +-1.22434607605799e-02 -1.26239349116823e-02 -1.29843945178450e-02 -1.33248006818961e-02 +-1.36451798460483e-02 -1.39456269150195e-02 -1.42263079386988e-02 -1.44874623192160e-02 +-1.47294045112170e-02 -1.49525251884477e-02 -1.51572918543239e-02 -1.53442488790065e-02 +-1.55140169505529e-02 -1.56672919329202e-02 -1.58048431289234e-02 -1.59275109516359e-02 +-1.60362040131144e-02 -1.61318956446932e-02 -1.62156198683533e-02 -1.62884668438037e-02 +-1.63515778208405e-02 -1.64061396312554e-02 -1.64533787589698e-02 -1.64945550311665e-02 +-1.65309549769086e-02 -1.65638849030565e-02 -1.65946637401769e-02 -1.66246157135599e-02 +-1.66550628963885e-02 -1.66873177035331e-02 -1.67226753853356e-02 -1.67624065811241e-02 +-1.68077499920155e-02 -1.68599052318559e-02 -1.69200259139031e-02 -1.69892130290802e-02 +-1.70685086693514e-02 -1.71588901469989e-02 -1.72612645573427e-02 -1.73764638287724e-02 +-1.75052402998845e-02 -1.76482628590678e-02 -1.78061136771138e-02 -1.79792855583691e-02 +-1.81681799306539e-02 -1.83731054886846e-02 -1.85942775001196e-02 -1.88318177776332e-02 +-1.90857553146700e-02 -1.93560275768169e-02 -1.96424824350508e-02 -1.99448807215949e-02 +-2.02628993837445e-02 -2.05961352058798e-02 -2.09441090650062e-02 -2.13062706806078e-02 +-2.16820038153841e-02 -2.20706318796440e-02 -2.24714238887349e-02 -2.28836007199786e-02 +-2.33063416131441e-02 -2.37387908565697e-02 -2.41800645996496e-02 -2.46292577315428e-02 +-2.50854507656570e-02 -2.55477166696979e-02 -2.60151275818662e-02 -2.64867613551057e-02 +-2.69617078731722e-02 -2.74390750846419e-02 -2.79179947038413e-02 -2.83976275309826e-02 +-2.88771683475338e-02 -2.93558503469804e-02 -2.98329490656311e-02 -3.03077857829166e-02 +-3.07797303657016e-02 -3.12482035364273e-02 -3.17126785503591e-02 -3.21726822728021e-02 +-3.26277956528047e-02 -3.30776535955354e-02 -3.35219442411628e-02 -3.39604076636054e-02 +-3.43928340079402e-02 -3.48190610904648e-02 -3.52389714904058e-02 -3.56524891669503e-02 +-3.60595756396662e-02 -3.64602257743732e-02 -3.68544632201386e-02 -3.72423355462379e-02 +-3.76239091306296e-02 -3.79992638537069e-02 -3.83684876528017e-02 -3.87316709941002e-02 +-3.90889013192859e-02 -3.94402575243368e-02 -3.97858045274855e-02 -4.01255879823901e-02 +-4.04596291910910e-02 -4.07879202693322e-02 -4.11104196143593e-02 -4.14270477223569e-02 +-4.17376833993148e-02 -4.20421604053293e-02 -4.23402645681920e-02 -4.26317313976488e-02 +-4.29162442269323e-02 -4.31934329031779e-02 -4.34628730431223e-02 -4.37240858651406e-02 +-4.39765386032400e-02 -4.42196455031294e-02 -4.44527693950215e-02 -4.46752238323850e-02 +-4.48862757805649e-02 -4.50851488340198e-02 -4.52710269359867e-02 -4.54430585696692e-02 +-4.56003613856492e-02 -4.57420272261403e-02 -4.58671275030016e-02 -4.59747188831268e-02 +-4.60638492319538e-02 -4.61335637634180e-02 -4.61829113427237e-02 -4.62109508868248e-02 +-4.62167578065021e-02 -4.61994304333597e-02 -4.61580963749166e-02 -4.60919187411626e-02 +-4.60001021863780e-02 -4.58818987105276e-02 -4.57366131648937e-02 -4.55636084065003e-02 +-4.53623100448349e-02 -4.51322107218147e-02 -4.48728738610731e-02 -4.45839368145075e-02 +-4.42651133214156e-02 -4.39161951771452e-02 -4.35370529825389e-02 -4.31276358112538e-02 +-4.26879695882932e-02 -4.22181539196097e-02 -4.17183570505362e-02 -4.11888085632383e-02 +-4.06297893563317e-02 -4.00416183929887e-02 -3.94246356714632e-02 -3.87791808831530e-02 +-3.81055673022611e-02 -3.74040506259845e-02 -3.66747927852643e-02 -3.59178212022772e-02 +-3.51329846044509e-02 -3.43199073251426e-02 -3.34779450167392e-02 -3.26061458323695e-02 +-3.17032223209197e-02 -3.07675404086511e-02 -2.97971327496819e-02 -2.87897442209469e-02 +-2.77429171963483e-02 -2.66541232404488e-02 -2.55209458251452e-02 -2.43413154712108e-02 +-2.31137943352935e-02 -2.18379018306080e-02 -2.05144666863848e-02 -1.91459843993785e-02 +-1.77369529618583e-02 -1.62941548440407e-02 -1.48268503019283e-02 -1.33468469719260e-02 +-1.18684140457945e-02 -1.04080164656595e-02 -8.98385553291522e-03 -7.61521662809696e-03 +-6.32164145356021e-03 -5.12195995635128e-03 -4.03323414367349e-03 -3.06968047121063e-03 +-2.24164750651473e-03 -1.55472956176733e-03 -1.00909387271133e-03 -5.99088285961565e-04 +-3.13178725516652e-04 -1.34242188712655e-04 -4.02136594909494e-05 -5.05665966172842e-06 +0.00000000000000e+00 + Type L N + 0 0 2 +-6.51307745817109e-01 -6.51367530447908e-01 -6.51546522385675e-01 -6.51843638199831e-01 +-6.52257080265325e-01 -6.52784348837116e-01 -6.53422258826225e-01 -6.54166961150346e-01 +-6.55013968497512e-01 -6.55958185308066e-01 -6.56993941748538e-01 -6.58115031421195e-01 +-6.59314752525231e-01 -6.60585952160078e-01 -6.61921073438296e-01 -6.63312205055127e-01 +-6.64751132944262e-01 -6.66229393634798e-01 -6.67738328912829e-01 -6.69269141382765e-01 +-6.70812950518299e-01 -6.72360848791073e-01 -6.73903957466406e-01 -6.75433481660026e-01 +-6.76940764257527e-01 -6.78417338309110e-01 -6.79854977526062e-01 -6.81245744522182e-01 +-6.82582036462878e-01 -6.83856627806692e-01 -6.85062709848543e-01 -6.86193926800491e-01 +-6.87244408174517e-01 -6.88208797261993e-01 -6.89082275536298e-01 -6.89860582837926e-01 +-6.90540033235255e-01 -6.91117526488624e-01 -6.91590555080118e-01 -6.91957206806372e-01 +-6.92216162966312e-01 -6.92366692209903e-01 -6.92408640147293e-01 -6.92342414850088e-01 +-6.92168968407449e-01 -6.91889774729159e-01 -6.91506803815453e-01 -6.91022492739098e-01 +-6.90439713608597e-01 -6.89761738802574e-01 -6.88992203783859e-01 -6.88135067817770e-01 +-6.87194572932132e-01 -6.86175201466885e-01 -6.85081632568428e-01 -6.83918697988220e-01 +-6.82691337546551e-01 -6.81404554620831e-01 -6.80063372013226e-01 -6.78672788545132e-01 +-6.77237736715830e-01 -6.75763041749852e-01 -6.74253382342265e-01 -6.72713253393315e-01 +-6.71146931003960e-01 -6.69558439981808e-01 -6.67951524083191e-01 -6.66329619191688e-01 +-6.64695829606589e-01 -6.63052907586894e-01 -6.61403236267568e-01 -6.59748816035317e-01 +-6.58091254421284e-01 -6.56431759538052e-01 -6.54771137058513e-01 -6.53109790704611e-01 +-6.51447726185149e-01 -6.49784558493828e-01 -6.48119522451768e-01 -6.46451486353177e-01 +-6.44778968548736e-01 -6.43100156778915e-01 -6.41412930048905e-01 -6.39714882818426e-01 +-6.38003351263359e-01 -6.36275441352158e-01 -6.34528058468360e-01 -6.32757938301395e-01 +-6.30961678721181e-01 -6.29135772347926e-01 -6.27276639526950e-01 -6.25380661419314e-01 +-6.23444212922470e-01 -6.21463695141036e-01 -6.19435567136023e-01 -6.17356376691287e-01 +-6.15222789848658e-01 -6.13031618977713e-01 -6.10779849162692e-01 -6.08464662707132e-01 +-6.06083461576433e-01 -6.03633887619513e-01 -6.01113840432723e-01 -5.98521492752132e-01 +-5.95855303283919e-01 -5.93114026906647e-01 -5.90296722203560e-01 -5.87402756307347e-01 +-5.84431807063989e-01 -5.81383862546026e-01 -5.78259217968736e-01 -5.75058470084988e-01 +-5.71782509155874e-01 -5.68432508614327e-01 -5.65009912557699e-01 -5.61516421222557e-01 +-5.57953974610578e-01 -5.54324734448261e-01 -5.50631064675250e-01 -5.46875510666017e-01 +-5.43060777397786e-01 -5.39189706783490e-01 -5.35265254392449e-01 -5.31290465783279e-01 +-5.27268452673155e-01 -5.23202369165266e-01 -5.19095388251855e-01 -5.14950678803948e-01 +-5.10771383250665e-01 -5.06560596141053e-01 -5.02321343769793e-01 -4.98056565034989e-01 +-4.93769093681747e-01 -4.89461642069540e-01 -4.85136786584525e-01 -4.80796954800320e-01 +-4.76444414472318e-01 -4.72081264431677e-01 -4.67709427425830e-01 -4.63330644932868e-01 +-4.58946473957748e-01 -4.54558285798965e-01 -4.50167266755527e-01 -4.45774420725701e-01 +-4.41380573631428e-01 -4.36986379585597e-01 -4.32592328703652e-01 -4.28198756446480e-01 +-4.23805854368315e-01 -4.19413682131492e-01 -4.15022180639596e-01 -4.10631186131713e-01 +-4.06240445073399e-01 -4.01849629674513e-01 -3.97458353860348e-01 -3.93066189520486e-01 +-3.88672682859593e-01 -3.84277370675811e-01 -3.79879796395566e-01 -3.75479525698447e-01 +-3.71076161572126e-01 -3.66669358645208e-01 -3.62258836655143e-01 -3.57844392918908e-01 +-3.53425913685917e-01 -3.49003384265435e-01 -3.44576897834468e-01 -3.40146662846658e-01 +-3.35713008977772e-01 -3.31276391559068e-01 -3.26837394465665e-01 -3.22396731443185e-01 +-3.17955245872008e-01 -3.13513908984398e-01 -3.09073816565393e-01 -3.04636184183534e-01 +-3.00202341012015e-01 -2.95773722314719e-01 -2.91351860684518e-01 -2.86938376133178e-01 +-2.82534965143115e-01 -2.78143388800879e-01 -2.73765460140675e-01 -2.69403030833279e-01 +-2.65057977361335e-01 -2.60732186826245e-01 -2.56427542534562e-01 -2.52145909513034e-01 +-2.47889120101181e-01 -2.43658959768545e-01 -2.39457153300567e-01 -2.35285351492435e-01 +-2.31145118484313e-01 -2.27037919864144e-01 -2.22965111655758e-01 -2.18927930300527e-01 +-2.14927483730224e-01 -2.10964743617352e-01 -2.07040538876943e-01 -2.03155550481031e-01 +-1.99310307633546e-01 -1.95505185339676e-01 -1.91740403389696e-01 -1.88016026763138e-01 +-1.84331967445112e-01 -1.80687987632661e-01 -1.77083704295411e-01 -1.73518595041610e-01 +-1.69992005228051e-01 -1.66503156240440e-01 -1.63051154859615e-01 -1.59635003618848e-01 +-1.56253612048170e-01 -1.52905808693536e-01 -1.49590353791641e-01 -1.46305952475378e-01 +-1.43051268380454e-01 -1.39824937520389e-01 -1.36625582295256e-01 -1.33451825498936e-01 +-1.30302304190403e-01 -1.27175683296626e-01 -1.24070668818050e-01 -1.20986020512175e-01 +-1.17920563936585e-01 -1.14873201739656e-01 -1.11842924095181e-01 -1.08828818186050e-01 +-1.05830076651978e-01 -1.02846004926819e-01 -9.98760274022880e-02 -9.69196923667014e-02 +-9.39766756795791e-02 -9.10467831555008e-02 -8.81299516433339e-02 -8.52262487997278e-02 +-8.23358715685022e-02 -7.94591433900698e-02 -7.65965101772493e-02 -7.37485351056106e-02 +-7.09158922777253e-02 -6.80993593312784e-02 -6.52998090708396e-02 -6.25182002120686e-02 +-5.97555673352070e-02 -5.70130101517565e-02 -5.42916821942539e-02 -5.15927790439261e-02 +-4.89175262147355e-02 -4.62671668148632e-02 -4.36429491080019e-02 -4.10461140969544e-02 +-3.84778832509412e-02 -3.59394464957446e-02 -3.34319505823870e-02 -3.09564879454780e-02 +-2.85140861567571e-02 -2.61056980727202e-02 -2.37321927676678e-02 -2.13943473350996e-02 +-1.90928396311848e-02 -1.68282420242100e-02 -1.46010162034621e-02 -1.24115090901303e-02 +-1.02599498815694e-02 -8.14644824878461e-03 -6.07099369538893e-03 -4.03345607468196e-03 +-2.03358724996642e-03 -7.10238719464840e-05 1.85470876392298e-03 3.74419182778739e-03 +5.59810709109202e-03 7.41723015461975e-03 9.20242284449842e-03 1.09546248596223e-02 +1.26748447608860e-02 1.43641503986159e-02 1.60236588795978e-02 1.76545261790431e-02 +1.92579365057218e-02 2.08350915302624e-02 2.23871995872842e-02 2.39154649615697e-02 +2.54210773669308e-02 2.69052017237778e-02 2.83689683377034e-02 2.98134635766836e-02 +3.12397211388350e-02 3.26487139960926e-02 3.40413470917823e-02 3.54184508619065e-02 +3.67807756411471e-02 3.81289870051991e-02 3.94636620911645e-02 4.07852869274919e-02 +4.20942547944126e-02 4.33908656251240e-02 4.46753264472130e-02 4.59477528530977e-02 +4.72081714777009e-02 4.84565234512746e-02 4.96926687853434e-02 5.09163916402628e-02 +5.21274064139510e-02 5.33253645830699e-02 5.45098622203551e-02 5.56804481050332e-02 +5.68366323373402e-02 5.79778953631655e-02 5.91036973108111e-02 6.02134875388316e-02 +6.13067142919118e-02 6.23828343607896e-02 6.34413226423399e-02 6.44816814970712e-02 +6.55034498034888e-02 6.65062116119699e-02 6.74896043049740e-02 6.84533261755265e-02 +6.93971433419045e-02 7.03208959232644e-02 7.12245034085174e-02 7.21079691589888e-02 +7.29713839942297e-02 7.38149288196676e-02 7.46388762645276e-02 7.54435913084888e-02 +7.62295308858016e-02 7.69972424659505e-02 7.77473616203117e-02 7.84806085945261e-02 +7.91977839163659e-02 7.98997630786523e-02 8.05874903461469e-02 8.12619717442215e-02 +8.19242672954244e-02 8.25754825777074e-02 8.32167596850068e-02 8.38492676769782e-02 +8.44741926099674e-02 8.50927272456375e-02 8.57060605370871e-02 8.63153669947103e-02 +8.69217960354642e-02 8.75264614196128e-02 8.81304308783829e-02 8.87347160343378e-02 +8.93402627136387e-02 8.99479417457588e-02 9.05585403416840e-02 9.11727541362106e-02 +9.17911799736901e-02 9.24143095095603e-02 9.30425236922574e-02 9.36760881817719e-02 +9.43151497522059e-02 9.49597337163536e-02 9.56097424006122e-02 9.62649546885606e-02 +9.69250266413960e-02 9.75894931932029e-02 9.82577709088541e-02 9.89291617822656e-02 +9.96028580429249e-02 1.00277947929075e-01 1.00953422376866e-01 1.01628182566166e-01 +1.02301048255734e-01 1.02970766833096e-01 1.03636022997832e-01 1.04295448991187e-01 +1.04947635279889e-01 1.05591141598025e-01 1.06224508247622e-01 1.06846267556419e-01 +1.07454955390088e-01 1.08049122615924e-01 1.08627346415809e-01 1.09188241347967e-01 +1.09730470059751e-01 1.10252753557291e-01 1.10753880942401e-01 1.11232718532451e-01 +1.11688218285108e-01 1.12119425456691e-01 1.12525485430461e-01 1.12905649659253e-01 +1.13259280675510e-01 1.13585856130786e-01 1.13884971836187e-01 1.14156343784780e-01 +1.14399809146762e-01 1.14615326237961e-01 1.14802973471936e-01 1.14962947315581e-01 +1.15095559277411e-01 1.15201231966767e-01 1.15280494270723e-01 1.15333975703597e-01 +1.15362399991439e-01 1.15366577960739e-01 1.15347399806742e-01 1.15305826822084e-01 +1.15242882671030e-01 1.15159644298255e-01 1.15057232563863e-01 1.14936802698202e-01 +1.14799534670927e-01 1.14646623568737e-01 1.14479270075219e-01 1.14298671144344e-01 +1.14106010956334e-01 1.13902452240950e-01 1.13689128048734e-01 1.13467134045433e-01 +1.13237521398799e-01 1.13001290320292e-01 1.12759384316887e-01 1.12512685200394e-01 +1.12262008893451e-01 1.12008102062730e-01 1.11751639601041e-01 1.11493222970927e-01 +1.11233379413270e-01 1.10972562015231e-01 1.10711150622858e-01 1.10449453574871e-01 +1.10187710225520e-01 1.09926094216307e-01 1.09664717448548e-01 1.09403634701599e-01 +1.09142848834937e-01 1.08882316506347e-01 1.08621954333275e-01 1.08361645419938e-01 +1.08101246169212e-01 1.07840593295545e-01 1.07579510953278e-01 1.07317817893818e-01 +1.07055334565039e-01 1.06791890067193e-01 1.06527328881343e-01 1.06261517289036e-01 +1.05994349405433e-01 1.05725752752467e-01 1.05455693303705e-01 1.05184179938482e-01 +1.04911268249338e-01 1.04637063653944e-01 1.04361723770333e-01 1.04085460022346e-01 +1.03808538450647e-01 1.03531279713440e-01 1.03254058269893e-01 1.02977300748357e-01 +1.02701483510469e-01 1.02427129431175e-01 1.02154803923510e-01 1.01885110245426e-01 +1.01618684134137e-01 1.01356187821131e-01 1.01098303488181e-01 1.00845726231264e-01 +1.00599156605211e-01 1.00359292827089e-01 1.00126822720708e-01 9.99024154882072e-02 +9.96867133973637e-02 9.94803234750398e-02 9.92838092980343e-02 9.90976829725217e-02 +9.89223973922198e-02 9.87583388634573e-02 9.86058201824119e-02 9.84650742459937e-02 +9.83362482731864e-02 9.82193987081661e-02 9.81144868702683e-02 9.80213754088878e-02 +9.79398256137788e-02 9.78694956230253e-02 9.78099395622513e-02 9.77606076395321e-02 +9.77208472110367e-02 9.76899048227594e-02 9.76669292238967e-02 9.76509753375776e-02 +9.76410091648653e-02 9.76359135883125e-02 9.76344950319636e-02 9.76354909256560e-02 +9.76375779128676e-02 9.76393807332736e-02 9.76394817037012e-02 9.76364307143826e-02 +9.76287556513684e-02 9.76149731507559e-02 9.75935995860454e-02 9.75631621865334e-02 +9.75222101822026e-02 9.74693258691295e-02 9.74031354889934e-02 9.73223198168798e-02 +9.72256243532016e-02 9.71118690182174e-02 9.69799572512891e-02 9.68288844216645e-02 +9.66577454631453e-02 9.64657416514787e-02 9.62521864506250e-02 9.60165103621355e-02 +9.57582647206742e-02 9.54771243881233e-02 9.51728893086787e-02 9.48454848977376e-02 +9.44949612481466e-02 9.41214911483904e-02 9.37253669184689e-02 9.33069960804283e-02 +9.28668958916692e-02 9.24056867801531e-02 9.19240847313625e-02 9.14228926872282e-02 +9.09029910271371e-02 9.03653272104585e-02 8.98109046687088e-02 8.92407710434027e-02 +8.86560058727574e-02 8.80577078366368e-02 8.74469816743881e-02 8.68249248944699e-02 +8.61926143979601e-02 8.55510931401032e-02 8.49013569549944e-02 8.42443416682446e-02 +8.35809106210214e-02 8.29118427261364e-02 8.22378211728455e-02 8.15594228916061e-02 +8.08771088831130e-02 8.01912155072799e-02 7.95019468171499e-02 7.88093680095525e-02 +7.81134000480081e-02 7.74138154929963e-02 7.67102355489950e-02 7.60021283050202e-02 +7.52888081036777e-02 7.45694359204920e-02 7.38430205676773e-02 7.31084204516411e-02 +7.23643455087103e-02 7.16093588171669e-02 7.08418772358790e-02 7.00601702540268e-02 +6.92623560609425e-02 6.84463936749652e-02 6.76100698293517e-02 6.67509792362248e-02 +6.58664968826753e-02 6.49537412145539e-02 6.40095275008771e-02 6.30303114173830e-02 +6.20121240098590e-02 6.09505007481168e-02 5.98404093785160e-02 5.86761836926671e-02 +5.74514730449842e-02 5.61592202725864e-02 5.47916832935157e-02 5.33405176732593e-02 +5.17969383543664e-02 5.01519779843720e-02 4.83968563036653e-02 4.65234694059992e-02 +4.45249990872653e-02 4.23966309761106e-02 4.01363561109140e-02 3.77458149747633e-02 +3.52311270930327e-02 3.26036349452488e-02 2.98804802618367e-02 2.70849259804234e-02 +2.42463402491079e-02 2.13997713885526e-02 1.85850653117327e-02 1.58455090676824e-02 +1.32260241369950e-02 1.07709777578308e-02 8.52172565946202e-03 6.51404012475303e-03 +4.77560808692159e-03 3.32380024616015e-03 2.16391038410493e-03 1.28804235285568e-03 +6.74781028999173e-04 2.89725641712614e-04 8.68943223769642e-05 1.09342380827488e-05 +0.00000000000000e+00 + Type L N + 0 0 3 +6.26059418710182e-01 6.24573749217180e-01 6.20126819586662e-01 6.12748790992946e-01 +6.02489681420810e-01 5.89418991796047e-01 5.73625186729015e-01 5.55215033990009e-01 +5.34312807954666e-01 5.11059363331327e-01 4.85611086505878e-01 4.58138732801536e-01 +4.28826158844569e-01 3.97868960045213e-01 3.65473023937647e-01 3.31853010770540e-01 +2.97230773292384e-01 2.61833728130800e-01 2.25893191518567e-01 1.89642692367581e-01 +1.53316275834951e-01 1.17146810559818e-01 8.13643126787215e-02 4.61942995470603e-02 +1.18561858125117e-02 -2.14382658997285e-02 -5.34864279144319e-02 -8.40962128480866e-02 +-1.13087390835080e-01 -1.40292808858523e-01 -1.65559503233713e-01 -1.88749697189549e-01 +-2.09741676452583e-01 -2.28430536751444e-01 -2.44728798217217e-01 -2.58566882750516e-01 +-2.69893451546441e-01 -2.78675601107412e-01 -2.84898917220951e-01 -2.88567387523488e-01 +-2.89703174404870e-01 -2.88346251121741e-01 -2.84553905069215e-01 -2.78400113205956e-01 +-2.69974795623139e-01 -2.59382954189478e-01 -2.46743704082487e-01 -2.32189206824068e-01 +-2.15863514170059e-01 -1.97921332853105e-01 -1.78526720739852e-01 -1.57851725434839e-01 +-1.36074976739378e-01 -1.13380244652251e-01 -8.99549747793980e-02 -6.59888130984056e-02 +-4.16721320043206e-02 -1.71945694431487e-02 7.25640727713909e-03 3.14969017206074e-02 +5.53479417280847e-02 7.86367756099128e-02 1.01198101317806e-01 1.22875219438506e-01 +1.43521101574486e-01 1.62999366463854e-01 1.81185157036854e-01 1.97965912499157e-01 +2.13242030470137e-01 2.26927415171547e-01 2.38949908657274e-01 2.49251603084793e-01 +2.57789033046223e-01 2.64533247993179e-01 2.69469765794918e-01 2.72598409456739e-01 +2.73933029985437e-01 2.73501119312817e-01 2.71343318071039e-01 2.67512823844707e-01 +2.62074706299713e-01 2.55105136301301e-01 2.46690536776622e-01 2.36926663646862e-01 +2.25917625646382e-01 2.13774852255840e-01 2.00616019303423e-01 1.86563942027354e-01 +1.71745445545576e-01 1.56290222742419e-01 1.40329689558566e-01 1.23995847560136e-01 +1.07420163467236e-01 9.07324750448339e-02 7.40599324015869e-02 5.75259833102565e-02 +4.12494106606053e-02 2.53434295870781e-02 9.91485118563510e-03 -4.93668094782231e-03 +-1.91193758538972e-02 -3.25498972865868e-02 -4.51538787978706e-02 -5.68663487250531e-02 +-6.76320628201833e-02 -7.74057431169122e-02 -8.61522224866802e-02 -9.38464951885532e-02 +-1.00473674555803e-01 -1.06028859780910e-01 -1.10516914551419e-01 -1.13952161045992e-01 +-1.16357993515514e-01 -1.17766416342986e-01 -1.18217512092513e-01 -1.17758845616418e-01 +-1.16444810786948e-01 -1.14335926849758e-01 -1.11498091759302e-01 -1.08001800146443e-01 +-1.03921333786068e-01 -9.93339325750761e-02 -9.43189540985425e-02 -8.89570298541218e-02 +-8.33292261231936e-02 -7.75162173228254e-02 -7.15974794478655e-02 -6.56505109201132e-02 +-5.97500878049548e-02 -5.39675599388710e-02 -4.83701940386830e-02 -4.30205693400212e-02 +-3.79760307434109e-02 -3.32882038378433e-02 -2.90025755294195e-02 -2.51581433329735e-02 +-2.17871356940568e-02 -1.89148050042129e-02 -1.65592942598879e-02 -1.47315776027592e-02 +-1.34354742718157e-02 -1.26677348032766e-02 -1.24181976380441e-02 -1.26700136459734e-02 +-1.33999354556593e-02 -1.45786678949868e-02 -1.61712753047673e-02 -1.81376409919966e-02 +-2.04329736426457e-02 -2.30083551223645e-02 -2.58113237583628e-02 -2.87864869207371e-02 +-3.18761565082796e-02 -3.50210007937848e-02 -3.81607059978428e-02 -4.12346409381605e-02 +-4.41825181439765e-02 -4.69450449292972e-02 -4.94645580856100e-02 -5.16856360791714e-02 +-5.35556829201405e-02 -5.50254782053773e-02 -5.60496882210709e-02 -5.65873334211721e-02 +-5.66022080683748e-02 -5.60632483307376e-02 -5.49448456651684e-02 -5.32271028817017e-02 +-5.08960308655814e-02 -4.79436845313961e-02 -4.43682371888345e-02 -4.01739931074767e-02 +-3.53713386726895e-02 -2.99766331196460e-02 -2.40120404134695e-02 -1.75053044034516e-02 +-1.04894699141917e-02 -3.00255294134070e-03 4.91283641121240e-03 1.32099141852075e-02 +2.18381815578778e-02 3.07439177719959e-02 3.98707019180435e-02 4.91599582404895e-02 +5.85515194534557e-02 6.79842024192779e-02 7.73963904675167e-02 8.67266166122048e-02 +9.59141419606884e-02 1.04899523698702e-01 1.13625167180664e-01 1.22035856850833e-01 +1.30079260967143e-01 1.37706405392466e-01 1.44872112054849e-01 1.51535398054964e-01 +1.57659831812114e-01 1.63213843084818e-01 1.68170984174375e-01 1.72510140114544e-01 +1.76215686163029e-01 1.79277591435360e-01 1.81691468054403e-01 1.83458565723129e-01 +1.84585712160066e-01 1.85085200360286e-01 1.84974624155107e-01 1.84276664036210e-01 +1.83018825679357e-01 1.81233134046004e-01 1.78955786352265e-01 1.76226767571851e-01 +1.73089432477618e-01 1.69590058523744e-01 1.65777374123556e-01 1.61702067085159e-01 +1.57416278126368e-01 1.52973084500820e-01 1.48425978827560e-01 1.43828348227280e-01 +1.39232958829015e-01 1.34691450623123e-01 1.30253847500154e-01 1.25968087133212e-01 +1.21879575134777e-01 1.18030767651194e-01 1.14460786251048e-01 1.11205068621468e-01 +1.08295058212051e-01 1.05757935563896e-01 1.03616393634543e-01 1.01888458983897e-01 +1.00587360224652e-01 9.97214446688688e-02 9.92941436244270e-02 9.93039863159759e-02 +9.97446619291281e-02 1.00605128808940e-01 1.01869769388585e-01 1.03518588985802e-01 +1.05527456187504e-01 1.07868382150828e-01 1.10509835785366e-01 1.13417091450034e-01 +1.16552605501721e-01 1.19876417774394e-01 1.23346573849135e-01 1.26919563798982e-01 +1.30550772959860e-01 1.34194940190258e-01 1.37806619039241e-01 1.41340637244246e-01 +1.44752550027138e-01 1.47999082748274e-01 1.51038558612483e-01 1.53831307296954e-01 +1.56340050586102e-01 1.58530261351424e-01 1.60370492501300e-01 1.61832672844289e-01 +1.62892367156564e-01 1.63528998115292e-01 1.63726028152281e-01 1.63471099691342e-01 +1.62756132654640e-01 1.61577378553931e-01 1.59935430917157e-01 1.57835192235521e-01 +1.55285798046568e-01 1.52300499190471e-01 1.48896503685885e-01 1.45094780064178e-01 +1.40919824373065e-01 1.36399393408651e-01 1.31564207055891e-01 1.26447622908017e-01 +1.21085286593140e-01 1.15514761458282e-01 1.09775141446263e-01 1.03906651146310e-01 +9.79502371051287e-02 9.19471545495120e-02 8.59385536944709e-02 7.99650697922724e-02 +7.40664210180161e-02 6.82810181870506e-02 6.26455901603403e-02 5.71948286166915e-02 +5.19610556581465e-02 4.69739174687040e-02 4.22601069694250e-02 3.78431181082267e-02 +3.37430340926782e-02 2.99763515231786e-02 2.65558420146946e-02 2.34904525120862e-02 +2.07852451107491e-02 1.84413767944536e-02 1.64561191001678e-02 1.48229173194932e-02 +1.35314884512231e-02 1.25679567346111e-02 1.19150252208469e-02 1.15521814852809e-02 +1.14559352483335e-02 1.16000853621352e-02 1.19560133354478e-02 1.24930003146094e-02 +1.31785642149273e-02 1.39788135074448e-02 1.48588140125622e-02 1.57829649347616e-02 +1.67153802944615e-02 1.76202718723707e-02 1.84623297811054e-02 1.92070968160160e-02 +1.98213328133397e-02 2.02733653570302e-02 2.05334233250571e-02 2.05739499498956e-02 +2.03698922846444e-02 1.98989642129255e-02 1.91418804155018e-02 1.80825590061069e-02 +1.67082908705502e-02 1.50098740832009e-02 1.29817121304715e-02 1.06218750376576e-02 +7.93212287055543e-03 4.91789146221414e-03 1.58824059478796e-03 -2.04423475761439e-03 +-5.96352915002118e-03 -1.01503860184474e-02 -1.45824899851690e-02 -1.92346901139898e-02 +-2.40792518062861e-02 -2.90861347472528e-02 -3.42232940564404e-02 -3.94570015707694e-02 +-4.47521839931459e-02 -5.00727744782343e-02 -5.53820740993934e-02 -6.06431195496030e-02 +-6.58190533739629e-02 -7.08734930138142e-02 -7.57708949614192e-02 -8.04769103805302e-02 +-8.49587286401910e-02 -8.91854053368420e-02 -9.31281715408609e-02 -9.67607211974786e-02 +-1.00059473835469e-01 -1.03003809988682e-01 -1.05576277012473e-01 -1.07762763276502e-01 +-1.09552639034295e-01 -1.10938862605377e-01 -1.11918050853920e-01 -1.12490513305593e-01 +-1.12660249607902e-01 -1.12434910405158e-01 -1.11825722063685e-01 -1.10847376042510e-01 +-1.09517884055622e-01 -1.07858400511063e-01 -1.05893014035471e-01 -1.03648510198179e-01 +-1.01154107832146e-01 -9.84411716085881e-02 -9.55429037544122e-02 -9.24940180050262e-02 +-8.93303990571815e-02 -8.60887509262766e-02 -8.28062377178087e-02 -7.95201203931421e-02 +-7.62673931445655e-02 -7.30844229931440e-02 -7.00065961858242e-02 -6.70679748954178e-02 +-6.43009676196858e-02 -6.17360165346615e-02 -5.94013048840326e-02 -5.73224872827806e-02 +-5.55224455812294e-02 -5.40210726775491e-02 -5.28350863853388e-02 -5.19778751607302e-02 +-5.14593771738769e-02 -5.12859938755233e-02 -5.14605388641821e-02 -5.19822225068281e-02 +-5.28466724088677e-02 -5.40459894719199e-02 -5.55688389231802e-02 -5.74005753523529e-02 +-5.95234004538172e-02 -6.19165518469894e-02 -6.45565210394881e-02 -6.74172983088222e-02 +-7.04706420119298e-02 -7.36863695905025e-02 -7.70326673258617e-02 -8.04764157127051e-02 +-8.39835271677462e-02 -8.75192926687050e-02 -9.10487338327986e-02 -9.45369568920001e-02 +-9.79495050061850e-02 -1.01252705374186e-01 -1.04414007657248e-01 -1.07402310318369e-01 +-1.10188271603918e-01 -1.12744602049284e-01 -1.15046335576862e-01 -1.17071076470210e-01 +-1.18799219751004e-01 -1.20214142752569e-01 -1.21302365973132e-01 -1.22053681600212e-01 +-1.22461248421990e-01 -1.22521652178731e-01 -1.22234930753981e-01 -1.21604563958087e-01 +-1.20637428011823e-01 -1.19343715192299e-01 -1.17736819453171e-01 -1.15833189173082e-01 +-1.13652148516857e-01 -1.11215689209925e-01 -1.08548234824689e-01 -1.05676379955027e-01 +-1.02628606909143e-01 -9.94349827790422e-02 -9.61268399445897e-02 -9.27364432396727e-02 +-8.92966471453744e-02 -8.58405464793103e-02 -8.24011241199313e-02 -7.90108993391913e-02 +-7.57015803160815e-02 -7.25037243669402e-02 -6.94464093569190e-02 -6.65569196505747e-02 +-6.38604498198529e-02 -6.13798291557206e-02 -5.91352698271438e-02 -5.71441413000324e-02 +-5.54207733712248e-02 -5.39762898913843e-02 -5.28184749481380e-02 -5.19516729603445e-02 +-5.13767237986997e-02 -5.10909337005583e-02 -5.10880823912544e-02 -5.13584664635544e-02 +-5.18889787050937e-02 -5.26632227040778e-02 -5.36616617095644e-02 -5.48618003782679e-02 +-5.62383977077665e-02 -5.77637091401962e-02 -5.94077555235754e-02 -6.11386163431978e-02 +-6.29227443854299e-02 -6.47252987736222e-02 -6.65104931225462e-02 -6.82419553962165e-02 +-6.98830959252703e-02 -7.13974799461113e-02 -7.27492009654530e-02 -7.39032512314011e-02 +-7.48258856063807e-02 -7.54849751875184e-02 -7.58503471067328e-02 -7.58941070643460e-02 +-7.55909413061164e-02 -7.49183949421539e-02 -7.38571237258896e-02 -7.23911166599122e-02 +-7.05078870707411e-02 -6.81986300938440e-02 -6.54583448307184e-02 -6.22859197784449e-02 +-5.86841804855801e-02 -5.46598987534145e-02 -5.02237630745826e-02 -4.53903103785965e-02 +-4.01778195322167e-02 -3.46081674179818e-02 -2.87066487833644e-02 -2.25017614118033e-02 +-1.60249585124229e-02 -9.31037055359608e-03 -2.39449907392931e-03 4.68411471065782e-03 +1.18852434258856e-02 1.91673458756211e-02 2.64879546877917e-02 3.38040755946832e-02 +4.10725945404089e-02 4.82506887121334e-02 5.52962375324330e-02 6.21682296287179e-02 +6.88271618123136e-02 7.52354261543869e-02 8.13576813382881e-02 8.71612045970626e-02 +9.26162207099651e-02 9.76962047311760e-02 1.02378155355974e-01 1.06642836092061e-01 +1.10474981694491e-01 1.13863467638650e-01 1.16801440744559e-01 1.19286409423846e-01 +1.21320292395072e-01 1.22909425100085e-01 1.24064523450060e-01 1.24800604931351e-01 +1.25136867504266e-01 1.25096527128718e-01 1.24706615145625e-01 1.23997737128174e-01 +1.23003795188950e-01 1.21761676084058e-01 1.20310907790193e-01 1.18693287542064e-01 +1.16952484602621e-01 1.15133621294378e-01 1.13282836044413e-01 1.11446832385958e-01 +1.09672418014210e-01 1.08006038111375e-01 1.06493307234800e-01 1.05178544101547e-01 +1.04104313602271e-01 1.03310980336682e-01 1.02836277882202e-01 1.02714897887153e-01 +1.02978102920449e-01 1.03653366812012e-01 1.04764045982684e-01 1.06329084989409e-01 +1.08362759200821e-01 1.10874457168390e-01 1.13868504865918e-01 1.17344033529375e-01 +1.21294892330666e-01 1.25709606548545e-01 1.30571381237919e-01 1.35858149618966e-01 +1.41542664477295e-01 1.47592629748682e-01 1.53970868118603e-01 1.60635518866171e-01 +1.67540258310612e-01 1.74634533097278e-01 1.81863794268655e-01 1.89169717767585e-01 +1.96490394994631e-01 2.03760475711094e-01 2.10911245527736e-01 2.17870622191638e-01 +2.24563059753671e-01 2.30909358393927e-01 2.36826391052621e-01 2.42226776643537e-01 +2.47018553590994e-01 2.51104936016565e-01 2.54384266331469e-01 2.56750309204493e-01 +2.58093058437653e-01 2.58300244492816e-01 2.57259729694257e-01 2.54862953732580e-01 +2.51009538112141e-01 2.45613070839886e-01 2.38607971686510e-01 2.29957188301523e-01 +2.19660304586477e-01 2.07761471238294e-01 1.94356415756083e-01 1.79597680454854e-01 +1.63697197790994e-01 1.46925365128662e-01 1.29605941233015e-01 1.12106358232825e-01 +9.48234151124928e-02 7.81647656726053e-02 6.25270939763511e-02 4.82723304888033e-02 +3.57036433821694e-02 2.50431844806690e-02 1.64136309139356e-02 9.82541287679768e-03 +5.17115061888643e-03 2.22826326762283e-03 6.70008631236585e-04 8.44390994667928e-05 +0.00000000000000e+00 + Type L N + 0 1 0 +0.00000000000000e+00 -1.98706637920610e-02 -3.97188753389488e-02 -5.95222277555757e-02 +-7.92584047235096e-02 -9.89052253913386e-02 -1.18440688817795e-01 -1.37843017809056e-01 +-1.57090702004902e-01 -1.76162540072425e-01 -1.95037680870751e-01 -2.13695663455706e-01 +-2.32116455799501e-01 -2.50280492107270e-01 -2.68168708619641e-01 -2.85762577798392e-01 +-3.03044140800572e-01 -3.19996038155237e-01 -3.36601538566054e-01 -3.52844565772401e-01 +-3.68709723411247e-01 -3.84182317831859e-01 -3.99248378825253e-01 -4.13894678240229e-01 +-4.28108746467688e-01 -4.41878886784703e-01 -4.55194187559390e-01 -4.68044532327050e-01 +-4.80420607757087e-01 -4.92313909538998e-01 -5.03716746224058e-01 -5.14622241067255e-01 +-5.25024331921438e-01 -5.34917769242547e-01 -5.44298112271119e-01 -5.53161723461010e-01 +-5.61505761231366e-01 -5.69328171122373e-01 -5.76627675439110e-01 -5.83403761470990e-01 +-5.89656668376726e-01 -5.95387372826587e-01 -6.00597573494823e-01 -6.05289674495628e-01 +-6.09466767855859e-01 -6.13132615116945e-01 -6.16291628157069e-01 -6.18948849322779e-01 +-6.21109930956732e-01 -6.22781114405350e-01 -6.23969208586793e-01 -6.24681568195840e-01 +-6.24926071618187e-01 -6.24711098622184e-01 -6.24045507891376e-01 -6.22938614456289e-01 +-6.21400167078890e-01 -6.19440325637984e-01 -6.17069638558638e-01 -6.14299020323556e-01 +-6.11139729099198e-01 -6.07603344504443e-01 -6.03701745544736e-01 -5.99447088730020e-01 +-5.94851786390324e-01 -5.89928485198790e-01 -5.84690044908075e-01 -5.79149517302611e-01 +-5.73320125366154e-01 -5.67215242661312e-01 -5.60848372915523e-01 -5.54233129806091e-01 +-5.47383216935500e-01 -5.40312407987294e-01 -5.33034527052295e-01 -5.25563429114884e-01 +-5.17912980689468e-01 -5.10097040598023e-01 -5.02129440880845e-01 -4.94023967834221e-01 +-4.85794343170663e-01 -4.77454205299647e-01 -4.69017090729352e-01 -4.60496415592751e-01 +-4.51905457304421e-01 -4.43257336357717e-01 -4.34564998275323e-01 -4.25841195729642e-01 +-4.17098470853065e-01 -4.08349137761652e-01 -3.99605265319286e-01 -3.90878660172775e-01 +-3.82180850091666e-01 -3.73523067649660e-01 -3.64916234287445e-01 -3.56370944799410e-01 +-3.47897452289107e-01 -3.39505653640365e-01 -3.31205075552674e-01 -3.23004861190800e-01 +-3.14913757499477e-01 -3.06940103234551e-01 -2.99091817761987e-01 -2.91376390675750e-01 +-2.83800872284696e-01 -2.76371865017295e-01 -2.69095515791169e-01 -2.61977509392215e-01 +-2.55023062905301e-01 -2.48236921235420e-01 -2.41623353754579e-01 -2.35186152105704e-01 +-2.28928629190532e-01 -2.22853619363699e-01 -2.16963479850271e-01 -2.11260093398630e-01 +-2.05744872175129e-01 -2.00418762901161e-01 -1.95282253227448e-01 -1.90335379334315e-01 +-1.85577734740687e-01 -1.81008480298445e-01 -1.76626355342752e-01 -1.72429689962970e-01 +-1.68416418352949e-01 -1.64584093193808e-01 -1.60929901016839e-01 -1.57450678489006e-01 +-1.54142929558574e-01 -1.51002843393876e-01 -1.48026313044040e-01 -1.45208954746716e-01 +-1.42546127804546e-01 -1.40032954949245e-01 -1.37664343109797e-01 -1.35435004499445e-01 +-1.33339477934786e-01 -1.31372150299544e-01 -1.29527278065316e-01 -1.27799008781910e-01 +-1.26181402450734e-01 -1.24668452696089e-01 -1.23254107651131e-01 -1.21932290477679e-01 +-1.20696919441994e-01 -1.19541927471996e-01 -1.18461281125263e-01 -1.17448998901357e-01 +-1.16499168836658e-01 -1.15605965324848e-01 -1.14763665111438e-01 -1.13966662416276e-01 +-1.13209483143673e-01 -1.12486798145762e-01 -1.11793435510674e-01 -1.11124391853302e-01 +-1.10474842592536e-01 -1.09840151205013e-01 -1.09215877451515e-01 -1.08597784578099e-01 +-1.07981845499917e-01 -1.07364247981264e-01 -1.06741398830855e-01 -1.06109927136416e-01 +-1.05466686567525e-01 -1.04808756780128e-01 -1.04133443960255e-01 -1.03438280548199e-01 +-1.02721024187712e-01 -1.01979655947651e-01 -1.01212377865909e-01 -1.00417609867426e-01 +-9.95939861095644e-02 -9.87403508091237e-02 -9.78557536058288e-02 -9.69394445171981e-02 +-9.59908685393099e-02 -9.50096599471724e-02 -9.39956363471505e-02 -9.29487925322560e-02 +-9.18692941890726e-02 -9.07574715027058e-02 -8.96138127034401e-02 -8.84389575957836e-02 +-8.72336911073330e-02 -8.59989368914071e-02 -8.47357510137512e-02 -8.34453157498049e-02 +-8.21289335151327e-02 -8.07880209476453e-02 -7.94241031562575e-02 -7.80388081466585e-02 +-7.66338614309583e-02 -7.52110808241621e-02 -7.37723714267405e-02 -7.23197207890500e-02 +-7.08551942500486e-02 -6.93809304396684e-02 -6.78991369313924e-02 -6.64120860290477e-02 +-6.49221106696045e-02 -6.34316004218762e-02 -6.19429975594623e-02 -6.04587931850781e-02 +-5.89815233825890e-02 -5.75137653725983e-02 -5.60581336473479e-02 -5.46172760609682e-02 +-5.31938698517478e-02 -5.17906175740866e-02 -5.04102429191167e-02 -4.90554864046334e-02 +-4.77291009169239e-02 -4.64338470893121e-02 -4.51724885047284e-02 -4.39477867123171e-02 +-4.27624960510056e-02 -4.16193582760284e-02 -4.05210969875988e-02 -3.94704118642220e-02 +-3.84699727064910e-02 -3.75224133005969e-02 -3.66303251141406e-02 -3.57962508401569e-02 +-3.50226778084895e-02 -3.43120312867631e-02 -3.36666676961587e-02 -3.30888677699604e-02 +-3.25808296853921e-02 -3.21446622015686e-02 -3.17823778384061e-02 -3.14958861330767e-02 +-3.12869870120009e-02 -3.11573643174492e-02 -3.11085795285527e-02 -3.11420657168878e-02 +-3.12591217767913e-02 -3.14609069701888e-02 -3.17484358249578e-02 -3.21225734247241e-02 +-3.25840311264957e-02 -3.31333627406855e-02 -3.37709612058825e-02 -3.44970557882110e-02 +-3.53117098322871e-02 -3.62148190876691e-02 -3.72061106313272e-02 -3.82851424030529e-02 +-3.94513033669200e-02 -4.07038143079398e-02 -4.20417292689319e-02 -4.34639376284326e-02 +-4.49691668161733e-02 -4.65559856583702e-02 -4.82228083407627e-02 -4.99678989731002e-02 +-5.17893767346088e-02 -5.36852215759355e-02 -5.56532804491790e-02 -5.76912740339272e-02 +-5.97968039237524e-02 -6.19673602344002e-02 -6.42003295919791e-02 -6.64930034568346e-02 +-6.88425867365054e-02 -7.12462066392220e-02 -7.37009217178453e-02 -7.62037310529634e-02 +-7.87515835230825e-02 -8.13413871094666e-02 -8.39700181832131e-02 -8.66343307225796e-02 +-8.93311654094275e-02 -9.20573585548720e-02 -9.48097508058686e-02 -9.75851955864456e-02 +-1.00380567229665e-01 -1.03192768759068e-01 -1.06018739281371e-01 -1.08855460955471e-01 +-1.11699965506363e-01 -1.14549340256345e-01 -1.17400733649870e-01 -1.20251360252518e-01 +-1.23098505208844e-01 -1.25939528148180e-01 -1.28771866531880e-01 -1.31593038439916e-01 +-1.34400644799092e-01 -1.37192371059502e-01 -1.39965988330053e-01 -1.42719353987993e-01 +-1.45450411781269e-01 -1.48157191446299e-01 -1.50837807867179e-01 -1.53490459805612e-01 +-1.56113428233732e-01 -1.58705074304645e-01 -1.61263836997768e-01 -1.63788230477970e-01 +-1.66276841209111e-01 -1.68728324863692e-01 -1.71141403071184e-01 -1.73514860047950e-01 +-1.75847539151709e-01 -1.78138339403076e-01 -1.80386212015969e-01 -1.82590156977491e-01 +-1.84749219716407e-01 -1.86862487897465e-01 -1.88929088376620e-01 -1.90948184349729e-01 +-1.92918972724512e-01 -1.94840681742543e-01 -1.96712568874764e-01 -1.98533919010606e-01 +-2.00304042957150e-01 -2.02022276261052e-01 -2.03687978362137e-01 -2.05300532083661e-01 +-2.06859343460376e-01 -2.08363841901634e-01 -2.09813480682968e-01 -2.11207737755811e-01 +-2.12546116861481e-01 -2.13828148932043e-01 -2.15053393757450e-01 -2.16221441895327e-01 +-2.17331916796950e-01 -2.18384477120512e-01 -2.19378819200518e-01 -2.20314679640268e-01 +-2.21191837992865e-01 -2.22010119494918e-01 -2.22769397816333e-01 -2.23469597789048e-01 +-2.24110698077501e-01 -2.24692733753886e-01 -2.25215798741855e-01 -2.25680048093371e-01 +-2.26085700064735e-01 -2.26433037959526e-01 -2.26722411708201e-01 -2.26954239156430e-01 +-2.27129007036843e-01 -2.27247271601750e-01 -2.27309658897464e-01 -2.27316864664178e-01 +-2.27269653848817e-01 -2.27168859721882e-01 -2.27015382593024e-01 -2.26810188123885e-01 +-2.26554305240520e-01 -2.26248823651580e-01 -2.25894890982179e-01 -2.25493709537071e-01 +-2.25046532710387e-01 -2.24554661062597e-01 -2.24019438088673e-01 -2.23442245704473e-01 +-2.22824499481216e-01 -2.22167643660485e-01 -2.21473145984484e-01 -2.20742492378228e-01 +-2.19977181522037e-01 -2.19178719353943e-01 -2.18348613542610e-01 -2.17488367971929e-01 +-2.16599477278622e-01 -2.15683421484044e-01 -2.14741660760802e-01 -2.13775630373867e-01 +-2.12786735834587e-01 -2.11776348304318e-01 -2.10745800282443e-01 -2.09696381611190e-01 +-2.08629335827061e-01 -2.07545856885775e-01 -2.06447086284470e-01 -2.05334110601519e-01 +-2.04207959470739e-01 -2.03069604003010e-01 -2.01919955664457e-01 -2.00759865616351e-01 +-1.99590124517864e-01 -1.98411462788730e-01 -1.97224551324828e-01 -1.96030002655695e-01 +-1.94828372529053e-01 -1.93620161903645e-01 -1.92405819328032e-01 -1.91185743679558e-01 +-1.89960287234447e-01 -1.88729759037026e-01 -1.87494428533380e-01 -1.86254529432319e-01 +-1.85010263754515e-01 -1.83761806028892e-01 -1.82509307594049e-01 -1.81252900961471e-01 +-1.79992704196729e-01 -1.78728825274633e-01 -1.77461366364544e-01 -1.76190428002601e-01 +-1.74916113108664e-01 -1.73638530807086e-01 -1.72357800012244e-01 -1.71074052741818e-01 +-1.69787437123295e-01 -1.68498120061948e-01 -1.67206289541607e-01 -1.65912156532913e-01 +-1.64615956487325e-01 -1.63317950398973e-01 -1.62018425420441e-01 -1.60717695022704e-01 +-1.59416098693682e-01 -1.58114001174229e-01 -1.56811791234694e-01 -1.55509879999574e-01 +-1.54208698832097e-01 -1.52908696794786e-01 -1.51610337706207e-01 -1.50314096818042e-01 +-1.49020457140432e-01 -1.47729905447065e-01 -1.46442927994817e-01 -1.45160005995741e-01 +-1.43881610881929e-01 -1.42608199406124e-01 -1.41340208622985e-01 -1.40078050797529e-01 +-1.38822108288518e-01 -1.37572728455404e-01 -1.36330218637842e-01 -1.35094841256802e-01 +-1.33866809085883e-01 -1.32646280740578e-01 -1.31433356432003e-01 -1.30228074029927e-01 +-1.29030405477880e-01 -1.27840253600703e-01 -1.26657449342096e-01 -1.25481749466592e-01 +-1.24312834756974e-01 -1.23150308734389e-01 -1.21993696924479e-01 -1.20842446688629e-01 +-1.19695927635074e-01 -1.18553432620050e-01 -1.17414179344559e-01 -1.16277312547573e-01 +-1.15141906791786e-01 -1.14006969833219e-01 -1.12871446561338e-01 -1.11734223491662e-01 +-1.10594133788377e-01 -1.09449962790098e-01 -1.08300454007775e-01 -1.07144315559804e-01 +-1.05980227005759e-01 -1.04806846536743e-01 -1.03622818477345e-01 -1.02426781051439e-01 +-1.01217374361718e-01 -9.99932485309175e-02 -9.87530719510673e-02 -9.74955395860255e-02 +-9.62193812717625e-02 -9.49233699586065e-02 -9.36063298397754e-02 -9.22671443110875e-02 +-9.09047637077385e-02 -8.95182127654279e-02 -8.81065977549344e-02 -8.66691132414343e-02 +-8.52050484224356e-02 -8.37137930011115e-02 -8.21948425550713e-02 -8.06478033641478e-02 +-7.90723966646015e-02 -7.74684623011903e-02 -7.58359617528200e-02 -7.41749805119165e-02 +-7.24857298022336e-02 -7.07685476244696e-02 -6.90238991237963e-02 -6.72523762781463e-02 +-6.54546969108459e-02 -6.36317030358547e-02 -6.17843585484684e-02 -5.99137462788042e-02 +-5.80210644296964e-02 -5.61076224247387e-02 -5.41748361961004e-02 -5.22242229453711e-02 +-5.02573954140422e-02 -4.82760557032796e-02 -4.62819886853554e-02 -4.42770550514767e-02 +-4.22631840427569e-02 -4.02423659127047e-02 -3.82166441708483e-02 -3.61881076579683e-02 +-3.41588825038628e-02 -3.21311240186387e-02 -3.01070085681839e-02 -2.80887254837664e-02 +-2.60784690546115e-02 -2.40784306508600e-02 -2.20907910225077e-02 -2.01177128178045e-02 +-1.81613333621510e-02 -1.62237577358261e-02 -1.43070521858944e-02 -1.24132379044479e-02 +-1.05442852019306e-02 -8.70210810072150e-03 -6.88855937044401e-03 -5.10542602265453e-03 +-3.35442527867466e-03 -1.63720102040668e-03 4.46792699528997e-05 1.68972707929611e-03 +3.29653494390998e-03 4.86377804628825e-03 6.39021533764857e-03 7.87469019883474e-03 +9.31613065557100e-03 1.07135491671285e-02 1.20660420103170e-02 1.33727882833277e-02 +1.46330485562861e-02 1.58461631974232e-02 1.70115504055090e-02 1.81287039806141e-02 +1.91971908663308e-02 2.02166484972941e-02 2.11867819861435e-02 2.21073611839242e-02 +2.29782176472625e-02 2.37992415443504e-02 2.45703785296877e-02 2.52916266143920e-02 +2.59630330543653e-02 2.65846912721924e-02 2.71567378196843e-02 2.76793493755614e-02 +2.81527397558116e-02 2.85771568913617e-02 2.89528796973553e-02 2.92802147188920e-02 +2.95594923880937e-02 2.97910626658119e-02 2.99752897682197e-02 3.01125455956518e-02 +3.02032013926918e-02 3.02476170825748e-02 3.02461276480608e-02 3.01990258932092e-02 +3.01065409402244e-02 2.99688119229648e-02 2.97858565686410e-02 2.95575347483519e-02 +2.92835076592049e-02 2.89631941001654e-02 2.85957263266419e-02 2.81799091933791e-02 +2.77141876615334e-02 2.71966291470340e-02 2.66249284645760e-02 2.59964440648406e-02 +2.53082746200777e-02 2.45573845117163e-02 2.37407851495974e-02 2.28557760938908e-02 +2.19002455468663e-02 2.08730239736861e-02 1.97742776376907e-02 1.86059211613049e-02 +1.73720205443917e-02 1.60791512840134e-02 1.47366713713595e-02 1.33568670454042e-02 +1.19549311958582e-02 1.05487408953799e-02 9.15841194297203e-03 7.80562420739953e-03 +6.51273104216038e-03 5.30168755981992e-03 4.19285404525173e-03 3.20374986858861e-03 +2.34784748144081e-03 1.63350324789697e-03 1.06312035153905e-03 6.32628060662253e-04 +3.31341500335070e-04 1.42238155911031e-04 4.26540283232431e-05 5.36688085764852e-06 +-0.00000000000000e+00 + Type L N + 0 1 1 +0.00000000000000e+00 6.04455858638854e-02 1.20811418133829e-01 1.81017931497557e-01 +2.40985936589179e-01 3.00636806422461e-01 3.59892660983103e-01 4.18676549377805e-01 +4.76912628947701e-01 5.34526340765817e-01 5.91444580952662e-01 6.47595867260696e-01 +7.02910500397238e-01 7.57320719576290e-01 8.10760851812582e-01 8.63167454495951e-01 +9.14479450810626e-01 9.64638257592219e-01 1.01358790524484e+00 1.06127514937191e+00 +1.10764957380642e+00 1.15266368476010e+00 1.19627299584494e+00 1.23843610375601e+00 +1.27911475444035e+00 1.31827389961273e+00 1.35588174351607e+00 1.39190977986098e+00 +1.42633281891576e+00 1.45912900475469e+00 1.49027982270923e+00 1.51977009710221e+00 +1.54758797938074e+00 1.57372492679779e+00 1.59817567182635e+00 1.62093818252234e+00 +1.64201361408408e+00 1.66140625188601e+00 1.67912344629319e+00 1.69517553958999e+00 +1.70957578538212e+00 1.72234026085466e+00 1.73348777229067e+00 1.74303975427494e+00 +1.75102016302558e+00 1.75745536431180e+00 1.76237401643044e+00 1.76580694872522e+00 +1.76778703614259e+00 1.76834907032526e+00 1.76752962774963e+00 1.76536693541682e+00 +1.76190073460732e+00 1.75717214320849e+00 1.75122351712048e+00 1.74409831124084e+00 +1.73584094052056e+00 1.72649664157500e+00 1.71611133532160e+00 1.70473149110344e+00 +1.69240399274278e+00 1.67917600695206e+00 1.66509485451213e+00 1.65020788460786e+00 +1.63456235269050e+00 1.61820530221435e+00 1.60118345057208e+00 1.58354307952921e+00 +1.56532993043323e+00 1.54658910444748e+00 1.52736496803357e+00 1.50770106387991e+00 +1.48764002744647e+00 1.46722350926952e+00 1.44649210314234e+00 1.42548528026132e+00 +1.40424132939970e+00 1.38279730314495e+00 1.36118897020948e+00 1.33945077379908e+00 +1.31761579599833e+00 1.29571572810864e+00 1.27378084685070e+00 1.25183999632168e+00 +1.22992057557548e+00 1.20804853167514e+00 1.18624835804694e+00 1.16454309794860e+00 +1.14295435284770e+00 1.12150229549127e+00 1.10020568743446e+00 1.07908190078400e+00 +1.05814694390163e+00 1.03741549080377e+00 1.01690091398607e+00 9.96615320395747e-01 +9.76569590269679e-01 9.56773418553693e-01 9.37235358616597e-01 9.17962867972562e-01 +8.98962355726697e-01 8.80239231461316e-01 8.61797955284346e-01 8.43642088766530e-01 +8.25774346500464e-01 8.08196648022047e-01 7.90910169843474e-01 7.73915397356466e-01 +7.57212176374907e-01 7.40799764097288e-01 7.24676879281432e-01 7.08841751436595e-01 +6.93292168851295e-01 6.78025525288918e-01 6.63038865197249e-01 6.48328927292465e-01 +6.33892186392727e-01 6.19724893391253e-01 6.05823113273493e-01 5.92182761097749e-01 +5.78799635873201e-01 5.65669452283645e-01 5.52787870219378e-01 5.40150522093423e-01 +5.27753037931599e-01 5.15591068238820e-01 5.03660304656308e-01 4.91956498436115e-01 +4.80475476770465e-01 4.69213157023762e-01 4.58165558924856e-01 4.47328814785996e-01 +4.36699177823106e-01 4.26273028659307e-01 4.16046880100128e-01 4.06017380274564e-01 +3.96181314240962e-01 3.86535604160733e-01 3.77077308146130e-01 3.67803617890648e-01 +3.58711855192239e-01 3.49799467480302e-01 3.41064022457475e-01 3.32503201966582e-01 +3.24114795191708e-01 3.15896691300371e-01 3.07846871631110e-01 2.99963401527597e-01 +2.92244421916658e-01 2.84688140723341e-01 2.77292824211532e-01 2.70056788333577e-01 +2.62978390166995e-01 2.56056019510713e-01 2.49288090707373e-01 2.42673034752198e-01 +2.36209291742729e-01 2.29895303717447e-01 2.23729507925044e-01 2.17710330559794e-01 +2.11836180992287e-01 2.06105446518683e-01 2.00516487645686e-01 1.95067633922684e-01 +1.89757180326953e-01 1.84583384202545e-01 1.79544462748494e-01 1.74638591047273e-01 +1.69863900620118e-01 1.65218478491828e-01 1.60700366744044e-01 1.56307562532791e-01 +1.52038018543224e-01 1.47889643852097e-01 1.43860305166445e-01 1.39947828405354e-01 +1.36150000590461e-01 1.32464572010002e-01 1.28889258620773e-01 1.25421744652280e-01 +1.22059685377657e-01 1.18800710016479e-01 1.15642424735590e-01 1.12582415715206e-01 +1.09618252249104e-01 1.06747489849362e-01 1.03967673328131e-01 1.01276339830960e-01 +9.86710217985790e-02 9.61492498363677e-02 9.37085554733391e-02 9.13464737949997e-02 +8.90605459371183e-02 8.68483214300672e-02 8.47073603860483e-02 8.26352355241075e-02 +8.06295340303788e-02 7.86878592534447e-02 7.68078322370301e-02 7.49870930944565e-02 +7.32233022313244e-02 7.15141414247857e-02 6.98573147694607e-02 6.82505495015639e-02 +6.66915967141038e-02 6.51782319770992e-02 6.37082558776349e-02 6.22794944952043e-02 +6.08897998282196e-02 5.95370501877556e-02 5.82191505745671e-02 5.69340330551830e-02 +5.56796571524236e-02 5.44540102650496e-02 5.32551081304005e-02 5.20809953428917e-02 +5.09297459400451e-02 4.97994640664346e-02 4.86882847244710e-02 4.75943746194047e-02 +4.65159331042787e-02 4.54511932288511e-02 4.43984228947350e-02 4.33559261172061e-02 +4.23220443923191e-02 4.12951581661642e-02 4.02736884013243e-02 3.92560982338650e-02 +3.82408947125199e-02 3.72266306101609e-02 3.62119062961542e-02 3.51953716568456e-02 +3.41757280501739e-02 3.31517302793212e-02 3.21221885693685e-02 3.10859705301458e-02 +3.00420030878575e-02 2.89892743676411e-02 2.79268355089634e-02 2.68538023956990e-02 +2.57693572828621e-02 2.46727503022647e-02 2.35633008298692e-02 2.24403986982692e-02 +2.13035052385692e-02 2.01521541369405e-02 1.89859520922818e-02 1.78045792627163e-02 +1.66077894900877e-02 1.53954102931637e-02 1.41673426219126e-02 1.29235603669537e-02 +1.16641096200998e-02 1.03891076837737e-02 9.09874182898840e-03 7.79326780350579e-03 +6.47300809371646e-03 5.13834994569941e-03 3.78974315279441e-03 2.42769761885905e-03 +1.05278070813905e-03 -3.34385605634866e-04 -1.73312777672669e-03 -3.14272389578703e-03 +-4.56240705214169e-03 -5.99136883176213e-03 -7.42876293163492e-03 -8.87370887035479e-03 +-1.03252957740243e-02 -1.17825862159855e-02 -1.32446200885216e-02 -1.47104184844599e-02 +-1.61789875665942e-02 -1.76493224029888e-02 -1.91204107465854e-02 -2.05912367380350e-02 +-2.20607845113795e-02 -2.35280416830557e-02 -2.49920027057095e-02 -2.64516720694751e-02 +-2.79060673346678e-02 -2.93542219812690e-02 -3.07951880621212e-02 -3.22280386483918e-02 +-3.36518700575796e-02 -3.50658038561464e-02 -3.64689886306822e-02 -3.78606015234131e-02 +-3.92398495297477e-02 -4.06059705574756e-02 -4.19582342491123e-02 -4.32959425707549e-02 +-4.46184301726163e-02 -4.59250645281704e-02 -4.72152458605005e-02 -4.84884068660374e-02 +-4.97440122473356e-02 -5.09815580679125e-02 -5.22005709433811e-02 -5.34006070842141e-02 +-5.45812512064055e-02 -5.57421153270833e-02 -5.68828374627473e-02 -5.80030802482591e-02 +-5.91025294949994e-02 -6.01808927067156e-02 -6.12378975715286e-02 -6.22732904483411e-02 +-6.32868348654914e-02 -6.42783100489474e-02 -6.52475094966181e-02 -6.61942396145095e-02 +-6.71183184294481e-02 -6.80195743919692e-02 -6.88978452817295e-02 -6.97529772264467e-02 +-7.05848238439336e-02 -7.13932455152710e-02 -7.21781087955865e-02 -7.29392859672685e-02 +-7.36766547387902e-02 -7.43900980906309e-02 -7.50795042681060e-02 -7.57447669192546e-02 +-7.63857853742889e-02 -7.70024650615331e-02 -7.75947180532471e-02 -7.81624637332769e-02 +-7.87056295771152e-02 -7.92241520336903e-02 -7.97179774970580e-02 -8.01870633551399e-02 +-8.06313791017718e-02 -8.10509074975600e-02 -8.14456457644607e-02 -8.18156067985320e-02 +-8.21608203850285e-02 -8.24813343998766e-02 -8.27772159815905e-02 -8.30485526578912e-02 +-8.32954534116303e-02 -8.35180496711280e-02 -8.37164962106860e-02 -8.38909719478350e-02 +-8.40416806248042e-02 -8.41688513627643e-02 -8.42727390785653e-02 -8.43536247549753e-02 +-8.44118155567960e-02 -8.44476447866884e-02 -8.44614716760553e-02 -8.44536810079045e-02 +-8.44246825702188e-02 -8.43749104399923e-02 -8.43048220997205e-02 -8.42148973897654e-02 +-8.41056373016070e-02 -8.39775626185605e-02 -8.38312124120324e-02 -8.36671424028358e-02 +-8.34859231984208e-02 -8.32881384181437e-02 -8.30743827198346e-02 -8.28452597419564e-02 +-8.26013799765383e-02 -8.23433585888328e-02 -8.20718132002495e-02 -8.17873616515876e-02 +-8.14906197638869e-02 -8.11821991143652e-02 -8.08627048448881e-02 -8.05327335202422e-02 +-8.01928710531351e-02 -7.98436907123548e-02 -7.94857512298585e-02 -7.91195950217647e-02 +-7.87457465372785e-02 -7.83647107485001e-02 -7.79769717928692e-02 -7.75829917786814e-02 +-7.71832097627020e-02 -7.67780409073935e-02 -7.63678758237016e-02 -7.59530801036999e-02 +-7.55339940457122e-02 -7.51109325728178e-02 -7.46841853439107e-02 -7.42540170547624e-02 +-7.38206679248222e-02 -7.33843543638127e-02 -7.29452698105482e-02 -7.25035857348403e-02 +-7.20594527918635e-02 -7.16130021169604e-02 -7.11643467475765e-02 -7.07135831578390e-02 +-7.02607928902541e-02 -6.98060442680834e-02 -6.93493941712159e-02 -6.88908898577301e-02 +-6.84305708129173e-02 -6.79684706072441e-02 -6.75046187446369e-02 -6.70390424825256e-02 +-6.65717686053207e-02 -6.61028251333981e-02 -6.56322429502384e-02 -6.51600573310931e-02 +-6.46863093574372e-02 -6.42110472025070e-02 -6.37343272743896e-02 -6.32562152044378e-02 +-6.27767866702073e-02 -6.22961280436405e-02 -6.18143368568436e-02 -6.13315220795002e-02 +-6.08478042037373e-02 -6.03633151340631e-02 -5.98781978818439e-02 -5.93926060656493e-02 +-5.89067032206531e-02 -5.84206619221191e-02 -5.79346627298092e-02 -5.74488929619135e-02 +-5.69635453087878e-02 -5.64788162984017e-02 -5.59949046269087e-02 -5.55120093691626e-02 +-5.50303280852803e-02 -5.45500548405000e-02 -5.40713781565892e-02 -5.35944789138995e-02 +-5.31195282238539e-02 -5.26466852921582e-02 -5.21760952933776e-02 -5.17078872776707e-02 +-5.12421721304539e-02 -5.07790406055676e-02 -5.03185614521280e-02 -4.98607796546900e-02 +-4.94057148056008e-02 -4.89533596275295e-02 -4.85036786630792e-02 -4.80566071471755e-02 +-4.76120500765532e-02 -4.71698814891740e-02 -4.67299439647890e-02 -4.62920483561294e-02 +-4.58559737584086e-02 -4.54214677229098e-02 -4.49882467184922e-02 -4.45559968428399e-02 +-4.41243747832580e-02 -4.36930090247771e-02 -4.32615013012952e-02 -4.28294282834786e-02 +-4.23963434951709e-02 -4.19617794481506e-02 -4.15252499832289e-02 -4.10862528039412e-02 +-4.06442721874242e-02 -4.01987818555457e-02 -3.97492479879546e-02 -3.92951323574546e-02 +-3.88358955670027e-02 -3.83710003666888e-02 -3.78999150282764e-02 -3.74221167542896e-02 +-3.69370950982172e-02 -3.64443553721680e-02 -3.59434220182764e-02 -3.54338419202980e-02 +-3.49151876321642e-02 -3.43870605007839e-02 -3.38490936610734e-02 -3.33009548820582e-02 +-3.27423492439350e-02 -3.21730216271625e-02 -3.15927589959989e-02 -3.10013924603730e-02 +-3.03987991015791e-02 -2.97849035490009e-02 -2.91596792968676e-02 -2.85231497519480e-02 +-2.78753890050333e-02 -2.72165223210726e-02 -2.65467263448596e-02 -2.58662290212302e-02 +-2.51753092307807e-02 -2.44742961441629e-02 -2.37635683000120e-02 -2.30435524135244e-02 +-2.23147219245902e-02 -2.15775952962036e-02 -2.08327340755787e-02 -2.00807407320230e-02 +-1.93222562870916e-02 -1.85579577539196e-02 -1.77885554038263e-02 -1.70147898793641e-02 +-1.62374291738760e-02 -1.54572654983750e-02 -1.46751120571217e-02 -1.38917997536772e-02 +-1.31081738494248e-02 -1.23250905966047e-02 -1.15434138677764e-02 -1.07640118033208e-02 +-9.98775349813014e-03 -9.21550574800135e-03 -8.44812987546550e-03 -7.68647865385214e-03 +-6.93139334731683e-03 -6.18370088336327e-03 -5.44421117307618e-03 -4.71371459286223e-03 +-3.99297963998881e-03 -3.28275077261986e-03 -2.58374644340483e-03 -1.89665733397369e-03 +-1.22214479596365e-03 -5.60839502451116e-04 8.66596880823983e-05 7.19786654869730e-04 +1.33800872638572e-03 1.94082718328405e-03 2.52777755735250e-03 3.09842973264716e-03 +3.65238785642838e-03 4.18929006889522e-03 4.70880806197983e-03 5.21064647861809e-03 +5.69454216494453e-03 6.16026328875324e-03 6.60760833833131e-03 7.03640501637760e-03 +7.44650904417861e-03 7.83780289150685e-03 8.21019444781721e-03 8.56361565023720e-03 +8.89802108354177e-03 9.21338656672798e-03 9.50970773990724e-03 9.78699866390396e-03 +1.00452904430672e-02 1.02846298791703e-02 1.05050781606343e-02 1.07067095863152e-02 +1.08896103163290e-02 1.10538771332957e-02 1.11996161853871e-02 1.13269416670211e-02 +1.14359743733658e-02 1.15268400406242e-02 1.15996673553427e-02 1.16545854833721e-02 +1.16917209342779e-02 1.17111935429814e-02 1.17131113220995e-02 1.16975639228866e-02 +1.16646144493155e-02 1.16142894104705e-02 1.15465666847038e-02 1.14613615193331e-02 +1.13585108154412e-02 1.12377562582964e-02 1.10987272528343e-02 1.09409251024175e-02 +1.07637104047348e-02 1.05662961898674e-02 1.03477498304143e-02 1.01070071300716e-02 +9.84290214652176e-03 9.55421611933315e-03 9.23974824954833e-03 8.89840993028010e-03 +8.52934231161260e-03 8.13205481248128e-03 7.70657945839237e-03 7.25363290746413e-03 +6.77477500018534e-03 6.27254998219266e-03 5.75059460904066e-03 5.21369656309361e-03 +4.66778736712407e-03 4.11985653294620e-03 3.57777813584611e-03 3.05004723978106e-03 +2.54543125272960e-03 2.07254976186341e-03 1.63940487481623e-03 1.25289163535597e-03 +9.18323721593304e-04 6.39012502299440e-04 4.15936976423685e-04 2.47537843025261e-04 +1.29661046703291e-04 5.56651595078559e-05 1.66938431925289e-05 2.10064961863368e-06 +0.00000000000000e+00 + Type L N + 0 2 0 +0.00000000000000e+00 9.99656949141819e-04 3.99459323439319e-03 8.97272954251366e-03 +1.59140147413208e-02 2.47905468091254e-02 3.55667408310148e-02 4.81995427706697e-02 +6.26386873767623e-02 7.88269982475745e-02 9.67007277591970e-02 1.16189934264255e-01 +1.37218893692100e-01 1.59706542430178e-01 1.83566948141903e-01 2.08709804980777e-01 +2.35040949495225e-01 2.62462893385057e-01 2.90875369169622e-01 3.20175884760363e-01 +3.50260282896965e-01 3.81023301406918e-01 4.12359130282644e-01 4.44161961638166e-01 +4.76326528707606e-01 5.08748630179642e-01 5.41325636324016e-01 5.73956973556672e-01 +6.06544584307183e-01 6.38993359293737e-01 6.71211539574762e-01 7.03111086029727e-01 +7.34608014222115e-01 7.65622692912227e-01 7.96080104813324e-01 8.25910068518746e-01 +8.55047420866893e-01 8.83432159352290e-01 9.11009544531196e-01 9.37730162706442e-01 +9.63549949505184e-01 9.88430175282330e-01 1.01233739358858e+00 1.03524335423276e+00 +1.05712488274076e+00 1.07796372826606e+00 1.09774638223650e+00 1.11646387022813e+00 +1.13411151973650e+00 1.15068870666879e+00 1.16619858350393e+00 1.18064779216336e+00 +1.19404616470034e+00 1.20640641495075e+00 1.21774382429423e+00 1.22807592464985e+00 +1.23742218177742e+00 1.24580368187404e+00 1.25324282434709e+00 1.25976302351054e+00 +1.26538842179325e+00 1.27014361686791e+00 1.27405340490783e+00 1.27714254196114e+00 +1.27943552519677e+00 1.28095639552991e+00 1.28172856287610e+00 1.28177465501757e+00 +1.28111639079414e+00 1.27977447805750e+00 1.27776853655452e+00 1.27511704563487e+00 +1.27183731641365e+00 1.26794548776342e+00 1.26345654526413e+00 1.25838436200688e+00 +1.25274175993003e+00 1.24654059016554e+00 1.23979183069257e+00 1.23250569943442e+00 +1.22469178079640e+00 1.21635916352683e+00 1.20751658769194e+00 1.19817259848893e+00 +1.18833570458007e+00 1.17801453861445e+00 1.16721801761338e+00 1.15595550092916e+00 +1.14423694354513e+00 1.13207304256673e+00 1.11947537485689e+00 1.10645652389405e+00 +1.09303019407567e+00 1.07921131085209e+00 1.06501610525388e+00 1.05046218156805e+00 +1.03556856712241e+00 1.02035574335109e+00 1.00484565753496e+00 9.89061714836851e-01 +9.73028750479616e-01 9.56772982143653e-01 9.40321942886837e-01 9.23704395111353e-01 +9.06950226316685e-01 8.90090327583629e-01 8.73156455928666e-01 8.56181081849254e-01 +8.39197223546984e-01 8.22238269465215e-01 8.05337790909452e-01 7.88529346631049e-01 +7.71846281346711e-01 7.55321520236921e-01 7.38987361515227e-01 7.22875269186864e-01 +7.07015668119303e-01 6.91437743529103e-01 6.76169246949182e-01 6.61236310678863e-01 +6.46663272636461e-01 6.32472513431854e-01 6.18684307355405e-01 6.05316688841254e-01 +5.92385335808809e-01 5.79903471117876e-01 5.67881783192196e-01 5.56328366674934e-01 +5.45248683780094e-01 5.34645546797835e-01 5.24519122001516e-01 5.14866954992067e-01 +5.05684017303211e-01 4.96962773881322e-01 4.88693270848369e-01 4.80863242757631e-01 +4.73458238361591e-01 4.66461763731593e-01 4.59855441401208e-01 4.53619184051510e-01 +4.47731381118052e-01 4.42169096577654e-01 4.36908276069261e-01 4.31923961418165e-01 +4.27190510567432e-01 4.22681820875226e-01 4.18371553711985e-01 4.14233358287435e-01 +4.10241092654068e-01 4.06369039870676e-01 4.02592117366429e-01 3.98886077622027e-01 +3.95227698378899e-01 3.91594960699069e-01 3.87967213326112e-01 3.84325321940041e-01 +3.80651802054594e-01 3.76930934472552e-01 3.73148862391620e-01 3.69293669438303e-01 +3.65355438098073e-01 3.61326288205113e-01 3.57200395351930e-01 3.52973989276303e-01 +3.48645332478175e-01 3.44214679510512e-01 3.39684217573665e-01 3.35057989220791e-01 +3.30341798150466e-01 3.25543099220266e-01 3.20670873960192e-01 3.15735492996050e-01 +3.10748566908968e-01 3.05722787157149e-01 3.00671758768775e-01 2.95609826579959e-01 +2.90551896838323e-01 2.85513256020757e-01 2.80509388723048e-01 2.75555796469477e-01 +2.70667819262233e-01 2.65860461644257e-01 2.61148224985240e-01 2.56544947619955e-01 +2.52063654371751e-01 2.47716416882949e-01 2.43514226049387e-01 2.39466877719799e-01 +2.35582872673484e-01 2.31869331733601e-01 2.28331926709830e-01 2.24974827695079e-01 +2.21800667067853e-01 2.18810520376954e-01 2.16003904109877e-01 2.13378790172621e-01 +2.10931636738249e-01 2.08657434956272e-01 2.06549770856308e-01 2.04600901629221e-01 +2.02801845328365e-01 2.01142482904211e-01 1.99611671368579e-01 1.98197366781183e-01 +1.96886755662083e-01 1.95666393359794e-01 1.94522347846813e-01 1.93440347372700e-01 +1.92405930379883e-01 1.91404596079109e-01 1.90421954090028e-01 1.89443871577328e-01 +1.88456616354005e-01 1.87446994479951e-01 1.86402480955534e-01 1.85311342195267e-01 +1.84162749065096e-01 1.82946879377007e-01 1.81655008855558e-01 1.80279589720937e-01 +1.78814316171096e-01 1.77254176189682e-01 1.75595489255465e-01 1.73835929681094e-01 +1.71974535462708e-01 1.70011702675537e-01 1.67949165602580e-01 1.65789962932184e-01 +1.63538390504211e-01 1.61199941222228e-01 1.58781232879147e-01 1.56289924764861e-01 +1.53734624035373e-01 1.51124782922640e-01 1.48470587951912e-01 1.45782842407862e-01 +1.43072843351669e-01 1.40352254537823e-01 1.37632976611459e-01 1.34927015984194e-01 +1.32246353788780e-01 1.29602816300354e-01 1.27007948185020e-01 1.24472889895295e-01 +1.22008260477107e-01 1.19624046985258e-01 1.17329501624410e-01 1.15133047641540e-01 +1.13042194894630e-01 1.11063465912144e-01 1.09202333139850e-01 1.07463167947179e-01 +1.05849201835725e-01 1.04362500159356e-01 1.03003948529898e-01 1.01773251946152e-01 +1.00668946548378e-01 9.96884237668810e-02 9.88279665032859e-02 9.80827968578988e-02 +9.74471347974754e-02 9.69142670459787e-02 9.64766253776542e-02 9.61258733980047e-02 +9.58530008149330e-02 9.56484241302458e-02 9.55020926215853e-02 9.54035984371805e-02 +9.53422895910640e-02 9.53073846248113e-02 9.52880876935874e-02 9.52737028393192e-02 +9.52537462320083e-02 9.52180551912480e-02 9.51568928435328e-02 9.50610473263447e-02 +9.49219245166424e-02 9.47316333384438e-02 9.44830627908050e-02 9.41699499326663e-02 +9.37869381636710e-02 9.33296252490461e-02 9.27946006507276e-02 9.21794718448904e-02 +9.14828794265984e-02 9.07045009241411e-02 8.98450433674271e-02 8.89062247752978e-02 +8.78907448445001e-02 8.68022452370820e-02 8.56452599719658e-02 8.44251565292562e-02 +8.31480683714228e-02 8.18208196728634e-02 8.04508431276342e-02 7.90460917735514e-02 +7.76149458287438e-02 7.61661155835414e-02 7.47085414258627e-02 7.32512921017351e-02 +7.18034623240605e-02 7.03740708421832e-02 6.89719600723028e-02 6.76056983645298e-02 +6.62834859467245e-02 6.50130655386494e-02 6.38016385729867e-02 6.26557878930752e-02 +6.15814077216118e-02 6.05836416108828e-02 5.96668289943176e-02 5.88344608622734e-02 +5.80891449830897e-02 5.74325809846693e-02 5.68655455033656e-02 5.63878874969030e-02 +5.59985337076872e-02 5.56955041533023e-02 5.54759374134658e-02 5.53361253783238e-02 +5.52715570228541e-02 5.52769706773225e-02 5.53464141752338e-02 5.54733121789071e-02 +5.56505399095489e-02 5.58705024442211e-02 5.61252186870537e-02 5.64064090769561e-02 +5.67055860593898e-02 5.70141463257605e-02 5.73234638108828e-02 5.76249824368477e-02 +5.79103076004161e-02 5.81712954206384e-02 5.84001387934781e-02 5.85894493403954e-02 +5.87323343876659e-02 5.88224681720404e-02 5.88541565355392e-02 5.88223944469246e-02 +5.87229157688669e-02 5.85522347771016e-02 5.83076790299743e-02 5.79874132826897e-02 +5.75904542392414e-02 5.71166760353357e-02 5.65668064465356e-02 5.59424139162466e-02 +5.52458855969726e-02 5.44803966944079e-02 5.36498714964145e-02 5.27589365567334e-02 +5.18128665855192e-02 5.08175236745800e-02 4.97792905537862e-02 4.87049986357509e-02 +4.76018516580186e-02 4.64773457750511e-02 4.53391869859063e-02 4.41952068073197e-02 +4.30532771157306e-02 4.19212250855531e-02 4.08067491446700e-02 3.97173368518808e-02 +3.86601855750511e-02 3.76421268133644e-02 3.66695549627685e-02 3.57483612709892e-02 +3.48838736679420e-02 3.40808030897470e-02 3.33431968405556e-02 3.26743994569301e-02 +3.20770214554055e-02 3.15529162560981e-02 3.11031654847331e-02 3.07280727632763e-02 +3.04271660064458e-02 3.01992081487951e-02 3.00422161357709e-02 2.99534879231641e-02 +2.99296371436305e-02 2.99666350173755e-02 3.00598590075517e-02 3.02041476501867e-02 +3.03938609243190e-02 3.06229454710937e-02 3.08850039214741e-02 3.11733675514362e-02 +3.14811714514325e-02 3.18014313738550e-02 3.21271214083925e-02 3.24512516306706e-02 +3.27669448743924e-02 3.30675117912601e-02 3.33465233860563e-02 3.35978802461104e-02 +3.38158777245671e-02 3.39952663849504e-02 3.41313070699070e-02 3.42198200190760e-02 +3.42572275290748e-02 3.42405897218310e-02 3.41676330651098e-02 3.40367713702264e-02 +3.38471190756753e-02 3.35984967108613e-02 3.32914285202938e-02 3.29271323146181e-02 +3.25075016997216e-02 3.20350809179783e-02 3.15130326155782e-02 3.09450989259673e-02 +3.03355563308912e-02 2.96891648266349e-02 2.90111119830780e-02 2.83069525365057e-02 +2.75825442032078e-02 2.68439804392405e-02 2.60975209019794e-02 2.53495203909373e-02 +2.46063570585549e-02 2.38743606861968e-02 2.31597418163811e-02 2.24685225194206e-02 +2.18064695513337e-02 2.11790306303616e-02 2.05912745220612e-02 2.00478355781728e-02 +1.95528633227986e-02 1.91099776214726e-02 1.87222299051195e-02 1.83920708523780e-02 +1.81213248611153e-02 1.79111715639466e-02 1.77621345640847e-02 1.76740774877086e-02 +1.76462073681735e-02 1.76770852966441e-02 1.77646441940259e-02 1.79062134812515e-02 +1.80985503498865e-02 1.83378772634922e-02 1.86199252529493e-02 1.89399825067706e-02 +1.92929477009353e-02 1.96733874625923e-02 2.00755973186101e-02 2.04936654438552e-02 +2.09215384956387e-02 2.13530888002432e-02 2.17821821450543e-02 2.22027454256655e-02 +2.26088334014157e-02 2.29946938251039e-02 2.33548302329204e-02 2.36840617087050e-02 +2.39775789721547e-02 2.42309961831467e-02 2.44403979034120e-02 2.46023807118700e-02 +2.47140890303474e-02 2.47732447815182e-02 2.47781705699664e-02 2.47278061495207e-02 +2.46217180146608e-02 2.44601020299959e-02 2.42437790887528e-02 2.39741838680219e-02 +2.36533468243723e-02 2.32838696475103e-02 2.28688944611354e-02 2.24120671282643e-02 +2.19174950822886e-02 2.13897001642590e-02 2.08335670006609e-02 2.02542875037360e-02 +1.96573021176724e-02 1.90482384683099e-02 1.84328481010276e-02 1.78169420109225e-02 +1.72063256810463e-02 1.66067343482494e-02 1.60237692120510e-02 1.54628352899752e-02 +1.49290816031359e-02 1.44273443487072e-02 1.39620936816500e-02 1.35373846870165e-02 +1.31568130768252e-02 1.28234760923999e-02 1.25399390347927e-02 1.23082077831210e-02 +1.21297075940182e-02 1.20052684056870e-02 1.19351167979962e-02 1.19188746864834e-02 +1.19555647538281e-02 1.20436225481290e-02 1.21809151040032e-02 1.23647658708874e-02 +1.25919856637684e-02 1.28589092856289e-02 1.31614374089050e-02 1.34950832458528e-02 +1.38550234855633e-02 1.42361529289819e-02 1.46331422131941e-02 1.50404979828501e-02 +1.54526248402838e-02 1.58638883868943e-02 1.62686786569143e-02 1.66614732408986e-02 +1.70368994001483e-02 1.73897944848067e-02 1.77152639873740e-02 1.80087365896729e-02 +1.82660155945758e-02 1.84833261736873e-02 1.86573579082299e-02 1.87853021521134e-02 +1.88648838029781e-02 1.88943871283058e-02 1.88726753587910e-02 1.87992038293533e-02 +1.86740265187369e-02 1.84977959107619e-02 1.82717561732402e-02 1.79977297235188e-02 +1.76780973217860e-02 1.73157719038948e-02 1.69141664337579e-02 1.64771561206107e-02 +1.60090354079197e-02 1.55144701977878e-02 1.49984458267288e-02 1.44662113551309e-02 +1.39232207730742e-02 1.33750717589873e-02 1.28274426545683e-02 1.22860283391303e-02 +1.17564756988724e-02 1.12443193913491e-02 1.07549186025282e-02 1.02933954832582e-02 +9.86457593372634e-03 9.47293337858352e-03 9.12253614184550e-03 8.81699898939163e-03 +8.55943935761505e-03 8.35243872910954e-03 8.19800954936505e-03 8.09756800105734e-03 +8.05191286282146e-03 8.06121057501746e-03 8.12498651302762e-03 8.24212232596980e-03 +8.41085903264504e-03 8.62880537572616e-03 8.89295072121948e-03 9.19968155962918e-03 +9.54480043212460e-03 9.92354589375496e-03 1.03306119737744e-02 1.07601655524546e-02 +1.12058602108616e-02 1.16608455026389e-02 1.21177713261614e-02 1.25687882137571e-02 +1.30055459469051e-02 1.34191949470346e-02 1.38003972996153e-02 1.41393568637449e-02 +1.44258804028891e-02 1.46494836277564e-02 1.47995569510494e-02 1.48656050411695e-02 +1.48375713709458e-02 1.47062534504730e-02 1.44638061109612e-02 1.41043192289133e-02 +1.36244432652932e-02 1.30240220716474e-02 1.23066792031034e-02 1.14802934724412e-02 +1.05572938410216e-02 9.55470499870589e-03 8.49388467492602e-03 7.39991253653984e-03 +6.30061800374930e-03 5.22526866505867e-03 4.20297908996893e-03 3.26093752818363e-03 +2.42258040962131e-03 1.70586686916118e-03 1.12181357274061e-03 6.73441197071405e-04 +3.55257287305085e-04 1.53357472582174e-04 4.61720456496499e-05 5.82352043122674e-06 +0.00000000000000e+00 + Type L N + 0 2 1 +0.00000000000000e+00 -3.54421889761040e-04 -1.41546697525921e-03 -3.17648988376720e-03 +-5.62646945296228e-03 -8.75008994260753e-03 -1.25278537819893e-02 -1.69362249143942e-02 +-2.19478015461678e-02 -2.75315168648214e-02 -3.36528660603967e-02 -4.02741577689248e-02 +-4.73547878582103e-02 -5.48515332961043e-02 -6.27188636814598e-02 -7.09092678795025e-02 +-7.93735930875664e-02 -8.80613935650357e-02 -9.69212861936580e-02 -1.05901309991675e-01 +-1.14949286687779e-01 -1.24013179468791e-01 -1.33041447048038e-01 -1.41983390259270e-01 +-1.50789488462967e-01 -1.59411723157263e-01 -1.67803886313300e-01 -1.75921871103511e-01 +-1.83723942859504e-01 -1.91170988282410e-01 -1.98226741130917e-01 -2.04857982828780e-01 +-2.11034716662479e-01 -2.16730314478523e-01 -2.21921635036660e-01 -2.26589113427538e-01 +-2.30716821218776e-01 -2.34292497249831e-01 -2.37307549250835e-01 -2.39757026711659e-01 +-2.41639565672416e-01 -2.42957306343318e-01 -2.43715784688077e-01 -2.43923799318976e-01 +-2.43593255251316e-01 -2.42738986248633e-01 -2.41378557656067e-01 -2.39532051766453e-01 +-2.37221837890513e-01 -2.34472329408394e-01 -2.31309730163459e-01 -2.27761772620501e-01 +-2.23857450248742e-01 -2.19626746605169e-01 -2.15100363585837e-01 -2.10309451282164e-01 +-2.05285341826346e-01 -2.00059289535590e-01 -1.94662219569795e-01 -1.89124487202735e-01 +-1.83475649673845e-01 -1.77744252438084e-01 -1.71957631466315e-01 -1.66141733070209e-01 +-1.60320952535478e-01 -1.54517992647331e-01 -1.48753742984388e-01 -1.43047180643928e-01 +-1.37415292844476e-01 -1.31873021633372e-01 -1.26433230709347e-01 -1.21106694155225e-01 +-1.15902106665862e-01 -1.10826114653208e-01 -1.05883367415862e-01 -1.01076587376595e-01 +-9.64066582194699e-02 -9.18727296002965e-02 -8.74723369612764e-02 -8.32015348543207e-02 +-7.90550420685708e-02 -7.50263967671186e-02 -7.11081197664136e-02 -6.72918840399442e-02 +-6.35686884957529e-02 -5.99290340653206e-02 -5.63631001492357e-02 -5.28609194925707e-02 +-4.94125496095392e-02 -4.60082389421466e-02 -4.26385860203244e-02 -3.92946899904525e-02 +-3.59682909940484e-02 -3.26518990074539e-02 -2.93389098950756e-02 -2.60237075816792e-02 +-2.27017514116219e-02 -1.93696479331193e-02 -1.60252065217870e-02 -1.26674784379858e-02 +-9.29677909504683e-03 -5.91469349836588e-03 -2.52406499680511e-03 8.71032334043210e-04 +4.26533718415832e-03 7.65245971821807e-03 1.10249546850457e-02 1.43744079631945e-02 +1.76915354421645e-02 2.09662930151720e-02 2.41879963497371e-02 2.73454490075192e-02 +3.04270774058087e-02 3.34210710504486e-02 3.63155264242656e-02 3.90985928866742e-02 +4.17586189291402e-02 4.42842971375893e-02 4.66648062364892e-02 4.88899486297842e-02 +5.09502819106216e-02 5.28372428841484e-02 5.45432627347378e-02 5.60618720698138e-02 +5.73877946858282e-02 5.85170290267047e-02 5.94469164397755e-02 6.01761954774738e-02 +6.07050416432818e-02 6.10350921360746e-02 6.11694553063738e-02 6.11127046995443e-02 +6.08708577228579e-02 6.04513391340424e-02 5.98629297067148e-02 5.91157005813943e-02 +5.82209339580606e-02 5.71910309259884e-02 5.60394073574290e-02 5.47803789124140e-02 +5.34290363112587e-02 5.20011121282583e-02 5.05128404436621e-02 4.89808107604880e-02 +4.74218176474962e-02 4.58527076092114e-02 4.42902247079177e-02 4.27508564709487e-02 +4.12506816093210e-02 3.98052210510177e-02 3.84292937543025e-02 3.71368787138774e-02 +3.59409845060356e-02 3.48535276390458e-02 3.38852208826736e-02 3.30454726470520e-02 +3.23422983671778e-02 3.17822447263256e-02 3.13703274210117e-02 3.11099830331020e-02 +3.10030354327451e-02 3.10496769904644e-02 3.12484647294589e-02 3.15963314014696e-02 +3.20886113229610e-02 3.27190806643216e-02 3.34800117447578e-02 3.43622407509489e-02 +3.53552481696361e-02 3.64472511044560e-02 3.76253065365791e-02 3.88754244882210e-02 +4.01826899587270e-02 4.15313924255913e-02 4.29051616380896e-02 4.42871083798056e-02 +4.56599688385930e-02 4.70062511987390e-02 4.83083830604296e-02 4.95488582960165e-02 +5.07103819709305e-02 5.17760119890688e-02 5.27292961676570e-02 5.35544035044117e-02 +5.42362484695835e-02 5.47606072363644e-02 5.51142248542468e-02 5.52849124702492e-02 +5.52616338113177e-02 5.50345802565567e-02 5.45952339489406e-02 5.39364185215532e-02 +5.30523371418662e-02 5.19385977077269e-02 5.05922251592737e-02 4.90116610005301e-02 +4.71967502516671e-02 4.51487161765537e-02 4.28701232489752e-02 4.03648289336510e-02 +3.76379249637551e-02 3.46956688940535e-02 3.15454067970499e-02 2.81954880478658e-02 +2.46551732112190e-02 2.09345361002312e-02 1.70443611213726e-02 1.29960370523021e-02 +8.80144841943764e-03 4.47286564971992e-03 2.28351662041335e-05 -4.53592941995937e-03 +-9.19065389767179e-03 -1.39286067413101e-02 -1.87371980622595e-02 -2.36040732574606e-02 +-2.85172004576041e-02 -3.34649509581489e-02 -3.84361719047502e-02 -4.34202505999879e-02 +-4.84071698993863e-02 -5.33875542705028e-02 -5.83527061981833e-02 -6.32946327307120e-02 +-6.82060620743615e-02 -7.30804502565067e-02 -7.79119779888671e-02 -8.26955379713442e-02 +-8.74267129822262e-02 -9.21017452011160e-02 -9.67174973057743e-02 -1.01271405972170e-01 +-1.05761428487520e-01 -1.10185983258143e-01 -1.14543885056874e-01 -1.18834275907942e-01 +-1.23056552550074e-01 -1.27210291450901e-01 -1.31295172366979e-01 -1.35310901454031e-01 +-1.39257134931075e-01 -1.43133404290201e-01 -1.46939044020914e-01 -1.50673122784664e-01 +-1.54334378931687e-01 -1.57921161199252e-01 -1.61431375368314e-01 -1.64862437585338e-01 +-1.68211234978239e-01 -1.71474094111067e-01 -1.74646757732024e-01 -1.77724370174779e-01 +-1.80701471674714e-01 -1.83572001760933e-01 -1.86329311782542e-01 -1.88966186525039e-01 +-1.91474874770761e-01 -1.93847128557185e-01 -1.96074250789668e-01 -1.98147150771913e-01 +-2.00056407128964e-01 -2.01792337514908e-01 -2.03345074421483e-01 -2.04704646335213e-01 +-2.05861063430266e-01 -2.06804406932560e-01 -2.07524921248153e-01 -2.08013107916228e-01 +-2.08259820424104e-01 -2.08256358909098e-01 -2.07994563769653e-01 -2.07466907216010e-01 +-2.06666581808665e-01 -2.05587585060745e-01 -2.04224799217846e-01 -2.02574065375429e-01 +-2.00632251149056e-01 -1.98397311175876e-01 -1.95868339796239e-01 -1.93045615341294e-01 +-1.89930635535114e-01 -1.86526143607406e-01 -1.82836144804250e-01 -1.78865913078610e-01 +-1.74621987838622e-01 -1.70112160728798e-01 -1.65345452516367e-01 -1.60332080250931e-01 +-1.55083414959520e-01 -1.49611930229963e-01 -1.43931142122396e-01 -1.38055540930746e-01 +-1.32000515392453e-01 -1.25782270014654e-01 -1.19417736247920e-01 -1.12924478293855e-01 +-1.06320594379796e-01 -9.96246143721608e-02 -9.28553946293511e-02 -8.60320110151327e-02 +-7.91736510042032e-02 -7.22995058128886e-02 -6.54286634798758e-02 -5.85800038045763e-02 +-5.17720960244885e-02 -4.50231000780246e-02 -3.83506722562192e-02 -3.17718759959569e-02 +-2.53030985095155e-02 -1.89599738809077e-02 -1.27573131895066e-02 -6.70904214646389e-03 +-8.28146650358228e-04 4.87337341382456e-03 1.03845418930097e-02 1.56954354484475e-02 +2.07972039357764e-02 2.56820821026578e-02 3.03433927090480e-02 3.47755412581347e-02 +3.89740026059861e-02 4.29352997941240e-02 4.66569755208783e-02 5.01375567336943e-02 +5.33765128849963e-02 5.63742084480885e-02 5.91318503364689e-02 6.16514309093568e-02 +6.39356672778860e-02 6.59879376500071e-02 6.78122154675286e-02 6.94130020957998e-02 +7.07952588253401e-02 7.19643389353123e-02 7.29259205513465e-02 7.36859410050766e-02 +7.42505333702416e-02 7.46259658107322e-02 7.48185843300415e-02 7.48347594597717e-02 +7.46808373677863e-02 7.43630958049400e-02 7.38877052438246e-02 7.32606954943455e-02 +7.24879280100364e-02 7.15750740265784e-02 7.05275986008803e-02 6.93507505460703e-02 +6.80495581857025e-02 6.66288307801451e-02 6.50931654102992e-02 6.34469590391934e-02 +6.16944254113551e-02 5.98396163937692e-02 5.78864473113317e-02 5.58387257845079e-02 +5.37001835378655e-02 5.14745106156902e-02 4.91653914153095e-02 4.67765419302890e-02 +4.43117475844981e-02 4.17749010342407e-02 3.91700393192029e-02 3.65013797538269e-02 +3.37733539686654e-02 3.09906395361317e-02 2.81581886464435e-02 2.52812533371528e-02 +2.23654068229315e-02 1.94165605208059e-02 1.64409764191527e-02 1.34452744959481e-02 +1.04364349522567e-02 7.42179509014775e-03 4.40904072933509e-03 1.40619212318176e-03 +-1.57841559852236e-03 -4.53615736609230e-03 -7.45814832644125e-03 -1.03352789964989e-02 +-1.31582551293292e-02 -1.59176419506822e-02 -1.86039123694842e-02 -2.12074987159251e-02 +-2.37188475159175e-02 -2.61284767712451e-02 -2.84270351811245e-02 -3.06053627135528e-02 +-3.26545519139677e-02 -3.45660093246685e-02 -3.63315163812412e-02 -3.79432891520046e-02 +-3.93940362932191e-02 -4.06770146064106e-02 -4.17860816044844e-02 -4.27157445201341e-02 +-4.34612052230578e-02 -4.40184005513444e-02 -4.43840376066342e-02 -4.45556236118134e-02 +-4.45314899835330e-02 -4.43108103291702e-02 -4.38936121383302e-02 -4.32807820019917e-02 +-4.24740642572218e-02 -4.14760530213384e-02 -4.02901776457698e-02 -3.89206816859332e-02 +-3.73725955485191e-02 -3.56517030409454e-02 -3.37645021087321e-02 -3.17181601045237e-02 +-2.95204639868247e-02 -2.71797658966437e-02 -2.47049246056445e-02 -2.21052433695973e-02 +-1.93904047555013e-02 -1.65704030393579e-02 -1.36554747939212e-02 -1.06560283016198e-02 +-7.58257243709087e-03 -4.44564566629226e-03 -1.25574580500367e-03 1.97673883130421e-03 +5.24159627155915e-03 8.52885513608832e-03 1.18288457251031e-02 1.51322574225729e-02 +1.84301919299820e-02 2.17142118899011e-02 2.49763845090555e-02 2.82093198441079e-02 +3.14062034700935e-02 3.45608233107446e-02 3.76675904711480e-02 4.07215539756723e-02 +4.37184093771655e-02 4.66545012664175e-02 4.95268197730874e-02 5.23329912101157e-02 +5.50712630723578e-02 5.77404836562264e-02 6.03400766199017e-02 6.28700108526067e-02 +6.53307660660688e-02 6.77232945611053e-02 7.00489796569216e-02 7.23095912997902e-02 +7.45072393910788e-02 7.66443253918200e-02 7.87234927720776e-02 8.07475768781152e-02 +8.27195547888693e-02 8.46424957254477e-02 8.65195125634898e-02 8.83537149784022e-02 +9.01481647279634e-02 9.19058335459081e-02 9.36295640842017e-02 9.53220343012280e-02 +9.69857256485124e-02 9.86228953603955e-02 1.00235553099809e-01 1.01825442159563e-01 +1.03394025362960e-01 1.04942475750695e-01 1.06471672083546e-01 1.07982199132937e-01 +1.09474352674713e-01 1.10948149045983e-01 1.12403339071368e-01 1.13839426113924e-01 +1.15255687958010e-01 1.16651202186975e-01 1.18024874678158e-01 1.19375470801854e-01 +1.20701648879924e-01 1.22001995433972e-01 1.23275061732730e-01 1.24519401133733e-01 +1.25733606705649e-01 1.26916348614812e-01 1.28066410762695e-01 1.29182726170091e-01 +1.30264410618658e-01 1.31310794080891e-01 1.32321449495501e-01 1.33296218476042e-01 +1.34235233576332e-01 1.35138936776173e-01 1.36008093894770e-01 1.36843804686486e-01 +1.37647508423725e-01 1.38420984824127e-01 1.39166350233465e-01 1.39886049030853e-01 +1.40582840278716e-01 1.41259779695631e-01 1.41920197085107e-01 1.42567669407029e-01 +1.43205989730196e-01 1.43839132353614e-01 1.44471214430415e-01 1.45106454470926e-01 +1.45749128140057e-01 1.46403521798424e-01 1.47073884265977e-01 1.47764377311218e-01 +1.48479025387930e-01 1.49221665154558e-01 1.49995895318915e-01 1.50805027352425e-01 +1.51652037613944e-01 1.52539521413021e-01 1.53469649526690e-01 1.54444127662442e-01 +1.55464159333292e-01 1.56530412579034e-01 1.57642990931224e-01 1.58801408978553e-01 +1.60004572844458e-01 1.61250765840579e-01 1.62537639508531e-01 1.63862210208871e-01 +1.65220861360820e-01 1.66609351379663e-01 1.68022827301552e-01 1.69455844028154e-01 +1.70902389066922e-01 1.72355912587226e-01 1.73809362558840e-01 1.75255224687824e-01 +1.76685566816216e-01 1.78092087406690e-01 1.79466167691851e-01 1.80798927030483e-01 +1.82081280980259e-01 1.83304001568256e-01 1.84457779217261e-01 1.85533285767235e-01 +1.86521238017090e-01 1.87412461201591e-01 1.88197951810792e-01 1.88868939153372e-01 +1.89416945058617e-01 1.89833841101538e-01 1.90111902717868e-01 1.90243859545579e-01 +1.90222941280761e-01 1.90042918261296e-01 1.89698135883822e-01 1.89183541810384e-01 +1.88494704724801e-01 1.87627823152371e-01 1.86579722563724e-01 1.85347838657886e-01 +1.83930184388799e-01 1.82325298010306e-01 1.80532169237124e-01 1.78550140650108e-01 +1.76378781836770e-01 1.74017734599196e-01 1.71466529041467e-01 1.68724372623577e-01 +1.65789917465084e-01 1.62661015361397e-01 1.59334475095717e-01 1.55805842498086e-01 +1.52069229938617e-01 1.48117227946401e-01 1.43940936597203e-01 1.39530157193954e-01 +1.34873784428304e-01 1.29960434499455e-01 1.24779334565319e-01 1.19321482738645e-01 +1.13581065497078e-01 1.07557091479473e-01 1.01255168715669e-01 9.46893188627438e-02 +8.78836903670767e-02 8.08740066844431e-02 7.37085701247271e-02 6.64486407018000e-02 +5.91680259276975e-02 5.19517537464034e-02 4.48937567474449e-02 3.80935690770632e-02 +3.16521232418253e-02 2.56668251559733e-02 2.02261734489849e-02 1.54042634609594e-02 +1.12555679578708e-02 7.81040727281347e-03 5.07150580318503e-03 3.01197760868609e-03 +1.57499344501319e-03 6.75261348350472e-04 2.02313044645841e-04 2.54419769848885e-05 +0.00000000000000e+00 + Type L N + 0 3 0 +0.00000000000000e+00 -8.26928489846722e-07 -6.61261991355360e-06 -2.23018092048758e-05 +-5.28112313485887e-05 -1.03015761219217e-04 -1.77734720316323e-04 -2.81718404569887e-04 +-4.19634886152693e-04 -5.96057140707794e-04 -8.15450549589095e-04 -1.08216082463503e-03 +-1.40040240066401e-03 -1.77424733831287e-03 -2.20761477705342e-03 -2.70426097523883e-03 +-3.26776997086987e-03 -3.90154489345509e-03 -4.60879995389135e-03 -5.39255313573453e-03 +-6.25561960759150e-03 -7.20060587266542e-03 -8.22990466775469e-03 -9.34569062026396e-03 +-1.05499166680597e-02 -1.18443112433159e-02 -1.32303762178717e-02 -1.47093856040837e-02 +-1.62823850017238e-02 -1.79501917781687e-02 -1.97133959659699e-02 -2.15723618588953e-02 +-2.35272302847218e-02 -2.55779215304349e-02 -2.77241388930786e-02 -2.99653728273006e-02 +-3.23009056586663e-02 -3.47298168300786e-02 -3.72509886471389e-02 -3.98631124870231e-02 +-4.25646954344324e-02 -4.53540673073976e-02 -4.82293880351786e-02 -5.11886553501931e-02 +-5.42297127558341e-02 -5.73502577321725e-02 -6.05478501418960e-02 -6.38199207993859e-02 +-6.71637801665732e-02 -7.05766271401274e-02 -7.40555578956097e-02 -7.75975747554403e-02 +-8.11995950488848e-02 -8.48584599337283e-02 -8.85709431508772e-02 -9.23337596847724e-02 +-9.61435743042187e-02 -9.99970099599967e-02 -1.03890656017429e-01 -1.07821076303891e-01 +-1.11784816953073e-01 -1.15778414029645e-01 -1.19798400919717e-01 -1.23841315474307e-01 +-1.27903706894689e-01 -1.31982142350170e-01 -1.36073213320450e-01 -1.40173541656191e-01 +-1.44279785352904e-01 -1.48388644034574e-01 -1.52496864144729e-01 -1.56601243843800e-01 +-1.60698637612718e-01 -1.64785960563632e-01 -1.68860192459548e-01 -1.72918381445445e-01 +-1.76957647494139e-01 -1.80975185570751e-01 -1.84968268520180e-01 -1.88934249682404e-01 +-1.92870565240814e-01 -1.96774736309097e-01 -2.00644370762389e-01 -2.04477164818678e-01 +-2.08270904376493e-01 -2.12023466115093e-01 -2.15732818363406e-01 -2.19397021744011e-01 +-2.23014229598502e-01 -2.26582688200581e-01 -2.30100736763236e-01 -2.33566807246376e-01 +-2.36979423971307e-01 -2.40337203048473e-01 -2.43638851624896e-01 -2.46883166957851e-01 +-2.50069035321344e-01 -2.53195430752088e-01 -2.56261413641782e-01 -2.59266129182637e-01 +-2.62208805673264e-01 -2.65088752692212e-01 -2.67905359146666e-01 -2.70658091204002e-01 +-2.73346490114166e-01 -2.75970169931047e-01 -2.78528815141292e-01 -2.81022178209222e-01 +-2.83450077046791e-01 -2.85812392417710e-01 -2.88109065285131e-01 -2.90340094112434e-01 +-2.92505532126855e-01 -2.94605484555838e-01 -2.96640105846077e-01 -2.98609596875300e-01 +-3.00514202166862e-01 -3.02354207117165e-01 -3.04129935245884e-01 -3.05841745478800e-01 +-3.07490029472873e-01 -3.09075208992938e-01 -3.10597733349082e-01 -3.12058076903405e-01 +-3.13456736654434e-01 -3.14794229906969e-01 -3.16071092034596e-01 -3.17287874341533e-01 +-3.18445142029781e-01 -3.19543472276905e-01 -3.20583452429036e-01 -3.21565678312889e-01 +-3.22490752669827e-01 -3.23359283714185e-01 -3.24171883817214e-01 -3.24929168317177e-01 +-3.25631754455299e-01 -3.26280260436409e-01 -3.26875304612308e-01 -3.27417504785102e-01 +-3.27907477626951e-01 -3.28345838211951e-01 -3.28733199655200e-01 -3.29070172853410e-01 +-3.29357366320892e-01 -3.29595386114178e-01 -3.29784835838107e-01 -3.29926316725803e-01 +-3.30020427784676e-01 -3.30067766000336e-01 -3.30068926590138e-01 -3.30024503298049e-01 +-3.29935088722484e-01 -3.29801274668880e-01 -3.29623652518940e-01 -3.29402813608728e-01 +-3.29139349608095e-01 -3.28833852894347e-01 -3.28486916913484e-01 -3.28099136522885e-01 +-3.27671108309870e-01 -3.27203430881193e-01 -3.26696705119184e-01 -3.26151534400954e-01 +-3.25568524777781e-01 -3.24948285112543e-01 -3.24291427173806e-01 -3.23598565685912e-01 +-3.22870318335143e-01 -3.22107305732769e-01 -3.21310151336459e-01 -3.20479481332202e-01 +-3.19615924479507e-01 -3.18720111923197e-01 -3.17792676975655e-01 -3.16834254873813e-01 +-3.15845482515558e-01 -3.14826998180574e-01 -3.13779441240851e-01 -3.12703451866273e-01 +-3.11599670730798e-01 -3.10468738724729e-01 -3.09311296678523e-01 -3.08127985103435e-01 +-3.06919443954074e-01 -3.05686312417629e-01 -3.04429228734201e-01 -3.03148830052193e-01 +-3.01845752322267e-01 -3.00520630232791e-01 -2.99174097189130e-01 -2.97806785338502e-01 +-2.96419325641436e-01 -2.95012347990204e-01 -2.93586481373869e-01 -2.92142354088900e-01 +-2.90680593993583e-01 -2.89201828803751e-01 -2.87706686426696e-01 -2.86195795329450e-01 +-2.84669784937020e-01 -2.83129286055579e-01 -2.81574931315109e-01 -2.80007355625508e-01 +-2.78427196639795e-01 -2.76835095217699e-01 -2.75231695882685e-01 -2.73617647265275e-01 +-2.71993602525436e-01 -2.70360219746808e-01 -2.68718162295592e-01 -2.67068099137107e-01 +-2.65410705103239e-01 -2.63746661104362e-01 -2.62076654279673e-01 -2.60401378080411e-01 +-2.58721532280926e-01 -2.57037822913232e-01 -2.55350962121311e-01 -2.53661667932180e-01 +-2.51970663941505e-01 -2.50278678912348e-01 -2.48586446286457e-01 -2.46894703608397e-01 +-2.45204191863636e-01 -2.43515654732602e-01 -2.41829837763567e-01 -2.40147487468041e-01 +-2.38469350343182e-01 -2.36796171826485e-01 -2.35128695188753e-01 -2.33467660372004e-01 +-2.31813802779602e-01 -2.30167852026413e-01 -2.28530530657295e-01 -2.26902552842560e-01 +-2.25284623059425e-01 -2.23677434768597e-01 -2.22081669095350e-01 -2.20497993524402e-01 +-2.18927060617906e-01 -2.17369506765665e-01 -2.15825950976467e-01 -2.14296993719089e-01 +-2.12783215821093e-01 -2.11285177433047e-01 -2.09803417065225e-01 -2.08338450703173e-01 +-2.06890771007851e-01 -2.05460846605261e-01 -2.04049121469668e-01 -2.02656014403686e-01 +-2.01281918617584e-01 -1.99927201409290e-01 -1.98592203945649e-01 -1.97277241144573e-01 +-1.95982601656827e-01 -1.94708547945291e-01 -1.93455316458704e-01 -1.92223117896042e-01 +-1.91012137556956e-01 -1.89822535772929e-01 -1.88654448413174e-01 -1.87507987458733e-01 +-1.86383241637663e-01 -1.85280277113831e-01 -1.84199138221452e-01 -1.83139848237252e-01 +-1.82102410181982e-01 -1.81086807642932e-01 -1.80093005609098e-01 -1.79120951310787e-01 +-1.78170575055626e-01 -1.77241791053245e-01 -1.76334498221263e-01 -1.75448580965662e-01 +-1.74583909929171e-01 -1.73740342701847e-01 -1.72917724488723e-01 -1.72115888730070e-01 +-1.71334657670595e-01 -1.70573842874656e-01 -1.69833245685398e-01 -1.69112657626539e-01 +-1.68411860746357e-01 -1.67730627904274e-01 -1.67068723001223e-01 -1.66425901155805e-01 +-1.65801908828975e-01 -1.65196483900742e-01 -1.64609355703015e-01 -1.64040245013348e-01 +-1.63488864014898e-01 -1.62954916228360e-01 -1.62438096422066e-01 -1.61938090506748e-01 +-1.61454575421707e-01 -1.60987219019246e-01 -1.60535679954342e-01 -1.60099607586436e-01 +-1.59678641900148e-01 -1.59272413451486e-01 -1.58880543345837e-01 -1.58502643253658e-01 +-1.58138315469294e-01 -1.57787153017893e-01 -1.57448739814715e-01 -1.57122650880553e-01 +-1.56808452616232e-01 -1.56505703138441e-01 -1.56213952678355e-01 -1.55932744043719e-01 +-1.55661613144235e-01 -1.55400089579273e-01 -1.55147697286137e-01 -1.54903955246262e-01 +-1.54668378246007e-01 -1.54440477687908e-01 -1.54219762447592e-01 -1.54005739770894e-01 +-1.53797916205120e-01 -1.53595798557906e-01 -1.53398894876633e-01 -1.53206715441038e-01 +-1.53018773761338e-01 -1.52834587574009e-01 -1.52653679827246e-01 -1.52475579648129e-01 +-1.52299823283581e-01 -1.52125955007401e-01 -1.51953527985891e-01 -1.51782105094985e-01 +-1.51611259682178e-01 -1.51440576267120e-01 -1.51269651175284e-01 -1.51098093099834e-01 +-1.50925523587466e-01 -1.50751577444842e-01 -1.50575903063009e-01 -1.50398162658041e-01 +-1.50218032427064e-01 -1.50035202619654e-01 -1.49849377525539e-01 -1.49660275380395e-01 +-1.49467628192417e-01 -1.49271181493170e-01 -1.49070694017044e-01 -1.48865937314400e-01 +-1.48656695304183e-01 -1.48442763772438e-01 -1.48223949823709e-01 -1.48000071292812e-01 +-1.47770956124864e-01 -1.47536441731760e-01 -1.47296374333520e-01 -1.47050608293033e-01 +-1.46799005452769e-01 -1.46541434481912e-01 -1.46277770242241e-01 -1.46007893180749e-01 +-1.45731688756676e-01 -1.45449046910110e-01 -1.45159861578808e-01 -1.44864030269220e-01 +-1.44561453687013e-01 -1.44252035431615e-01 -1.43935681758463e-01 -1.43612301411763e-01 +-1.43281805529677e-01 -1.42944107622864e-01 -1.42599123626393e-01 -1.42246772024050e-01 +-1.41886974043108e-01 -1.41519653916712e-01 -1.41144739210084e-01 -1.40762161205911e-01 +-1.40371855343445e-01 -1.39973761705092e-01 -1.39567825543554e-01 -1.39153997842020e-01 +-1.38732235899319e-01 -1.38302503931566e-01 -1.37864773681468e-01 -1.37419025026245e-01 +-1.36965246574973e-01 -1.36503436246183e-01 -1.36033601816603e-01 -1.35555761432183e-01 +-1.35069944072817e-01 -1.34576189962633e-01 -1.34074550918247e-01 -1.33565090627965e-01 +-1.33047884855684e-01 -1.32523021564004e-01 -1.31990600951939e-01 -1.31450735403582e-01 +-1.30903549345030e-01 -1.30349179007948e-01 -1.29787772099201e-01 -1.29219487377087e-01 +-1.28644494135788e-01 -1.28062971600758e-01 -1.27475108238855e-01 -1.26881100988047e-01 +-1.26281154412541e-01 -1.25675479790142e-01 -1.25064294139515e-01 -1.24447819195842e-01 +-1.23826280344094e-01 -1.23199905519749e-01 -1.22568924087310e-01 -1.21933565707411e-01 +-1.21294059203562e-01 -1.20650631439771e-01 -1.20003506220333e-01 -1.19352903222989e-01 +-1.18699036976455e-01 -1.18042115892985e-01 -1.17382341366191e-01 -1.16719906943748e-01 +-1.16054997583929e-01 -1.15387789004133e-01 -1.14718447128641e-01 -1.14047127641876e-01 +-1.13373975652351e-01 -1.12699125471366e-01 -1.12022700509294e-01 -1.11344813291096e-01 +-1.10665565591379e-01 -1.09985048688064e-01 -1.09303343732407e-01 -1.08620522231855e-01 +-1.07936646640952e-01 -1.07251771054279e-01 -1.06565941994277e-01 -1.05879199285686e-01 +-1.05191577007319e-01 -1.04503104510969e-01 -1.03813807496431e-01 -1.03123709130904e-01 +-1.02432831200465e-01 -1.01741195280847e-01 -1.01048823914426e-01 -1.00355741780175e-01 +-9.96619768432723e-02 -9.89675614711973e-02 -9.82725335033907e-02 -9.75769372619674e-02 +-9.68808244915177e-02 -9.61842552167126e-02 -9.54872985072478e-02 -9.47900331405942e-02 +-9.40925481540772e-02 -9.33949432789552e-02 -9.26973292504146e-02 -9.19998279887215e-02 +-9.13025726481505e-02 -9.06057075317520e-02 -8.99093878714817e-02 -8.92137794747039e-02 +-8.85190582395670e-02 -8.78254095432183e-02 -8.71330275082637e-02 -8.64421141542711e-02 +-8.57528784424380e-02 -8.50655352227910e-02 -8.43803040944372e-02 -8.36974081904276e-02 +-8.30170728997180e-02 -8.23395245394965e-02 -8.16649889917985e-02 -8.09936903188214e-02 +-8.03258493716890e-02 -7.96616824075855e-02 -7.90013997301887e-02 -7.83452043681598e-02 +-7.76932908061205e-02 -7.70458437820422e-02 -7.64030371643060e-02 -7.57650329208727e-02 +-7.51319801920233e-02 -7.45040144770200e-02 -7.38812569437857e-02 -7.32638138693409e-02 +-7.26517762172670e-02 -7.20452193569062e-02 -7.14442029273794e-02 -7.08487708478186e-02 +-7.02589514734880e-02 -6.96747578957243e-02 -6.90961883818941e-02 -6.85232269498388e-02 +-6.79558440696052e-02 -6.73939974836382e-02 -6.68376331350685e-02 -6.62866861922900e-02 +-6.57410821566831e-02 -6.52007380391501e-02 -6.46655635900659e-02 -6.41354625663651e-02 +-6.36103340187548e-02 -6.30900735815138e-02 -6.25745747469895e-02 -6.20637301067590e-02 +-6.15574325414788e-02 -6.10555763417114e-02 -6.05580582424929e-02 -6.00647783550766e-02 +-5.95756409801782e-02 -5.90905552881138e-02 -5.86094358524940e-02 -5.81322030255742e-02 +-5.76587831449704e-02 -5.71891085632073e-02 -5.67231174934567e-02 -5.62607536668353e-02 +-5.58019657987383e-02 -5.53467068638701e-02 -5.48949331818742e-02 -5.44466033177363e-02 +-5.40016768034222e-02 -5.35601126894769e-02 -5.31218679375476e-02 -5.26868956669572e-02 +-5.22551432705480e-02 -5.18265504169819e-02 -5.14010469585342e-02 -5.09785507651064e-02 +-5.05589655067045e-02 -5.01421784079550e-02 -4.97280579993444e-02 -4.93164518907646e-02 +-4.89071845935845e-02 -4.85000554178720e-02 -4.80948364714985e-02 -4.76912707877025e-02 +-4.72890706072078e-02 -4.68879158401912e-02 -4.64874527322171e-02 -4.60872927566496e-02 +-4.56870117539407e-02 -4.52861493354285e-02 -4.48842085656879e-02 -4.44806559327749e-02 +-4.40749216095046e-02 -4.36664000006688e-02 -4.32544505601108e-02 -4.28383988469169e-02 +-4.24175377704847e-02 -4.19911289485501e-02 -4.15584040688471e-02 -4.11185661024249e-02 +-4.06707901634008e-02 -4.02142237453533e-02 -3.97479859890105e-02 -3.92711655515601e-02 +-3.87828165596977e-02 -3.82819520450457e-02 -3.77675341952047e-02 -3.72384607254034e-02 +-3.66935467096189e-02 -3.61315013370553e-02 -3.55508993153809e-02 -3.49501470630216e-02 +-3.43274444527157e-02 -3.36807437109829e-02 -3.30077081478614e-02 -3.23056746640229e-02 +-3.15716253947669e-02 -3.08021752908343e-02 -2.99935837394302e-02 -2.91417992777558e-02 +-2.82425467852709e-02 -2.72914659770578e-02 -2.62843082861851e-02 -2.52171960981913e-02 +-2.40869436704701e-02 -2.28914329757911e-02 -2.16300303999200e-02 -2.03040221823297e-02 +-1.89170384422430e-02 -1.74754285174623e-02 -1.59885452393296e-02 -1.44688937813747e-02 +-1.29321028424832e-02 -1.13966828662812e-02 -9.88354802069298e-03 -8.41529545079518e-03 +-7.01525590470870e-03 -5.70635259583161e-03 -4.50982793327673e-03 -3.44391799967117e-03 +-2.52256978135591e-03 -1.75430381987612e-03 -1.14132341701907e-03 -6.78959952852369e-04 +-3.55522541836219e-04 -1.52590613856819e-04 -4.57526196948572e-05 -5.75633001517043e-06 +-0.00000000000000e+00 diff --git a/tests/PP_ORB/ag_lps.cpi b/tests/PP_ORB/ag_lps.cpi new file mode 100644 index 0000000000..c7bee2c7f5 --- /dev/null +++ b/tests/PP_ORB/ag_lps.cpi @@ -0,0 +1,1152 @@ +local psp - psp6 format + 47.000 19.000 20210830 zatom,zion,pspd + 6 11 0 0 1089 0 pspcode,pspxc,lmax,lloc,mmax,r2well +0 0 0 rchrg,fchrg,qchrg +5---- no use +6---- no use +7---- no use + 1.9000E+01 1 zion lmax+1 + 0.0000 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 + 0.0000 0.0000 0.0000 + 1089 1.012300000000E+00 + 1 1.329787234043E-04 0.000000000000E+00 1.851419805598E+01 + 2 1.346143617021E-04 0.000000000000E+00 1.851419805582E+01 + 3 1.362701183511E-04 0.000000000000E+00 1.851419805564E+01 + 4 1.379462408068E-04 0.000000000000E+00 1.851419805546E+01 + 5 1.396429795687E-04 0.000000000000E+00 1.851419805527E+01 + 6 1.413605882174E-04 0.000000000000E+00 1.851419805507E+01 + 7 1.430993234525E-04 0.000000000000E+00 1.851419805487E+01 + 8 1.448594451309E-04 0.000000000000E+00 1.851419805466E+01 + 9 1.466412163061E-04 0.000000000000E+00 1.851419805444E+01 + 10 1.484449032666E-04 0.000000000000E+00 1.851419805422E+01 + 11 1.502707755768E-04 0.000000000000E+00 1.851419805398E+01 + 12 1.521191061164E-04 0.000000000000E+00 1.851419805374E+01 + 13 1.539901711216E-04 0.000000000000E+00 1.851419805348E+01 + 14 1.558842502264E-04 0.000000000000E+00 1.851419805322E+01 + 15 1.578016265042E-04 0.000000000000E+00 1.851419805295E+01 + 16 1.597425865102E-04 0.000000000000E+00 1.851419805267E+01 + 17 1.617074203243E-04 0.000000000000E+00 1.851419805237E+01 + 18 1.636964215943E-04 0.000000000000E+00 1.851419805207E+01 + 19 1.657098875799E-04 0.000000000000E+00 1.851419805175E+01 + 20 1.677481191971E-04 0.000000000000E+00 1.851419805143E+01 + 21 1.698114210632E-04 0.000000000000E+00 1.851419805109E+01 + 22 1.719001015423E-04 0.000000000000E+00 1.851419805073E+01 + 23 1.740144727913E-04 0.000000000000E+00 1.851419805037E+01 + 24 1.761548508066E-04 0.000000000000E+00 1.851419804999E+01 + 25 1.783215554715E-04 0.000000000000E+00 1.851419804960E+01 + 26 1.805149106038E-04 0.000000000000E+00 1.851419804919E+01 + 27 1.827352440043E-04 0.000000000000E+00 1.851419804877E+01 + 28 1.849828875055E-04 0.000000000000E+00 1.851419804833E+01 + 29 1.872581770218E-04 0.000000000000E+00 1.851419804787E+01 + 30 1.895614525992E-04 0.000000000000E+00 1.851419804740E+01 + 31 1.918930584662E-04 0.000000000000E+00 1.851419804691E+01 + 32 1.942533430853E-04 0.000000000000E+00 1.851419804640E+01 + 33 1.966426592053E-04 0.000000000000E+00 1.851419804587E+01 + 34 1.990613639135E-04 0.000000000000E+00 1.851419804533E+01 + 35 2.015098186896E-04 0.000000000000E+00 1.851419804476E+01 + 36 2.039883894595E-04 0.000000000000E+00 1.851419804417E+01 + 37 2.064974466499E-04 0.000000000000E+00 1.851419804356E+01 + 38 2.090373652436E-04 0.000000000000E+00 1.851419804293E+01 + 39 2.116085248361E-04 0.000000000000E+00 1.851419804227E+01 + 40 2.142113096916E-04 0.000000000000E+00 1.851419804159E+01 + 41 2.168461088008E-04 0.000000000000E+00 1.851419804088E+01 + 42 2.195133159391E-04 0.000000000000E+00 1.851419804015E+01 + 43 2.222133297251E-04 0.000000000000E+00 1.851419803939E+01 + 44 2.249465536807E-04 0.000000000000E+00 1.851419803860E+01 + 45 2.277133962910E-04 0.000000000000E+00 1.851419803778E+01 + 46 2.305142710654E-04 0.000000000000E+00 1.851419803693E+01 + 47 2.333495965995E-04 0.000000000000E+00 1.851419803605E+01 + 48 2.362197966377E-04 0.000000000000E+00 1.851419803514E+01 + 49 2.391253001363E-04 0.000000000000E+00 1.851419803419E+01 + 50 2.420665413280E-04 0.000000000000E+00 1.851419803320E+01 + 51 2.450439597863E-04 0.000000000000E+00 1.851419803218E+01 + 52 2.480580004917E-04 0.000000000000E+00 1.851419803113E+01 + 53 2.511091138978E-04 0.000000000000E+00 1.851419803003E+01 + 54 2.541977559987E-04 0.000000000000E+00 1.851419802889E+01 + 55 2.573243883975E-04 0.000000000000E+00 1.851419802771E+01 + 56 2.604894783748E-04 0.000000000000E+00 1.851419802648E+01 + 57 2.636934989588E-04 0.000000000000E+00 1.851419802521E+01 + 58 2.669369289960E-04 0.000000000000E+00 1.851419802389E+01 + 59 2.702202532226E-04 0.000000000000E+00 1.851419802252E+01 + 60 2.735439623373E-04 0.000000000000E+00 1.851419802110E+01 + 61 2.769085530740E-04 0.000000000000E+00 1.851419801963E+01 + 62 2.803145282768E-04 0.000000000000E+00 1.851419801810E+01 + 63 2.837623969746E-04 0.000000000000E+00 1.851419801652E+01 + 64 2.872526744574E-04 0.000000000000E+00 1.851419801488E+01 + 65 2.907858823532E-04 0.000000000000E+00 1.851419801317E+01 + 66 2.943625487062E-04 0.000000000000E+00 1.851419801140E+01 + 67 2.979832080553E-04 0.000000000000E+00 1.851419800957E+01 + 68 3.016484015143E-04 0.000000000000E+00 1.851419800767E+01 + 69 3.053586768530E-04 0.000000000000E+00 1.851419800569E+01 + 70 3.091145885783E-04 0.000000000000E+00 1.851419800364E+01 + 71 3.129166980178E-04 0.000000000000E+00 1.851419800152E+01 + 72 3.167655734034E-04 0.000000000000E+00 1.851419799932E+01 + 73 3.206617899563E-04 0.000000000000E+00 1.851419799703E+01 + 74 3.246059299727E-04 0.000000000000E+00 1.851419799466E+01 + 75 3.285985829114E-04 0.000000000000E+00 1.851419799220E+01 + 76 3.326403454812E-04 0.000000000000E+00 1.851419798965E+01 + 77 3.367318217306E-04 0.000000000000E+00 1.851419798700E+01 + 78 3.408736231379E-04 0.000000000000E+00 1.851419798425E+01 + 79 3.450663687025E-04 0.000000000000E+00 1.851419798140E+01 + 80 3.493106850375E-04 0.000000000000E+00 1.851419797845E+01 + 81 3.536072064635E-04 0.000000000000E+00 1.851419797538E+01 + 82 3.579565751030E-04 0.000000000000E+00 1.851419797221E+01 + 83 3.623594409768E-04 0.000000000000E+00 1.851419796891E+01 + 84 3.668164621008E-04 0.000000000000E+00 1.851419796549E+01 + 85 3.713283045846E-04 0.000000000000E+00 1.851419796194E+01 + 86 3.758956427310E-04 0.000000000000E+00 1.851419795825E+01 + 87 3.805191591366E-04 0.000000000000E+00 1.851419795443E+01 + 88 3.851995447940E-04 0.000000000000E+00 1.851419795047E+01 + 89 3.899374991950E-04 0.000000000000E+00 1.851419794636E+01 + 90 3.947337304350E-04 0.000000000000E+00 1.851419794210E+01 + 91 3.995889553194E-04 0.000000000000E+00 1.851419793768E+01 + 92 4.045038994698E-04 0.000000000000E+00 1.851419793309E+01 + 93 4.094792974333E-04 0.000000000000E+00 1.851419792833E+01 + 94 4.145158927917E-04 0.000000000000E+00 1.851419792339E+01 + 95 4.196144382731E-04 0.000000000000E+00 1.851419791827E+01 + 96 4.247756958638E-04 0.000000000000E+00 1.851419791296E+01 + 97 4.300004369230E-04 0.000000000000E+00 1.851419790745E+01 + 98 4.352894422971E-04 0.000000000000E+00 1.851419790173E+01 + 99 4.406435024374E-04 0.000000000000E+00 1.851419789580E+01 + 100 4.460634175174E-04 0.000000000000E+00 1.851419788965E+01 + 101 4.515499975528E-04 0.000000000000E+00 1.851419788327E+01 + 102 4.571040625227E-04 0.000000000000E+00 1.851419787665E+01 + 103 4.627264424917E-04 0.000000000000E+00 1.851419786979E+01 + 104 4.684179777344E-04 0.000000000000E+00 1.851419786266E+01 + 105 4.741795188605E-04 0.000000000000E+00 1.851419785528E+01 + 106 4.800119269425E-04 0.000000000000E+00 1.851419784761E+01 + 107 4.859160736439E-04 0.000000000000E+00 1.851419783966E+01 + 108 4.918928413497E-04 0.000000000000E+00 1.851419783141E+01 + 109 4.979431232983E-04 0.000000000000E+00 1.851419782286E+01 + 110 5.040678237149E-04 0.000000000000E+00 1.851419781398E+01 + 111 5.102678579466E-04 0.000000000000E+00 1.851419780478E+01 + 112 5.165441525993E-04 0.000000000000E+00 1.851419779523E+01 + 113 5.228976456763E-04 0.000000000000E+00 1.851419778532E+01 + 114 5.293292867181E-04 0.000000000000E+00 1.851419777505E+01 + 115 5.358400369447E-04 0.000000000000E+00 1.851419776439E+01 + 116 5.424308693992E-04 0.000000000000E+00 1.851419775333E+01 + 117 5.491027690928E-04 0.000000000000E+00 1.851419774186E+01 + 118 5.558567331526E-04 0.000000000000E+00 1.851419772997E+01 + 119 5.626937709704E-04 0.000000000000E+00 1.851419771762E+01 + 120 5.696149043533E-04 0.000000000000E+00 1.851419770482E+01 + 121 5.766211676769E-04 0.000000000000E+00 1.851419769154E+01 + 122 5.837136080393E-04 0.000000000000E+00 1.851419767776E+01 + 123 5.908932854182E-04 0.000000000000E+00 1.851419766347E+01 + 124 5.981612728288E-04 0.000000000000E+00 1.851419764865E+01 + 125 6.055186564846E-04 0.000000000000E+00 1.851419763327E+01 + 126 6.129665359594E-04 0.000000000000E+00 1.851419761732E+01 + 127 6.205060243517E-04 0.000000000000E+00 1.851419760077E+01 + 128 6.281382484512E-04 0.000000000000E+00 1.851419758361E+01 + 129 6.358643489072E-04 0.000000000000E+00 1.851419756581E+01 + 130 6.436854803987E-04 0.000000000000E+00 1.851419754734E+01 + 131 6.516028118076E-04 0.000000000000E+00 1.851419752818E+01 + 132 6.596175263929E-04 0.000000000000E+00 1.851419750831E+01 + 133 6.677308219675E-04 0.000000000000E+00 1.851419748769E+01 + 134 6.759439110777E-04 0.000000000000E+00 1.851419746631E+01 + 135 6.842580211839E-04 0.000000000000E+00 1.851419744412E+01 + 136 6.926743948445E-04 0.000000000000E+00 1.851419742111E+01 + 137 7.011942899011E-04 0.000000000000E+00 1.851419739724E+01 + 138 7.098189796669E-04 0.000000000000E+00 1.851419737249E+01 + 139 7.185497531168E-04 0.000000000000E+00 1.851419734680E+01 + 140 7.273879150801E-04 0.000000000000E+00 1.851419732016E+01 + 141 7.363347864356E-04 0.000000000000E+00 1.851419729252E+01 + 142 7.453917043088E-04 0.000000000000E+00 1.851419726386E+01 + 143 7.545600222718E-04 0.000000000000E+00 1.851419723412E+01 + 144 7.638411105457E-04 0.000000000000E+00 1.851419720327E+01 + 145 7.732363562054E-04 0.000000000000E+00 1.851419717127E+01 + 146 7.827471633867E-04 0.000000000000E+00 1.851419713808E+01 + 147 7.923749534964E-04 0.000000000000E+00 1.851419710365E+01 + 148 8.021211654244E-04 0.000000000000E+00 1.851419706794E+01 + 149 8.119872557591E-04 0.000000000000E+00 1.851419703089E+01 + 150 8.219746990050E-04 0.000000000000E+00 1.851419699246E+01 + 151 8.320849878027E-04 0.000000000000E+00 1.851419695259E+01 + 152 8.423196331527E-04 0.000000000000E+00 1.851419691124E+01 + 153 8.526801646405E-04 0.000000000000E+00 1.851419686835E+01 + 154 8.631681306656E-04 0.000000000000E+00 1.851419682386E+01 + 155 8.737850986727E-04 0.000000000000E+00 1.851419677770E+01 + 156 8.845326553864E-04 0.000000000000E+00 1.851419672982E+01 + 157 8.954124070477E-04 0.000000000000E+00 1.851419668016E+01 + 158 9.064259796544E-04 0.000000000000E+00 1.851419662865E+01 + 159 9.175750192041E-04 0.000000000000E+00 1.851419657521E+01 + 160 9.288611919403E-04 0.000000000000E+00 1.851419651978E+01 + 161 9.402861846012E-04 0.000000000000E+00 1.851419646228E+01 + 162 9.518517046718E-04 0.000000000000E+00 1.851419640264E+01 + 163 9.635594806392E-04 0.000000000000E+00 1.851419634077E+01 + 164 9.754112622511E-04 0.000000000000E+00 1.851419627660E+01 + 165 9.874088207768E-04 0.000000000000E+00 1.851419621003E+01 + 166 9.995539492723E-04 0.000000000000E+00 1.851419614097E+01 + 167 1.011848462848E-03 0.000000000000E+00 1.851419606935E+01 + 168 1.024294198941E-03 0.000000000000E+00 1.851419599505E+01 + 169 1.036893017588E-03 0.000000000000E+00 1.851419591797E+01 + 170 1.049646801705E-03 0.000000000000E+00 1.851419583803E+01 + 171 1.062557457366E-03 0.000000000000E+00 1.851419575510E+01 + 172 1.075626914091E-03 0.000000000000E+00 1.851419566908E+01 + 173 1.088857125135E-03 0.000000000000E+00 1.851419557985E+01 + 174 1.102250067774E-03 0.000000000000E+00 1.851419548730E+01 + 175 1.115807743607E-03 0.000000000000E+00 1.851419539129E+01 + 176 1.129532178854E-03 0.000000000000E+00 1.851419529170E+01 + 177 1.143425424654E-03 0.000000000000E+00 1.851419518840E+01 + 178 1.157489557377E-03 0.000000000000E+00 1.851419508124E+01 + 179 1.171726678933E-03 0.000000000000E+00 1.851419497009E+01 + 180 1.186138917084E-03 0.000000000000E+00 1.851419485479E+01 + 181 1.200728425764E-03 0.000000000000E+00 1.851419473520E+01 + 182 1.215497385401E-03 0.000000000000E+00 1.851419461114E+01 + 183 1.230448003241E-03 0.000000000000E+00 1.851419448246E+01 + 184 1.245582513681E-03 0.000000000000E+00 1.851419434899E+01 + 185 1.260903178599E-03 0.000000000000E+00 1.851419421053E+01 + 186 1.276412287696E-03 0.000000000000E+00 1.851419406691E+01 + 187 1.292112158835E-03 0.000000000000E+00 1.851419391794E+01 + 188 1.308005138388E-03 0.000000000000E+00 1.851419376341E+01 + 189 1.324093601590E-03 0.000000000000E+00 1.851419360313E+01 + 190 1.340379952890E-03 0.000000000000E+00 1.851419343686E+01 + 191 1.356866626310E-03 0.000000000000E+00 1.851419326440E+01 + 192 1.373556085814E-03 0.000000000000E+00 1.851419308551E+01 + 193 1.390450825670E-03 0.000000000000E+00 1.851419289995E+01 + 194 1.407553370825E-03 0.000000000000E+00 1.851419270747E+01 + 195 1.424866277287E-03 0.000000000000E+00 1.851419250782E+01 + 196 1.442392132497E-03 0.000000000000E+00 1.851419230073E+01 + 197 1.460133555727E-03 0.000000000000E+00 1.851419208591E+01 + 198 1.478093198462E-03 0.000000000000E+00 1.851419186309E+01 + 199 1.496273744803E-03 0.000000000000E+00 1.851419163197E+01 + 200 1.514677911865E-03 0.000000000000E+00 1.851419139223E+01 + 201 1.533308450180E-03 0.000000000000E+00 1.851419114355E+01 + 202 1.552168144118E-03 0.000000000000E+00 1.851419088561E+01 + 203 1.571259812290E-03 0.000000000000E+00 1.851419061805E+01 + 204 1.590586307981E-03 0.000000000000E+00 1.851419034052E+01 + 205 1.610150519570E-03 0.000000000000E+00 1.851419005265E+01 + 206 1.629955370960E-03 0.000000000000E+00 1.851418975406E+01 + 207 1.650003822023E-03 0.000000000000E+00 1.851418944433E+01 + 208 1.670298869034E-03 0.000000000000E+00 1.851418912307E+01 + 209 1.690843545123E-03 0.000000000000E+00 1.851418878983E+01 + 210 1.711640920728E-03 0.000000000000E+00 1.851418844418E+01 + 211 1.732694104053E-03 0.000000000000E+00 1.851418808564E+01 + 212 1.754006241533E-03 0.000000000000E+00 1.851418771375E+01 + 213 1.775580518304E-03 0.000000000000E+00 1.851418732801E+01 + 214 1.797420158679E-03 0.000000000000E+00 1.851418692789E+01 + 215 1.819528426631E-03 0.000000000000E+00 1.851418651287E+01 + 216 1.841908626278E-03 0.000000000000E+00 1.851418608238E+01 + 217 1.864564102381E-03 0.000000000000E+00 1.851418563586E+01 + 218 1.887498240841E-03 0.000000000000E+00 1.851418517271E+01 + 219 1.910714469203E-03 0.000000000000E+00 1.851418469230E+01 + 220 1.934216257174E-03 0.000000000000E+00 1.851418419400E+01 + 221 1.958007117138E-03 0.000000000000E+00 1.851418367714E+01 + 222 1.982090604678E-03 0.000000000000E+00 1.851418314103E+01 + 223 2.006470319116E-03 0.000000000000E+00 1.851418258495E+01 + 224 2.031149904041E-03 0.000000000000E+00 1.851418200816E+01 + 225 2.056133047861E-03 0.000000000000E+00 1.851418140990E+01 + 226 2.081423484349E-03 0.000000000000E+00 1.851418078935E+01 + 227 2.107024993207E-03 0.000000000000E+00 1.851418014569E+01 + 228 2.132941400623E-03 0.000000000000E+00 1.851417947807E+01 + 229 2.159176579851E-03 0.000000000000E+00 1.851417878559E+01 + 230 2.185734451783E-03 0.000000000000E+00 1.851417806732E+01 + 231 2.212618985540E-03 0.000000000000E+00 1.851417732231E+01 + 232 2.239834199062E-03 0.000000000000E+00 1.851417654957E+01 + 233 2.267384159711E-03 0.000000000000E+00 1.851417574805E+01 + 234 2.295272984875E-03 0.000000000000E+00 1.851417491670E+01 + 235 2.323504842589E-03 0.000000000000E+00 1.851417405439E+01 + 236 2.352083952153E-03 0.000000000000E+00 1.851417315999E+01 + 237 2.381014584765E-03 0.000000000000E+00 1.851417223230E+01 + 238 2.410301064157E-03 0.000000000000E+00 1.851417127007E+01 + 239 2.439947767246E-03 0.000000000000E+00 1.851417027204E+01 + 240 2.469959124783E-03 0.000000000000E+00 1.851416923685E+01 + 241 2.500339622018E-03 0.000000000000E+00 1.851416816315E+01 + 242 2.531093799369E-03 0.000000000000E+00 1.851416704948E+01 + 243 2.562226253101E-03 0.000000000000E+00 1.851416589437E+01 + 244 2.593741636014E-03 0.000000000000E+00 1.851416469628E+01 + 245 2.625644658137E-03 0.000000000000E+00 1.851416345361E+01 + 246 2.657940087432E-03 0.000000000000E+00 1.851416216470E+01 + 247 2.690632750508E-03 0.000000000000E+00 1.851416082784E+01 + 248 2.723727533339E-03 0.000000000000E+00 1.851415944124E+01 + 249 2.757229381999E-03 0.000000000000E+00 1.851415800306E+01 + 250 2.791143303398E-03 0.000000000000E+00 1.851415651137E+01 + 251 2.825474366029E-03 0.000000000000E+00 1.851415496420E+01 + 252 2.860227700732E-03 0.000000000000E+00 1.851415335948E+01 + 253 2.895408501451E-03 0.000000000000E+00 1.851415169507E+01 + 254 2.931022026018E-03 0.000000000000E+00 1.851414996876E+01 + 255 2.967073596939E-03 0.000000000000E+00 1.851414817825E+01 + 256 3.003568602181E-03 0.000000000000E+00 1.851414632116E+01 + 257 3.040512495988E-03 0.000000000000E+00 1.851414439500E+01 + 258 3.077910799688E-03 0.000000000000E+00 1.851414239722E+01 + 259 3.115769102525E-03 0.000000000000E+00 1.851414032517E+01 + 260 3.154093062486E-03 0.000000000000E+00 1.851413817607E+01 + 261 3.192888407154E-03 0.000000000000E+00 1.851413594707E+01 + 262 3.232160934562E-03 0.000000000000E+00 1.851413363522E+01 + 263 3.271916514057E-03 0.000000000000E+00 1.851413123742E+01 + 264 3.312161087180E-03 0.000000000000E+00 1.851412875049E+01 + 265 3.352900668553E-03 0.000000000000E+00 1.851412617113E+01 + 266 3.394141346776E-03 0.000000000000E+00 1.851412349591E+01 + 267 3.435889285341E-03 0.000000000000E+00 1.851412072126E+01 + 268 3.478150723551E-03 0.000000000000E+00 1.851411784350E+01 + 269 3.520931977450E-03 0.000000000000E+00 1.851411485881E+01 + 270 3.564239440773E-03 0.000000000000E+00 1.851411176322E+01 + 271 3.608079585895E-03 0.000000000000E+00 1.851410855261E+01 + 272 3.652458964801E-03 0.000000000000E+00 1.851410522272E+01 + 273 3.697384210068E-03 0.000000000000E+00 1.851410176913E+01 + 274 3.742862035852E-03 0.000000000000E+00 1.851409818725E+01 + 275 3.788899238893E-03 0.000000000000E+00 1.851409447232E+01 + 276 3.835502699531E-03 0.000000000000E+00 1.851409061942E+01 + 277 3.882679382736E-03 0.000000000000E+00 1.851408662342E+01 + 278 3.930436339143E-03 0.000000000000E+00 1.851408247903E+01 + 279 3.978780706115E-03 0.000000000000E+00 1.851407818074E+01 + 280 4.027719708800E-03 0.000000000000E+00 1.851407372286E+01 + 281 4.077260661218E-03 0.000000000000E+00 1.851406909946E+01 + 282 4.127410967351E-03 0.000000000000E+00 1.851406430442E+01 + 283 4.178178122249E-03 0.000000000000E+00 1.851405933137E+01 + 284 4.229569713153E-03 0.000000000000E+00 1.851405417373E+01 + 285 4.281593420625E-03 0.000000000000E+00 1.851404882465E+01 + 286 4.334257019699E-03 0.000000000000E+00 1.851404327706E+01 + 287 4.387568381041E-03 0.000000000000E+00 1.851403752359E+01 + 288 4.441535472128E-03 0.000000000000E+00 1.851403155662E+01 + 289 4.496166358435E-03 0.000000000000E+00 1.851402536825E+01 + 290 4.551469204644E-03 0.000000000000E+00 1.851401895028E+01 + 291 4.607452275861E-03 0.000000000000E+00 1.851401229422E+01 + 292 4.664123938854E-03 0.000000000000E+00 1.851400539125E+01 + 293 4.721492663302E-03 0.000000000000E+00 1.851399823224E+01 + 294 4.779567023060E-03 0.000000000000E+00 1.851399080772E+01 + 295 4.838355697444E-03 0.000000000000E+00 1.851398310785E+01 + 296 4.897867472523E-03 0.000000000000E+00 1.851397512246E+01 + 297 4.958111242435E-03 0.000000000000E+00 1.851396684098E+01 + 298 5.019096010717E-03 0.000000000000E+00 1.851395825246E+01 + 299 5.080830891648E-03 0.000000000000E+00 1.851394934556E+01 + 300 5.143325111616E-03 0.000000000000E+00 1.851394010849E+01 + 301 5.206588010488E-03 0.000000000000E+00 1.851393052906E+01 + 302 5.270629043017E-03 0.000000000000E+00 1.851392059461E+01 + 303 5.335457780247E-03 0.000000000000E+00 1.851391029201E+01 + 304 5.401083910944E-03 0.000000000000E+00 1.851389960766E+01 + 305 5.467517243048E-03 0.000000000000E+00 1.851388852746E+01 + 306 5.534767705138E-03 0.000000000000E+00 1.851387703678E+01 + 307 5.602845347911E-03 0.000000000000E+00 1.851386512046E+01 + 308 5.671760345690E-03 0.000000000000E+00 1.851385276278E+01 + 309 5.741522997942E-03 0.000000000000E+00 1.851383994744E+01 + 310 5.812143730817E-03 0.000000000000E+00 1.851382665755E+01 + 311 5.883633098706E-03 0.000000000000E+00 1.851381287557E+01 + 312 5.956001785820E-03 0.000000000000E+00 1.851379858336E+01 + 313 6.029260607786E-03 0.000000000000E+00 1.851378376207E+01 + 314 6.103420513262E-03 0.000000000000E+00 1.851376839218E+01 + 315 6.178492585575E-03 0.000000000000E+00 1.851375245346E+01 + 316 6.254488044377E-03 0.000000000000E+00 1.851373592492E+01 + 317 6.331418247323E-03 0.000000000000E+00 1.851371878480E+01 + 318 6.409294691765E-03 0.000000000000E+00 1.851370101055E+01 + 319 6.488129016474E-03 0.000000000000E+00 1.851368257879E+01 + 320 6.567933003376E-03 0.000000000000E+00 1.851366346527E+01 + 321 6.648718579318E-03 0.000000000000E+00 1.851364364488E+01 + 322 6.730497817843E-03 0.000000000000E+00 1.851362309155E+01 + 323 6.813282941003E-03 0.000000000000E+00 1.851360177828E+01 + 324 6.897086321177E-03 0.000000000000E+00 1.851357967707E+01 + 325 6.981920482928E-03 0.000000000000E+00 1.851355675890E+01 + 326 7.067798104868E-03 0.000000000000E+00 1.851353299368E+01 + 327 7.154732021558E-03 0.000000000000E+00 1.851350835022E+01 + 328 7.242735225423E-03 0.000000000000E+00 1.851348279618E+01 + 329 7.331820868696E-03 0.000000000000E+00 1.851345629806E+01 + 330 7.422002265381E-03 0.000000000000E+00 1.851342882110E+01 + 331 7.513292893245E-03 0.000000000000E+00 1.851340032929E+01 + 332 7.605706395832E-03 0.000000000000E+00 1.851337078529E+01 + 333 7.699256584500E-03 0.000000000000E+00 1.851334015041E+01 + 334 7.793957440490E-03 0.000000000000E+00 1.851330838452E+01 + 335 7.889823117008E-03 0.000000000000E+00 1.851327544605E+01 + 336 7.986867941347E-03 0.000000000000E+00 1.851324129189E+01 + 337 8.085106417026E-03 0.000000000000E+00 1.851320587736E+01 + 338 8.184553225955E-03 0.000000000000E+00 1.851316915615E+01 + 339 8.285223230634E-03 0.000000000000E+00 1.851313108025E+01 + 340 8.387131476371E-03 0.000000000000E+00 1.851309159991E+01 + 341 8.490293193530E-03 0.000000000000E+00 1.851305066356E+01 + 342 8.594723799811E-03 0.000000000000E+00 1.851300821774E+01 + 343 8.700438902548E-03 0.000000000000E+00 1.851296420705E+01 + 344 8.807454301050E-03 0.000000000000E+00 1.851291857405E+01 + 345 8.915785988953E-03 0.000000000000E+00 1.851287125923E+01 + 346 9.025450156617E-03 0.000000000000E+00 1.851282220089E+01 + 347 9.136463193543E-03 0.000000000000E+00 1.851277133510E+01 + 348 9.248841690824E-03 0.000000000000E+00 1.851271859559E+01 + 349 9.362602443621E-03 0.000000000000E+00 1.851266391367E+01 + 350 9.477762453677E-03 0.000000000000E+00 1.851260721817E+01 + 351 9.594338931858E-03 0.000000000000E+00 1.851254843531E+01 + 352 9.712349300719E-03 0.000000000000E+00 1.851248748863E+01 + 353 9.831811197118E-03 0.000000000000E+00 1.851242429889E+01 + 354 9.952742474843E-03 0.000000000000E+00 1.851235878397E+01 + 355 1.007516120728E-02 0.000000000000E+00 1.851229085878E+01 + 356 1.019908569013E-02 0.000000000000E+00 1.851222043511E+01 + 357 1.032453444412E-02 0.000000000000E+00 1.851214742155E+01 + 358 1.045152621778E-02 0.000000000000E+00 1.851207172340E+01 + 359 1.058007999026E-02 0.000000000000E+00 1.851199324250E+01 + 360 1.071021497414E-02 0.000000000000E+00 1.851191187712E+01 + 361 1.084195061833E-02 0.000000000000E+00 1.851182752187E+01 + 362 1.097530661093E-02 0.000000000000E+00 1.851174006750E+01 + 363 1.111030288224E-02 0.000000000000E+00 1.851164940084E+01 + 364 1.124695960770E-02 0.000000000000E+00 1.851155540459E+01 + 365 1.138529721087E-02 0.000000000000E+00 1.851145795723E+01 + 366 1.152533636656E-02 0.000000000000E+00 1.851135693281E+01 + 367 1.166709800387E-02 0.000000000000E+00 1.851125220084E+01 + 368 1.181060330932E-02 0.000000000000E+00 1.851114362611E+01 + 369 1.195587373003E-02 0.000000000000E+00 1.851103106853E+01 + 370 1.210293097691E-02 0.000000000000E+00 1.851091438293E+01 + 371 1.225179702792E-02 0.000000000000E+00 1.851079341890E+01 + 372 1.240249413137E-02 0.000000000000E+00 1.851066802061E+01 + 373 1.255504480918E-02 0.000000000000E+00 1.851053802659E+01 + 374 1.270947186033E-02 0.000000000000E+00 1.851040326956E+01 + 375 1.286579836422E-02 0.000000000000E+00 1.851026357620E+01 + 376 1.302404768410E-02 0.000000000000E+00 1.851011876694E+01 + 377 1.318424347061E-02 0.000000000000E+00 1.850996865574E+01 + 378 1.334640966530E-02 0.000000000000E+00 1.850981304988E+01 + 379 1.351057050418E-02 0.000000000000E+00 1.850965174968E+01 + 380 1.367675052138E-02 0.000000000000E+00 1.850948454829E+01 + 381 1.384497455280E-02 0.000000000000E+00 1.850931123141E+01 + 382 1.401526773979E-02 0.000000000000E+00 1.850913157705E+01 + 383 1.418765553299E-02 0.000000000000E+00 1.850894535524E+01 + 384 1.436216369605E-02 0.000000000000E+00 1.850875232775E+01 + 385 1.453881830951E-02 0.000000000000E+00 1.850855224782E+01 + 386 1.471764577472E-02 0.000000000000E+00 1.850834485980E+01 + 387 1.489867281775E-02 0.000000000000E+00 1.850812989893E+01 + 388 1.508192649341E-02 0.000000000000E+00 1.850790709091E+01 + 389 1.526743418928E-02 0.000000000000E+00 1.850767615165E+01 + 390 1.545522362980E-02 0.000000000000E+00 1.850743678688E+01 + 391 1.564532288045E-02 0.000000000000E+00 1.850718869182E+01 + 392 1.583776035188E-02 0.000000000000E+00 1.850693155077E+01 + 393 1.603256480421E-02 0.000000000000E+00 1.850666503677E+01 + 394 1.622976535130E-02 0.000000000000E+00 1.850638881118E+01 + 395 1.642939146512E-02 0.000000000000E+00 1.850610252327E+01 + 396 1.663147298014E-02 0.000000000000E+00 1.850580580980E+01 + 397 1.683604009780E-02 0.000000000000E+00 1.850549829460E+01 + 398 1.704312339100E-02 0.000000000000E+00 1.850517958807E+01 + 399 1.725275380871E-02 0.000000000000E+00 1.850484928676E+01 + 400 1.746496268056E-02 0.000000000000E+00 1.850450697288E+01 + 401 1.767978172153E-02 0.000000000000E+00 1.850415221375E+01 + 402 1.789724303670E-02 0.000000000000E+00 1.850378456134E+01 + 403 1.811737912605E-02 0.000000000000E+00 1.850340355171E+01 + 404 1.834022288930E-02 0.000000000000E+00 1.850300870446E+01 + 405 1.856580763084E-02 0.000000000000E+00 1.850259952214E+01 + 406 1.879416706470E-02 0.000000000000E+00 1.850217548968E+01 + 407 1.902533531960E-02 0.000000000000E+00 1.850173607377E+01 + 408 1.925934694403E-02 0.000000000000E+00 1.850128072225E+01 + 409 1.949623691144E-02 0.000000000000E+00 1.850080886339E+01 + 410 1.973604062545E-02 0.000000000000E+00 1.850031990530E+01 + 411 1.997879392514E-02 0.000000000000E+00 1.849981323517E+01 + 412 2.022453309042E-02 0.000000000000E+00 1.849928821857E+01 + 413 2.047329484744E-02 0.000000000000E+00 1.849874419870E+01 + 414 2.072511637406E-02 0.000000000000E+00 1.849818049564E+01 + 415 2.098003530546E-02 0.000000000000E+00 1.849759640551E+01 + 416 2.123808973972E-02 0.000000000000E+00 1.849699119970E+01 + 417 2.149931824352E-02 0.000000000000E+00 1.849636412396E+01 + 418 2.176375985791E-02 0.000000000000E+00 1.849571439758E+01 + 419 2.203145410416E-02 0.000000000000E+00 1.849504121245E+01 + 420 2.230244098964E-02 0.000000000000E+00 1.849434373212E+01 + 421 2.257676101382E-02 0.000000000000E+00 1.849362109085E+01 + 422 2.285445517429E-02 0.000000000000E+00 1.849287239261E+01 + 423 2.313556497293E-02 0.000000000000E+00 1.849209671000E+01 + 424 2.342013242210E-02 0.000000000000E+00 1.849129308327E+01 + 425 2.370820005089E-02 0.000000000000E+00 1.849046051913E+01 + 426 2.399981091152E-02 0.000000000000E+00 1.848959798967E+01 + 427 2.429500858573E-02 0.000000000000E+00 1.848870443117E+01 + 428 2.459383719133E-02 0.000000000000E+00 1.848777874287E+01 + 429 2.489634138878E-02 0.000000000000E+00 1.848681978575E+01 + 430 2.520256638787E-02 0.000000000000E+00 1.848582638120E+01 + 431 2.551255795444E-02 0.000000000000E+00 1.848479730971E+01 + 432 2.582636241728E-02 0.000000000000E+00 1.848373130949E+01 + 433 2.614402667501E-02 0.000000000000E+00 1.848262707506E+01 + 434 2.646559820311E-02 0.000000000000E+00 1.848148325573E+01 + 435 2.679112506101E-02 0.000000000000E+00 1.848029845416E+01 + 436 2.712065589926E-02 0.000000000000E+00 1.847907122475E+01 + 437 2.745423996682E-02 0.000000000000E+00 1.847780007204E+01 + 438 2.779192711841E-02 0.000000000000E+00 1.847648344903E+01 + 439 2.813376782197E-02 0.000000000000E+00 1.847511975550E+01 + 440 2.847981316618E-02 0.000000000000E+00 1.847370733622E+01 + 441 2.883011486812E-02 0.000000000000E+00 1.847224447911E+01 + 442 2.918472528100E-02 0.000000000000E+00 1.847072941336E+01 + 443 2.954369740196E-02 0.000000000000E+00 1.846916030754E+01 + 444 2.990708488000E-02 0.000000000000E+00 1.846753526750E+01 + 445 3.027494202403E-02 0.000000000000E+00 1.846585233440E+01 + 446 3.064732381092E-02 0.000000000000E+00 1.846410948253E+01 + 447 3.102428589380E-02 0.000000000000E+00 1.846230461710E+01 + 448 3.140588461029E-02 0.000000000000E+00 1.846043557203E+01 + 449 3.179217699100E-02 0.000000000000E+00 1.845850010757E+01 + 450 3.218322076799E-02 0.000000000000E+00 1.845649590793E+01 + 451 3.257907438343E-02 0.000000000000E+00 1.845442057875E+01 + 452 3.297979699835E-02 0.000000000000E+00 1.845227164463E+01 + 453 3.338544850143E-02 0.000000000000E+00 1.845004654642E+01 + 454 3.379608951800E-02 0.000000000000E+00 1.844774263853E+01 + 455 3.421178141907E-02 0.000000000000E+00 1.844535718618E+01 + 456 3.463258633052E-02 0.000000000000E+00 1.844288736248E+01 + 457 3.505856714239E-02 0.000000000000E+00 1.844033024546E+01 + 458 3.548978751824E-02 0.000000000000E+00 1.843768281506E+01 + 459 3.592631190471E-02 0.000000000000E+00 1.843494194997E+01 + 460 3.636820554114E-02 0.000000000000E+00 1.843210442439E+01 + 461 3.681553446930E-02 0.000000000000E+00 1.842916690469E+01 + 462 3.726836554327E-02 0.000000000000E+00 1.842612594604E+01 + 463 3.772676643945E-02 0.000000000000E+00 1.842297798880E+01 + 464 3.819080566666E-02 0.000000000000E+00 1.841971935496E+01 + 465 3.866055257636E-02 0.000000000000E+00 1.841634624438E+01 + 466 3.913607737305E-02 0.000000000000E+00 1.841285473092E+01 + 467 3.961745112473E-02 0.000000000000E+00 1.840924075856E+01 + 468 4.010474577357E-02 0.000000000000E+00 1.840550013727E+01 + 469 4.059803414658E-02 0.000000000000E+00 1.840162853886E+01 + 470 4.109738996659E-02 0.000000000000E+00 1.839762149266E+01 + 471 4.160288786318E-02 0.000000000000E+00 1.839347438114E+01 + 472 4.211460338389E-02 0.000000000000E+00 1.838918243533E+01 + 473 4.263261300551E-02 0.000000000000E+00 1.838474073019E+01 + 474 4.315699414548E-02 0.000000000000E+00 1.838014417978E+01 + 475 4.368782517347E-02 0.000000000000E+00 1.837538753234E+01 + 476 4.422518542311E-02 0.000000000000E+00 1.837046536525E+01 + 477 4.476915520381E-02 0.000000000000E+00 1.836537207978E+01 + 478 4.531981581282E-02 0.000000000000E+00 1.836010189582E+01 + 479 4.587724954732E-02 0.000000000000E+00 1.835464884634E+01 + 480 4.644153971675E-02 0.000000000000E+00 1.834900677179E+01 + 481 4.701277065526E-02 0.000000000000E+00 1.834316931431E+01 + 482 4.759102773432E-02 0.000000000000E+00 1.833712991181E+01 + 483 4.817639737545E-02 0.000000000000E+00 1.833088179188E+01 + 484 4.876896706317E-02 0.000000000000E+00 1.832441796557E+01 + 485 4.936882535805E-02 0.000000000000E+00 1.831773122095E+01 + 486 4.997606190995E-02 0.000000000000E+00 1.831081411660E+01 + 487 5.059076747145E-02 0.000000000000E+00 1.830365897485E+01 + 488 5.121303391134E-02 0.000000000000E+00 1.829625787489E+01 + 489 5.184295422845E-02 0.000000000000E+00 1.828860264570E+01 + 490 5.248062256546E-02 0.000000000000E+00 1.828068485884E+01 + 491 5.312613422302E-02 0.000000000000E+00 1.827249582100E+01 + 492 5.377958567396E-02 0.000000000000E+00 1.826402656643E+01 + 493 5.444107457775E-02 0.000000000000E+00 1.825526784915E+01 + 494 5.511069979506E-02 0.000000000000E+00 1.824621013501E+01 + 495 5.578856140254E-02 0.000000000000E+00 1.823684359356E+01 + 496 5.647476070779E-02 0.000000000000E+00 1.822715808968E+01 + 497 5.716940026449E-02 0.000000000000E+00 1.821714317510E+01 + 498 5.787258388775E-02 0.000000000000E+00 1.820678807970E+01 + 499 5.858441666957E-02 0.000000000000E+00 1.819608170256E+01 + 500 5.930500499460E-02 0.000000000000E+00 1.818501260291E+01 + 501 6.003445655604E-02 0.000000000000E+00 1.817356899084E+01 + 502 6.077288037168E-02 0.000000000000E+00 1.816173871777E+01 + 503 6.152038680025E-02 0.000000000000E+00 1.814950926681E+01 + 504 6.227708755789E-02 0.000000000000E+00 1.813686774285E+01 + 505 6.304309573485E-02 0.000000000000E+00 1.812380086248E+01 + 506 6.381852581239E-02 0.000000000000E+00 1.811029494372E+01 + 507 6.460349367988E-02 0.000000000000E+00 1.809633589551E+01 + 508 6.539811665215E-02 0.000000000000E+00 1.808190920705E+01 + 509 6.620251348697E-02 0.000000000000E+00 1.806699993691E+01 + 510 6.701680440286E-02 0.000000000000E+00 1.805159270194E+01 + 511 6.784111109701E-02 0.000000000000E+00 1.803567166598E+01 + 512 6.867555676351E-02 0.000000000000E+00 1.801922052844E+01 + 513 6.952026611170E-02 0.000000000000E+00 1.800222251254E+01 + 514 7.037536538487E-02 0.000000000000E+00 1.798466035354E+01 + 515 7.124098237911E-02 0.000000000000E+00 1.796651628663E+01 + 516 7.211724646237E-02 0.000000000000E+00 1.794777203470E+01 + 517 7.300428859385E-02 0.000000000000E+00 1.792840879593E+01 + 518 7.390224134356E-02 0.000000000000E+00 1.790840723121E+01 + 519 7.481123891209E-02 0.000000000000E+00 1.788774745133E+01 + 520 7.573141715070E-02 0.000000000000E+00 1.786640900406E+01 + 521 7.666291358166E-02 0.000000000000E+00 1.784437086104E+01 + 522 7.760586741871E-02 0.000000000000E+00 1.782161140453E+01 + 523 7.856041958796E-02 0.000000000000E+00 1.779810841398E+01 + 524 7.952671274889E-02 0.000000000000E+00 1.777383905252E+01 + 525 8.050489131570E-02 0.000000000000E+00 1.774877985322E+01 + 526 8.149510147889E-02 0.000000000000E+00 1.772290670535E+01 + 527 8.249749122708E-02 0.000000000000E+00 1.769619484039E+01 + 528 8.351221036917E-02 0.000000000000E+00 1.766861881809E+01 + 529 8.453941055671E-02 0.000000000000E+00 1.764015251228E+01 + 530 8.557924530656E-02 0.000000000000E+00 1.761076909675E+01 + 531 8.663187002383E-02 0.000000000000E+00 1.758044103096E+01 + 532 8.769744202512E-02 0.000000000000E+00 1.754914004577E+01 + 533 8.877612056203E-02 0.000000000000E+00 1.751683712909E+01 + 534 8.986806684495E-02 0.000000000000E+00 1.748350251154E+01 + 535 9.097344406714E-02 0.000000000000E+00 1.744910565215E+01 + 536 9.209241742917E-02 0.000000000000E+00 1.741361522399E+01 + 537 9.322515416354E-02 0.000000000000E+00 1.737699909995E+01 + 538 9.437182355975E-02 0.000000000000E+00 1.733922433852E+01 + 539 9.553259698954E-02 0.000000000000E+00 1.730025716966E+01 + 540 9.670764793251E-02 0.000000000000E+00 1.726006298085E+01 + 541 9.789715200208E-02 0.000000000000E+00 1.721860630324E+01 + 542 9.910128697171E-02 0.000000000000E+00 1.717585079792E+01 + 543 1.003202328015E-01 0.000000000000E+00 1.713175924252E+01 + 544 1.015541716649E-01 0.000000000000E+00 1.708629351791E+01 + 545 1.028032879764E-01 0.000000000000E+00 1.703941459529E+01 + 546 1.040677684185E-01 0.000000000000E+00 1.699108252346E+01 + 547 1.053478019701E-01 0.000000000000E+00 1.694125641654E+01 + 548 1.066435799343E-01 0.000000000000E+00 1.688989444203E+01 + 549 1.079552959675E-01 0.000000000000E+00 1.683695380925E+01 + 550 1.092831461079E-01 0.000000000000E+00 1.678239075830E+01 + 551 1.106273288050E-01 0.000000000000E+00 1.672616054953E+01 + 552 1.119880449493E-01 0.000000000000E+00 1.666821745356E+01 + 553 1.133654979022E-01 0.000000000000E+00 1.660851474187E+01 + 554 1.147598935264E-01 0.000000000000E+00 1.654700467812E+01 + 555 1.161714402167E-01 0.000000000000E+00 1.648363851018E+01 + 556 1.176003489314E-01 0.000000000000E+00 1.641836646284E+01 + 557 1.190468332233E-01 0.000000000000E+00 1.635113773152E+01 + 558 1.205111092719E-01 0.000000000000E+00 1.628190047676E+01 + 559 1.219933959160E-01 0.000000000000E+00 1.621060181968E+01 + 560 1.234939146857E-01 0.000000000000E+00 1.613718783857E+01 + 561 1.250128898364E-01 0.000000000000E+00 1.606160356647E+01 + 562 1.265505483813E-01 0.000000000000E+00 1.598379299003E+01 + 563 1.281071201264E-01 0.000000000000E+00 1.590369904956E+01 + 564 1.296828377040E-01 0.000000000000E+00 1.582126364047E+01 + 565 1.312779366078E-01 0.000000000000E+00 1.573642761610E+01 + 566 1.328926552280E-01 0.000000000000E+00 1.564913079208E+01 + 567 1.345272348873E-01 0.000000000000E+00 1.555931195229E+01 + 568 1.361819198765E-01 0.000000000000E+00 1.546690885653E+01 + 569 1.378569574909E-01 0.000000000000E+00 1.537185824996E+01 + 570 1.395525980681E-01 0.000000000000E+00 1.527409587442E+01 + 571 1.412690950243E-01 0.000000000000E+00 1.517355648180E+01 + 572 1.430067048931E-01 0.000000000000E+00 1.507017384948E+01 + 573 1.447656873633E-01 0.000000000000E+00 1.496388079798E+01 + 574 1.465463053179E-01 0.000000000000E+00 1.485460921093E+01 + 575 1.483488248733E-01 0.000000000000E+00 1.474229005753E+01 + 576 1.501735154192E-01 0.000000000000E+00 1.462685341752E+01 + 577 1.520206496589E-01 0.000000000000E+00 1.450822850889E+01 + 578 1.538905036497E-01 0.000000000000E+00 1.438634371833E+01 + 579 1.557833568446E-01 0.000000000000E+00 1.426112663474E+01 + 580 1.576994921338E-01 0.000000000000E+00 1.413250408570E+01 + 581 1.596391958870E-01 0.000000000000E+00 1.400040217724E+01 + 582 1.616027579964E-01 0.000000000000E+00 1.386474633692E+01 + 583 1.635904719198E-01 0.000000000000E+00 1.372546136040E+01 + 584 1.656026347244E-01 0.000000000000E+00 1.358247146171E+01 + 585 1.676395471315E-01 0.000000000000E+00 1.343570032723E+01 + 586 1.697015135612E-01 0.000000000000E+00 1.328507117366E+01 + 587 1.717888421780E-01 0.000000000000E+00 1.313050681006E+01 + 588 1.739018449368E-01 0.000000000000E+00 1.297192970414E+01 + 589 1.760408376295E-01 0.000000000000E+00 1.280926205292E+01 + 590 1.782061399324E-01 0.000000000000E+00 1.264242585799E+01 + 591 1.803980754535E-01 0.000000000000E+00 1.247134300542E+01 + 592 1.826169717816E-01 0.000000000000E+00 1.229593535062E+01 + 593 1.848631605345E-01 0.000000000000E+00 1.211612480814E+01 + 594 1.871369774091E-01 0.000000000000E+00 1.193183344672E+01 + 595 1.894387622312E-01 0.000000000000E+00 1.174298358966E+01 + 596 1.917688590067E-01 0.000000000000E+00 1.154949792066E+01 + 597 1.941276159725E-01 0.000000000000E+00 1.135129959539E+01 + 598 1.965153856489E-01 0.000000000000E+00 1.114831235878E+01 + 599 1.989325248924E-01 0.000000000000E+00 1.094046066834E+01 + 600 2.013793949486E-01 0.000000000000E+00 1.072766982356E+01 + 601 2.038563615064E-01 0.000000000000E+00 1.050986610155E+01 + 602 2.063637947530E-01 0.000000000000E+00 1.028697689904E+01 + 603 2.089020694284E-01 0.000000000000E+00 1.005893088100E+01 + 604 2.114715648824E-01 0.000000000000E+00 9.825658135810E+00 + 605 2.140726651305E-01 0.000000000000E+00 9.587090337196E+00 + 606 2.167057589116E-01 0.000000000000E+00 9.343160913119E+00 + 607 2.193712397462E-01 0.000000000000E+00 9.093805221563E+00 + 608 2.220695059950E-01 0.000000000000E+00 8.838960733429E+00 + 609 2.248009609188E-01 0.000000000000E+00 8.578567222567E+00 + 610 2.275660127381E-01 0.000000000000E+00 8.312566963020E+00 + 611 2.303650746948E-01 0.000000000000E+00 8.040904933534E+00 + 612 2.331985651135E-01 0.000000000000E+00 7.763529029372E+00 + 613 2.360669074644E-01 0.000000000000E+00 7.480390281453E+00 + 614 2.389705304262E-01 0.000000000000E+00 7.191443082815E+00 + 615 2.419098679505E-01 0.000000000000E+00 6.896645422382E+00 + 616 2.448853593263E-01 0.000000000000E+00 6.595959126014E+00 + 617 2.478974492460E-01 0.000000000000E+00 6.289350104746E+00 + 618 2.509465878717E-01 0.000000000000E+00 5.976788610163E+00 + 619 2.540332309025E-01 0.000000000000E+00 5.658249496774E+00 + 620 2.571578396426E-01 0.000000000000E+00 5.333712491262E+00 + 621 2.603208810702E-01 0.000000000000E+00 5.003162468415E+00 + 622 2.635228279074E-01 0.000000000000E+00 4.666589733559E+00 + 623 2.667641586907E-01 0.000000000000E+00 4.323990311240E+00 + 624 2.700453578425E-01 0.000000000000E+00 3.975366239877E+00 + 625 2.733669157440E-01 0.000000000000E+00 3.620725872084E+00 + 626 2.767293288077E-01 0.000000000000E+00 3.260084180295E+00 + 627 2.801330995520E-01 0.000000000000E+00 2.893463067304E+00 + 628 2.835787366765E-01 0.000000000000E+00 2.520891681267E+00 + 629 2.870667551376E-01 0.000000000000E+00 2.142406734676E+00 + 630 2.905976762258E-01 0.000000000000E+00 1.758052826776E+00 + 631 2.941720276434E-01 0.000000000000E+00 1.367882768807E+00 + 632 2.977903435834E-01 0.000000000000E+00 9.719579114521E-01 + 633 3.014531648095E-01 0.000000000000E+00 5.703484737499E-01 + 634 3.051610387366E-01 0.000000000000E+00 1.631338727421E-01 + 635 3.089145195131E-01 0.000000000000E+00 -2.495969470092E-01 + 636 3.127141681031E-01 0.000000000000E+00 -6.677451848886E-01 + 637 3.165605523707E-01 0.000000000000E+00 -1.091201857678E+00 + 638 3.204542471649E-01 0.000000000000E+00 -1.519847475991E+00 + 639 3.243958344050E-01 0.000000000000E+00 -1.953551724792E+00 + 640 3.283859031682E-01 0.000000000000E+00 -2.392173149192E+00 + 641 3.324250497772E-01 0.000000000000E+00 -2.835558846748E+00 + 642 3.365138778894E-01 0.000000000000E+00 -3.283544167593E+00 + 643 3.406529985875E-01 0.000000000000E+00 -3.735952423803E+00 + 644 3.448430304701E-01 0.000000000000E+00 -4.192594609477E+00 + 645 3.490845997449E-01 0.000000000000E+00 -4.653269133085E+00 + 646 3.533783403218E-01 0.000000000000E+00 -5.117761563735E+00 + 647 3.577248939077E-01 0.000000000000E+00 -5.585844393068E+00 + 648 3.621249101028E-01 0.000000000000E+00 -6.057276814589E+00 + 649 3.665790464970E-01 0.000000000000E+00 -6.531804522314E+00 + 650 3.710879687690E-01 0.000000000000E+00 -7.009159530709E+00 + 651 3.756523507848E-01 0.000000000000E+00 -7.489060017934E+00 + 652 3.802728746995E-01 0.000000000000E+00 -7.971210194543E+00 + 653 3.849502310583E-01 0.000000000000E+00 -8.455300199805E+00 + 654 3.896851189003E-01 0.000000000000E+00 -8.941006027929E+00 + 655 3.944782458628E-01 0.000000000000E+00 -9.427989486514E+00 + 656 3.993303282869E-01 0.000000000000E+00 -9.915898189628E+00 + 657 4.042420913248E-01 0.000000000000E+00 -1.040436558796E+01 + 658 4.092142690481E-01 0.000000000000E+00 -1.089301103855E+01 + 659 4.142476045574E-01 0.000000000000E+00 -1.138143991666E+01 + 660 4.193428500935E-01 0.000000000000E+00 -1.186924377240E+01 + 661 4.245007671496E-01 0.000000000000E+00 -1.235600053459E+01 + 662 4.297221265855E-01 0.000000000000E+00 -1.284127476474E+01 + 663 4.350077087426E-01 0.000000000000E+00 -1.332461796353E+01 + 664 4.403583035601E-01 0.000000000000E+00 -1.380556893258E+01 + 665 4.457747106939E-01 0.000000000000E+00 -1.428365419415E+01 + 666 4.512577396354E-01 0.000000000000E+00 -1.475838847118E+01 + 667 4.568082098329E-01 0.000000000000E+00 -1.522927523044E+01 + 668 4.624269508139E-01 0.000000000000E+00 -1.569580729105E+01 + 669 4.681148023089E-01 0.000000000000E+00 -1.615746750089E+01 + 670 4.738726143773E-01 0.000000000000E+00 -1.661372948307E+01 + 671 4.797012475341E-01 0.000000000000E+00 -1.706405845471E+01 + 672 4.856015728788E-01 0.000000000000E+00 -1.750791211988E+01 + 673 4.915744722252E-01 0.000000000000E+00 -1.794474163860E+01 + 674 4.976208382336E-01 0.000000000000E+00 -1.837399267349E+01 + 675 5.037415745438E-01 0.000000000000E+00 -1.879510651539E+01 + 676 5.099375959107E-01 0.000000000000E+00 -1.920752128901E+01 + 677 5.162098283404E-01 0.000000000000E+00 -1.961067323953E+01 + 678 5.225592092290E-01 0.000000000000E+00 -2.000399810042E+01 + 679 5.289866875025E-01 0.000000000000E+00 -2.038693254272E+01 + 680 5.354932237588E-01 0.000000000000E+00 -2.075891570538E+01 + 681 5.420797904110E-01 0.000000000000E+00 -2.111939080583E+01 + 682 5.487473718331E-01 0.000000000000E+00 -2.146780682970E+01 + 683 5.554969645066E-01 0.000000000000E+00 -2.180362029767E+01 + 684 5.623295771701E-01 0.000000000000E+00 -2.212629710731E+01 + 685 5.692462309693E-01 0.000000000000E+00 -2.243531444677E+01 + 686 5.762479596102E-01 0.000000000000E+00 -2.273016277679E+01 + 687 5.833358095134E-01 0.000000000000E+00 -2.301034787673E+01 + 688 5.905108399704E-01 0.000000000000E+00 -2.327539294945E+01 + 689 5.977741233021E-01 0.000000000000E+00 -2.352484077927E+01 + 690 6.051267450187E-01 0.000000000000E+00 -2.375825593639E+01 + 691 6.125698039824E-01 0.000000000000E+00 -2.397522702003E+01 + 692 6.201044125714E-01 0.000000000000E+00 -2.417536893218E+01 + 693 6.277316968460E-01 0.000000000000E+00 -2.435832517218E+01 + 694 6.354527967172E-01 0.000000000000E+00 -2.452377014219E+01 + 695 6.432688661168E-01 0.000000000000E+00 -2.467141145187E+01 + 696 6.511810731701E-01 0.000000000000E+00 -2.480099221011E+01 + 697 6.591906003701E-01 0.000000000000E+00 -2.491229329038E+01 + 698 6.672986447546E-01 0.000000000000E+00 -2.500513555516E+01 + 699 6.755064180851E-01 0.000000000000E+00 -2.507938202410E+01 + 700 6.838151470275E-01 0.000000000000E+00 -2.513493996921E+01 + 701 6.922260733360E-01 0.000000000000E+00 -2.517176291973E+01 + 702 7.007404540380E-01 0.000000000000E+00 -2.518985255791E+01 + 703 7.093595616227E-01 0.000000000000E+00 -2.518926048634E+01 + 704 7.180846842306E-01 0.000000000000E+00 -2.517008984641E+01 + 705 7.269171258467E-01 0.000000000000E+00 -2.513249676653E+01 + 706 7.358582064946E-01 0.000000000000E+00 -2.507669161835E+01 + 707 7.449092624345E-01 0.000000000000E+00 -2.500294005817E+01 + 708 7.540716463624E-01 0.000000000000E+00 -2.491156383060E+01 + 709 7.633467276127E-01 0.000000000000E+00 -2.480294131080E+01 + 710 7.727358923623E-01 0.000000000000E+00 -2.467750776188E+01 + 711 7.822405438384E-01 0.000000000000E+00 -2.453575528354E+01 + 712 7.918621025276E-01 0.000000000000E+00 -2.437823242886E+01 + 713 8.016020063887E-01 0.000000000000E+00 -2.420554346598E+01 + 714 8.114617110672E-01 0.000000000000E+00 -2.401834726277E+01 + 715 8.214426901134E-01 0.000000000000E+00 -2.381735577328E+01 + 716 8.315464352018E-01 0.000000000000E+00 -2.360333210636E+01 + 717 8.417744563548E-01 0.000000000000E+00 -2.337708815854E+01 + 718 8.521282821679E-01 0.000000000000E+00 -2.313948179550E+01 + 719 8.626094600386E-01 0.000000000000E+00 -2.289141356920E+01 + 720 8.732195563971E-01 0.000000000000E+00 -2.263382296043E+01 + 721 8.839601569407E-01 0.000000000000E+00 -2.236768414084E+01 + 722 8.948328668711E-01 0.000000000000E+00 -2.209400125180E+01 + 723 9.058393111336E-01 0.000000000000E+00 -2.181380320283E+01 + 724 9.169811346606E-01 0.000000000000E+00 -2.152813799700E+01 + 725 9.282600026169E-01 0.000000000000E+00 -2.123806659700E+01 + 726 9.396776006491E-01 0.000000000000E+00 -2.094465635155E+01 + 727 9.512356351371E-01 0.000000000000E+00 -2.064897400917E+01 + 728 9.629358334493E-01 0.000000000000E+00 -2.035207835359E+01 + 729 9.747799442007E-01 0.000000000000E+00 -2.005501250367E+01 + 730 9.867697375144E-01 0.000000000000E+00 -1.975879592888E+01 + 731 9.989070052858E-01 0.000000000000E+00 -1.946441624107E+01 + 732 1.011193561451E+00 0.000000000000E+00 -1.917282083246E+01 + 733 1.023631242257E+00 0.000000000000E+00 -1.888490844014E+01 + 734 1.036221906536E+00 0.000000000000E+00 -1.860152072742E+01 + 735 1.048967435987E+00 0.000000000000E+00 -1.832343398258E+01 + 736 1.061869735449E+00 0.000000000000E+00 -1.805135104629E+01 + 737 1.074930733196E+00 0.000000000000E+00 -1.778589358870E+01 + 738 1.088152381214E+00 0.000000000000E+00 -1.752759486721E+01 + 739 1.101536655503E+00 0.000000000000E+00 -1.727689310464E+01 + 740 1.115085556365E+00 0.000000000000E+00 -1.703412563582E+01 + 741 1.128801108709E+00 0.000000000000E+00 -1.679952397727E+01 + 742 1.142685362346E+00 0.000000000000E+00 -1.657320997961E+01 + 743 1.156740392303E+00 0.000000000000E+00 -1.635519322538E+01 + 744 1.170968299128E+00 0.000000000000E+00 -1.614536983545E+01 + 745 1.185371209207E+00 0.000000000000E+00 -1.594352284422E+01 + 746 1.199951275080E+00 0.000000000000E+00 -1.574932429782E+01 + 747 1.214710675764E+00 0.000000000000E+00 -1.556233921865E+01 + 748 1.229651617076E+00 0.000000000000E+00 -1.538203156446E+01 + 749 1.244776331966E+00 0.000000000000E+00 -1.520777228897E+01 + 750 1.260087080849E+00 0.000000000000E+00 -1.503884958383E+01 + 751 1.275586151943E+00 0.000000000000E+00 -1.487448134795E+01 + 752 1.291275861612E+00 0.000000000000E+00 -1.471382988797E+01 + 753 1.307158554710E+00 0.000000000000E+00 -1.455601880443E+01 + 754 1.323236604933E+00 0.000000000000E+00 -1.440015195891E+01 + 755 1.339512415174E+00 0.000000000000E+00 -1.424533435022E+01 + 756 1.355988417880E+00 0.000000000000E+00 -1.409069464993E+01 + 757 1.372667075420E+00 0.000000000000E+00 -1.393540906127E+01 + 758 1.389550880448E+00 0.000000000000E+00 -1.377872606924E+01 + 759 1.406642356278E+00 0.000000000000E+00 -1.361999154575E+01 + 760 1.423944057260E+00 0.000000000000E+00 -1.345867356197E+01 + 761 1.441458569164E+00 0.000000000000E+00 -1.329438614352E+01 + 762 1.459188509565E+00 0.000000000000E+00 -1.312691108485E+01 + 763 1.477136528232E+00 0.000000000000E+00 -1.295621682179E+01 + 764 1.495305307530E+00 0.000000000000E+00 -1.278247324988E+01 + 765 1.513697562812E+00 0.000000000000E+00 -1.260606127908E+01 + 766 1.532316042835E+00 0.000000000000E+00 -1.242757583971E+01 + 767 1.551163530162E+00 0.000000000000E+00 -1.224782101326E+01 + 768 1.570242841583E+00 0.000000000000E+00 -1.206779596762E+01 + 769 1.589556828534E+00 0.000000000000E+00 -1.188867044737E+01 + 770 1.609108377525E+00 0.000000000000E+00 -1.171174872858E+01 + 771 1.628900410569E+00 0.000000000000E+00 -1.153842121978E+01 + 772 1.648935885619E+00 0.000000000000E+00 -1.137010331033E+01 + 773 1.669217797012E+00 0.000000000000E+00 -1.120816167343E+01 + 774 1.689749175915E+00 0.000000000000E+00 -1.105382907254E+01 + 775 1.710533090779E+00 0.000000000000E+00 -1.090810985468E+01 + 776 1.731572647796E+00 0.000000000000E+00 -1.077167981314E+01 + 777 1.752870991363E+00 0.000000000000E+00 -1.064478604780E+01 + 778 1.774431304557E+00 0.000000000000E+00 -1.052715494580E+01 + 779 1.796256809603E+00 0.000000000000E+00 -1.041791956622E+01 + 780 1.818350768361E+00 0.000000000000E+00 -1.031558168267E+01 + 781 1.840716482812E+00 0.000000000000E+00 -1.021802868426E+01 + 782 1.863357295551E+00 0.000000000000E+00 -1.012263165707E+01 + 783 1.886276590286E+00 0.000000000000E+00 -1.002645849891E+01 + 784 1.909477792347E+00 0.000000000000E+00 -9.926645134908E+00 + 785 1.932964369192E+00 0.000000000000E+00 -9.820979124314E+00 + 786 1.956739830934E+00 0.000000000000E+00 -9.708763559445E+00 + 787 1.980807730854E+00 0.000000000000E+00 -9.592045600000E+00 + 788 2.005171665944E+00 0.000000000000E+00 -9.475497100000E+00 + 789 2.029835277435E+00 0.000000000000E+00 -9.360364800000E+00 + 790 2.054802251347E+00 0.000000000000E+00 -9.246631300000E+00 + 791 2.080076319039E+00 0.000000000000E+00 -9.134279800000E+00 + 792 2.105661257763E+00 0.000000000000E+00 -9.023293400000E+00 + 793 2.131560891233E+00 0.000000000000E+00 -8.913655500000E+00 + 794 2.157779090195E+00 0.000000000000E+00 -8.805349700000E+00 + 795 2.184319773005E+00 0.000000000000E+00 -8.698360000000E+00 + 796 2.211186906213E+00 0.000000000000E+00 -8.592670100000E+00 + 797 2.238384505159E+00 0.000000000000E+00 -8.488264500000E+00 + 798 2.265916634573E+00 0.000000000000E+00 -8.385127500000E+00 + 799 2.293787409178E+00 0.000000000000E+00 -8.283243600000E+00 + 800 2.322000994311E+00 0.000000000000E+00 -8.182597700000E+00 + 801 2.350561606541E+00 0.000000000000E+00 -8.083174600000E+00 + 802 2.379473514301E+00 0.000000000000E+00 -7.984959600000E+00 + 803 2.408741038527E+00 0.000000000000E+00 -7.887938000000E+00 + 804 2.438368553301E+00 0.000000000000E+00 -7.792095200000E+00 + 805 2.468360486507E+00 0.000000000000E+00 -7.697417000000E+00 + 806 2.498721320491E+00 0.000000000000E+00 -7.603889200000E+00 + 807 2.529455592733E+00 0.000000000000E+00 -7.511497700000E+00 + 808 2.560567896523E+00 0.000000000000E+00 -7.420228900000E+00 + 809 2.592062881651E+00 0.000000000000E+00 -7.330069100000E+00 + 810 2.623945255095E+00 0.000000000000E+00 -7.241004700000E+00 + 811 2.656219781733E+00 0.000000000000E+00 -7.153022600000E+00 + 812 2.688891285048E+00 0.000000000000E+00 -7.066109400000E+00 + 813 2.721964647854E+00 0.000000000000E+00 -6.980252300000E+00 + 814 2.755444813023E+00 0.000000000000E+00 -6.895438400000E+00 + 815 2.789336784223E+00 0.000000000000E+00 -6.811655100000E+00 + 816 2.823645626669E+00 0.000000000000E+00 -6.728889700000E+00 + 817 2.858376467877E+00 0.000000000000E+00 -6.647130000000E+00 + 818 2.893534498432E+00 0.000000000000E+00 -6.566363700000E+00 + 819 2.929124972762E+00 0.000000000000E+00 -6.486578800000E+00 + 820 2.965153209927E+00 0.000000000000E+00 -6.407763300000E+00 + 821 3.001624594409E+00 0.000000000000E+00 -6.329905500000E+00 + 822 3.038544576921E+00 0.000000000000E+00 -6.252993700000E+00 + 823 3.075918675217E+00 0.000000000000E+00 -6.177016400000E+00 + 824 3.113752474922E+00 0.000000000000E+00 -6.101962200000E+00 + 825 3.152051630363E+00 0.000000000000E+00 -6.027820000000E+00 + 826 3.190821865417E+00 0.000000000000E+00 -5.954578700000E+00 + 827 3.230068974362E+00 0.000000000000E+00 -5.882227300000E+00 + 828 3.269798822746E+00 0.000000000000E+00 -5.810755000000E+00 + 829 3.310017348266E+00 0.000000000000E+00 -5.740151200000E+00 + 830 3.350730561650E+00 0.000000000000E+00 -5.670405200000E+00 + 831 3.391944547558E+00 0.000000000000E+00 -5.601506700000E+00 + 832 3.433665465493E+00 0.000000000000E+00 -5.533445300000E+00 + 833 3.475899550719E+00 0.000000000000E+00 -5.466210900000E+00 + 834 3.518653115192E+00 0.000000000000E+00 -5.399793400000E+00 + 835 3.561932548509E+00 0.000000000000E+00 -5.334183000000E+00 + 836 3.605744318856E+00 0.000000000000E+00 -5.269369700000E+00 + 837 3.650094973978E+00 0.000000000000E+00 -5.205344000000E+00 + 838 3.694991142158E+00 0.000000000000E+00 -5.142096200000E+00 + 839 3.740439533206E+00 0.000000000000E+00 -5.079616900000E+00 + 840 3.786446939465E+00 0.000000000000E+00 -5.017896800000E+00 + 841 3.833020236820E+00 0.000000000000E+00 -4.956926600000E+00 + 842 3.880166385733E+00 0.000000000000E+00 -4.896697200000E+00 + 843 3.927892432277E+00 0.000000000000E+00 -4.837199700000E+00 + 844 3.976205509195E+00 0.000000000000E+00 -4.778425000000E+00 + 845 4.025112836958E+00 0.000000000000E+00 -4.720364600000E+00 + 846 4.074621724852E+00 0.000000000000E+00 -4.663009500000E+00 + 847 4.124739572068E+00 0.000000000000E+00 -4.606351400000E+00 + 848 4.175473868804E+00 0.000000000000E+00 -4.550381700000E+00 + 849 4.226832197391E+00 0.000000000000E+00 -4.495092100000E+00 + 850 4.278822233419E+00 0.000000000000E+00 -4.440474300000E+00 + 851 4.331451746889E+00 0.000000000000E+00 -4.386520100000E+00 + 852 4.384728603376E+00 0.000000000000E+00 -4.333221400000E+00 + 853 4.438660765198E+00 0.000000000000E+00 -4.280570400000E+00 + 854 4.493256292610E+00 0.000000000000E+00 -4.228559100000E+00 + 855 4.548523345009E+00 0.000000000000E+00 -4.177179800000E+00 + 856 4.604470182152E+00 0.000000000000E+00 -4.126424800000E+00 + 857 4.661105165393E+00 0.000000000000E+00 -4.076286500000E+00 + 858 4.718436758927E+00 0.000000000000E+00 -4.026757400000E+00 + 859 4.776473531062E+00 0.000000000000E+00 -3.977830100000E+00 + 860 4.835224155494E+00 0.000000000000E+00 -3.929497200000E+00 + 861 4.894697412607E+00 0.000000000000E+00 -3.881751700000E+00 + 862 4.954902190782E+00 0.000000000000E+00 -3.834586300000E+00 + 863 5.015847487728E+00 0.000000000000E+00 -3.787994000000E+00 + 864 5.077542411827E+00 0.000000000000E+00 -3.741967800000E+00 + 865 5.139996183493E+00 0.000000000000E+00 -3.696500800000E+00 + 866 5.203218136550E+00 0.000000000000E+00 -3.651586300000E+00 + 867 5.267217719629E+00 0.000000000000E+00 -3.607217500000E+00 + 868 5.332004497581E+00 0.000000000000E+00 -3.563387800000E+00 + 869 5.397588152901E+00 0.000000000000E+00 -3.520090700000E+00 + 870 5.463978487182E+00 0.000000000000E+00 -3.477319700000E+00 + 871 5.531185422574E+00 0.000000000000E+00 -3.435068400000E+00 + 872 5.599219003272E+00 0.000000000000E+00 -3.393330400000E+00 + 873 5.668089397012E+00 0.000000000000E+00 -3.352099600000E+00 + 874 5.737806896595E+00 0.000000000000E+00 -3.311369700000E+00 + 875 5.808381921423E+00 0.000000000000E+00 -3.271134800000E+00 + 876 5.879825019057E+00 0.000000000000E+00 -3.231388700000E+00 + 877 5.952146866791E+00 0.000000000000E+00 -3.192125500000E+00 + 878 6.025358273253E+00 0.000000000000E+00 -3.153339500000E+00 + 879 6.099470180014E+00 0.000000000000E+00 -3.115024700000E+00 + 880 6.174493663228E+00 0.000000000000E+00 -3.077175400000E+00 + 881 6.250439935286E+00 0.000000000000E+00 -3.039786000000E+00 + 882 6.327320346490E+00 0.000000000000E+00 -3.002851000000E+00 + 883 6.405146386752E+00 0.000000000000E+00 -2.966364700000E+00 + 884 6.483929687309E+00 0.000000000000E+00 -2.930321700000E+00 + 885 6.563682022463E+00 0.000000000000E+00 -2.894716700000E+00 + 886 6.644415311339E+00 0.000000000000E+00 -2.859544300000E+00 + 887 6.726141619668E+00 0.000000000000E+00 -2.824799300000E+00 + 888 6.808873161590E+00 0.000000000000E+00 -2.790476400000E+00 + 889 6.892622301478E+00 0.000000000000E+00 -2.756570600000E+00 + 890 6.977401555786E+00 0.000000000000E+00 -2.723076800000E+00 + 891 7.063223594922E+00 0.000000000000E+00 -2.689989900000E+00 + 892 7.150101245140E+00 0.000000000000E+00 -2.657305000000E+00 + 893 7.238047490455E+00 0.000000000000E+00 -2.625017300000E+00 + 894 7.327075474587E+00 0.000000000000E+00 -2.593121900000E+00 + 895 7.417198502925E+00 0.000000000000E+00 -2.561614100000E+00 + 896 7.508430044511E+00 0.000000000000E+00 -2.530489000000E+00 + 897 7.600783734058E+00 0.000000000000E+00 -2.499742200000E+00 + 898 7.694273373987E+00 0.000000000000E+00 -2.469369000000E+00 + 899 7.788912936487E+00 0.000000000000E+00 -2.439364800000E+00 + 900 7.884716565606E+00 0.000000000000E+00 -2.409725200000E+00 + 901 7.981698579363E+00 0.000000000000E+00 -2.380445700000E+00 + 902 8.079873471889E+00 0.000000000000E+00 -2.351522000000E+00 + 903 8.179255915593E+00 0.000000000000E+00 -2.322949700000E+00 + 904 8.279860763355E+00 0.000000000000E+00 -2.294724600000E+00 + 905 8.381703050745E+00 0.000000000000E+00 -2.266842400000E+00 + 906 8.484797998269E+00 0.000000000000E+00 -2.239299000000E+00 + 907 8.589161013647E+00 0.000000000000E+00 -2.212090300000E+00 + 908 8.694807694115E+00 0.000000000000E+00 -2.185212200000E+00 + 909 8.801753828753E+00 0.000000000000E+00 -2.158660700000E+00 + 910 8.910015400847E+00 0.000000000000E+00 -2.132431800000E+00 + 911 9.019608590277E+00 0.000000000000E+00 -2.106521600000E+00 + 912 9.130549775937E+00 0.000000000000E+00 -2.080926200000E+00 + 913 9.242855538181E+00 0.000000000000E+00 -2.055641800000E+00 + 914 9.356542661301E+00 0.000000000000E+00 -2.030664600000E+00 + 915 9.471628136035E+00 0.000000000000E+00 -2.005990900000E+00 + 916 9.588129162108E+00 0.000000000000E+00 -1.981617000000E+00 + 917 9.706063150802E+00 0.000000000000E+00 -1.957539300000E+00 + 918 9.825447727557E+00 0.000000000000E+00 -1.933754100000E+00 + 919 9.946300734606E+00 0.000000000000E+00 -1.910257900000E+00 + 920 1.006864023364E+01 0.000000000000E+00 -1.887047300000E+00 + 921 1.019248450851E+01 0.000000000000E+00 -1.864118600000E+00 + 922 1.031785206797E+01 0.000000000000E+00 -1.841468500000E+00 + 923 1.044476164841E+01 0.000000000000E+00 -1.819093700000E+00 + 924 1.057323221668E+01 0.000000000000E+00 -1.796990700000E+00 + 925 1.070328297295E+01 0.000000000000E+00 -1.775156300000E+00 + 926 1.083493335351E+01 0.000000000000E+00 -1.753587200000E+00 + 927 1.096820303376E+01 0.000000000000E+00 -1.732280100000E+00 + 928 1.110311193108E+01 0.000000000000E+00 -1.711232000000E+00 + 929 1.123968020783E+01 0.000000000000E+00 -1.690439600000E+00 + 930 1.137792827439E+01 0.000000000000E+00 -1.669899800000E+00 + 931 1.151787679216E+01 0.000000000000E+00 -1.649609600000E+00 + 932 1.165954667671E+01 0.000000000000E+00 -1.629565900000E+00 + 933 1.180295910083E+01 0.000000000000E+00 -1.609765800000E+00 + 934 1.194813549777E+01 0.000000000000E+00 -1.590206300000E+00 + 935 1.209509756439E+01 0.000000000000E+00 -1.570884400000E+00 + 936 1.224386726443E+01 0.000000000000E+00 -1.551797300000E+00 + 937 1.239446683178E+01 0.000000000000E+00 -1.532942100000E+00 + 938 1.254691877382E+01 0.000000000000E+00 -1.514316000000E+00 + 939 1.270124587473E+01 0.000000000000E+00 -1.495916200000E+00 + 940 1.285747119899E+01 0.000000000000E+00 -1.477740000000E+00 + 941 1.301561809474E+01 0.000000000000E+00 -1.459784700000E+00 + 942 1.317571019731E+01 0.000000000000E+00 -1.442047500000E+00 + 943 1.333777143273E+01 0.000000000000E+00 -1.424525800000E+00 + 944 1.350182602136E+01 0.000000000000E+00 -1.407217100000E+00 + 945 1.366789848142E+01 0.000000000000E+00 -1.390118600000E+00 + 946 1.383601363274E+01 0.000000000000E+00 -1.373227900000E+00 + 947 1.400619660042E+01 0.000000000000E+00 -1.356542400000E+00 + 948 1.417847281861E+01 0.000000000000E+00 -1.340059700000E+00 + 949 1.435286803428E+01 0.000000000000E+00 -1.323777200000E+00 + 950 1.452940831110E+01 0.000000000000E+00 -1.307692600000E+00 + 951 1.470812003333E+01 0.000000000000E+00 -1.291803400000E+00 + 952 1.488902990973E+01 0.000000000000E+00 -1.276107300000E+00 + 953 1.507216497762E+01 0.000000000000E+00 -1.260601900000E+00 + 954 1.525755260685E+01 0.000000000000E+00 -1.245284900000E+00 + 955 1.544522050391E+01 0.000000000000E+00 -1.230154000000E+00 + 956 1.563519671611E+01 0.000000000000E+00 -1.215207000000E+00 + 957 1.582750963572E+01 0.000000000000E+00 -1.200441500000E+00 + 958 1.602218800424E+01 0.000000000000E+00 -1.185855500000E+00 + 959 1.621926091669E+01 0.000000000000E+00 -1.171446700000E+00 + 960 1.641875782597E+01 0.000000000000E+00 -1.157213000000E+00 + 961 1.662070854723E+01 0.000000000000E+00 -1.143152200000E+00 + 962 1.682514326236E+01 0.000000000000E+00 -1.129262300000E+00 + 963 1.703209252448E+01 0.000000000000E+00 -1.115541100000E+00 + 964 1.724158726253E+01 0.000000000000E+00 -1.101986700000E+00 + 965 1.745365878586E+01 0.000000000000E+00 -1.088597000000E+00 + 966 1.766833878893E+01 0.000000000000E+00 -1.075369900000E+00 + 967 1.788565935603E+01 0.000000000000E+00 -1.062303600000E+00 + 968 1.810565296611E+01 0.000000000000E+00 -1.049396000000E+00 + 969 1.832835249760E+01 0.000000000000E+00 -1.036645300000E+00 + 970 1.855379123332E+01 0.000000000000E+00 -1.024049500000E+00 + 971 1.878200286549E+01 0.000000000000E+00 -1.011606700000E+00 + 972 1.901302150073E+01 0.000000000000E+00 -9.993151300000E-01 + 973 1.924688166519E+01 0.000000000000E+00 -9.871729000000E-01 + 974 1.948361830967E+01 0.000000000000E+00 -9.751782100000E-01 + 975 1.972326681488E+01 0.000000000000E+00 -9.633292600000E-01 + 976 1.996586299670E+01 0.000000000000E+00 -9.516242800000E-01 + 977 2.021144311156E+01 0.000000000000E+00 -9.400615200000E-01 + 978 2.046004386184E+01 0.000000000000E+00 -9.286392600000E-01 + 979 2.071170240134E+01 0.000000000000E+00 -9.173557800000E-01 + 980 2.096645634087E+01 0.000000000000E+00 -9.062094100000E-01 + 981 2.122434375387E+01 0.000000000000E+00 -8.951984700000E-01 + 982 2.148540318204E+01 0.000000000000E+00 -8.843213200000E-01 + 983 2.174967364118E+01 0.000000000000E+00 -8.735763300000E-01 + 984 2.201719462697E+01 0.000000000000E+00 -8.629619000000E-01 + 985 2.228800612088E+01 0.000000000000E+00 -8.524764300000E-01 + 986 2.256214859616E+01 0.000000000000E+00 -8.421183800000E-01 + 987 2.283966302390E+01 0.000000000000E+00 -8.318861800000E-01 + 988 2.312059087909E+01 0.000000000000E+00 -8.217783100000E-01 + 989 2.340497414690E+01 0.000000000000E+00 -8.117932500000E-01 + 990 2.369285532891E+01 0.000000000000E+00 -8.019295200000E-01 + 991 2.398427744945E+01 0.000000000000E+00 -7.921856300000E-01 + 992 2.427928406208E+01 0.000000000000E+00 -7.825601400000E-01 + 993 2.457791925605E+01 0.000000000000E+00 -7.730516100000E-01 + 994 2.488022766290E+01 0.000000000000E+00 -7.636586100000E-01 + 995 2.518625446315E+01 0.000000000000E+00 -7.543797400000E-01 + 996 2.549604539305E+01 0.000000000000E+00 -7.452136100000E-01 + 997 2.580964675138E+01 0.000000000000E+00 -7.361588500000E-01 + 998 2.612710540642E+01 0.000000000000E+00 -7.272141200000E-01 + 999 2.644846880292E+01 0.000000000000E+00 -7.183780700000E-01 + 1000 2.677378496920E+01 0.000000000000E+00 -7.096493800000E-01 + 1001 2.710310252432E+01 0.000000000000E+00 -7.010267500000E-01 + 1002 2.743647068537E+01 0.000000000000E+00 -6.925089000000E-01 + 1003 2.777393927480E+01 0.000000000000E+00 -6.840945300000E-01 + 1004 2.811555872788E+01 0.000000000000E+00 -6.757824100000E-01 + 1005 2.846138010023E+01 0.000000000000E+00 -6.675712800000E-01 + 1006 2.881145507546E+01 0.000000000000E+00 -6.594599200000E-01 + 1007 2.916583597289E+01 0.000000000000E+00 -6.514471300000E-01 + 1008 2.952457575536E+01 0.000000000000E+00 -6.435316900000E-01 + 1009 2.988772803715E+01 0.000000000000E+00 -6.357124200000E-01 + 1010 3.025534709201E+01 0.000000000000E+00 -6.279881700000E-01 + 1011 3.062748786124E+01 0.000000000000E+00 -6.203577700000E-01 + 1012 3.100420596193E+01 0.000000000000E+00 -6.128200800000E-01 + 1013 3.138555769526E+01 0.000000000000E+00 -6.053739800000E-01 + 1014 3.177160005492E+01 0.000000000000E+00 -5.980183500000E-01 + 1015 3.216239073559E+01 0.000000000000E+00 -5.907521000000E-01 + 1016 3.255798814164E+01 0.000000000000E+00 -5.835741400000E-01 + 1017 3.295845139578E+01 0.000000000000E+00 -5.764834000000E-01 + 1018 3.336384034795E+01 0.000000000000E+00 -5.694788100000E-01 + 1019 3.377421558423E+01 0.000000000000E+00 -5.625593300000E-01 + 1020 3.418963843592E+01 0.000000000000E+00 -5.557239200000E-01 + 1021 3.461017098868E+01 0.000000000000E+00 -5.489715700000E-01 + 1022 3.503587609184E+01 0.000000000000E+00 -5.423012700000E-01 + 1023 3.546681736777E+01 0.000000000000E+00 -5.357120100000E-01 + 1024 3.590305922139E+01 0.000000000000E+00 -5.292028100000E-01 + 1025 3.634466684981E+01 0.000000000000E+00 -5.227727100000E-01 + 1026 3.679170625207E+01 0.000000000000E+00 -5.164207400000E-01 + 1027 3.724424423897E+01 0.000000000000E+00 -5.101459400000E-01 + 1028 3.770234844311E+01 0.000000000000E+00 -5.039473900000E-01 + 1029 3.816608732896E+01 0.000000000000E+00 -4.978241500000E-01 + 1030 3.863553020310E+01 0.000000000000E+00 -4.917753100000E-01 + 1031 3.911074722460E+01 0.000000000000E+00 -4.857999700000E-01 + 1032 3.959180941546E+01 0.000000000000E+00 -4.798972400000E-01 + 1033 4.007878867127E+01 0.000000000000E+00 -4.740662200000E-01 + 1034 4.057175777193E+01 0.000000000000E+00 -4.683060600000E-01 + 1035 4.107079039252E+01 0.000000000000E+00 -4.626158800000E-01 + 1036 4.157596111435E+01 0.000000000000E+00 -4.569948500000E-01 + 1037 4.208734543606E+01 0.000000000000E+00 -4.514421100000E-01 + 1038 4.260501978492E+01 0.000000000000E+00 -4.459568400000E-01 + 1039 4.312906152828E+01 0.000000000000E+00 -4.405382200000E-01 + 1040 4.365954898507E+01 0.000000000000E+00 -4.351854400000E-01 + 1041 4.419656143759E+01 0.000000000000E+00 -4.298977000000E-01 + 1042 4.474017914327E+01 0.000000000000E+00 -4.246742000000E-01 + 1043 4.529048334674E+01 0.000000000000E+00 -4.195141800000E-01 + 1044 4.584755629190E+01 0.000000000000E+00 -4.144168500000E-01 + 1045 4.641148123429E+01 0.000000000000E+00 -4.093814600000E-01 + 1046 4.698234245347E+01 0.000000000000E+00 -4.044072500000E-01 + 1047 4.756022526565E+01 0.000000000000E+00 -3.994934800000E-01 + 1048 4.814521603642E+01 0.000000000000E+00 -3.946394200000E-01 + 1049 4.873740219367E+01 0.000000000000E+00 -3.898443300000E-01 + 1050 4.933687224065E+01 0.000000000000E+00 -3.851075100000E-01 + 1051 4.994371576921E+01 0.000000000000E+00 -3.804282400000E-01 + 1052 5.055802347317E+01 0.000000000000E+00 -3.758058300000E-01 + 1053 5.117988716189E+01 0.000000000000E+00 -3.712395800000E-01 + 1054 5.180939977398E+01 0.000000000000E+00 -3.667288200000E-01 + 1055 5.244665539120E+01 0.000000000000E+00 -3.622728600000E-01 + 1056 5.309174925251E+01 0.000000000000E+00 -3.578710500000E-01 + 1057 5.374477776832E+01 0.000000000000E+00 -3.535227200000E-01 + 1058 5.440583853487E+01 0.000000000000E+00 -3.492272200000E-01 + 1059 5.507503034885E+01 0.000000000000E+00 -3.449839200000E-01 + 1060 5.575245322214E+01 0.000000000000E+00 -3.407921800000E-01 + 1061 5.643820839677E+01 0.000000000000E+00 -3.366513700000E-01 + 1062 5.713239836005E+01 0.000000000000E+00 -3.325608700000E-01 + 1063 5.783512685988E+01 0.000000000000E+00 -3.285200700000E-01 + 1064 5.854649892026E+01 0.000000000000E+00 -3.245283700000E-01 + 1065 5.926662085698E+01 0.000000000000E+00 -3.205851700000E-01 + 1066 5.999560029352E+01 0.000000000000E+00 -3.166898900000E-01 + 1067 6.073354617713E+01 0.000000000000E+00 -3.128419300000E-01 + 1068 6.148056879511E+01 0.000000000000E+00 -3.090407300000E-01 + 1069 6.223677979129E+01 0.000000000000E+00 -3.052857200000E-01 + 1070 6.300229218272E+01 0.000000000000E+00 -3.015763300000E-01 + 1071 6.377722037656E+01 0.000000000000E+00 -2.979120100000E-01 + 1072 6.456168018720E+01 0.000000000000E+00 -2.942922200000E-01 + 1073 6.535578885350E+01 0.000000000000E+00 -2.907164100000E-01 + 1074 6.615966505640E+01 0.000000000000E+00 -2.871840400000E-01 + 1075 6.697342893659E+01 0.000000000000E+00 -2.836946000000E-01 + 1076 6.779720211251E+01 0.000000000000E+00 -2.802475500000E-01 + 1077 6.863110769850E+01 0.000000000000E+00 -2.768423900000E-01 + 1078 6.947527032319E+01 0.000000000000E+00 -2.734786000000E-01 + 1079 7.032981614816E+01 0.000000000000E+00 -2.701556900000E-01 + 1080 7.119487288678E+01 0.000000000000E+00 -2.668731500000E-01 + 1081 7.207056982329E+01 0.000000000000E+00 -2.636305000000E-01 + 1082 7.295703783212E+01 0.000000000000E+00 -2.604272400000E-01 + 1083 7.385440939745E+01 0.000000000000E+00 -2.572629100000E-01 + 1084 7.476281863304E+01 0.000000000000E+00 -2.541370200000E-01 + 1085 7.568240130223E+01 0.000000000000E+00 -2.510491200000E-01 + 1086 7.661329483825E+01 0.000000000000E+00 -2.479987300000E-01 + 1087 7.755563836476E+01 0.000000000000E+00 -2.449854100000E-01 + 1088 7.850957271664E+01 0.000000000000E+00 -2.420087000000E-01 + 1089 7.947524046106E+01 0.000000000000E+00 -2.390681700000E-01 + +# use_poly: F +# vtype: 7 +# iorb_start: 3 +# r(icut): 1.980808 +# rcut: 2.000000 +# wfopt: 0.000000000000E+00 +# wfopt: 0.000000000000E+00 +# wfopt: 1.000000000000E-02 +# wfopt: 1.000000000000E-02 +# wfopt: 0.000000000000E+00 +# npar: 5 +# param( 1) -1.136659118456E+01 +# param( 2) -8.052609874364E+00 +# param( 3) 2.031656877732E+01 +# param( 4) -1.319844965986E+01 +# param( 5) -8.441591908865E-01 +# param( 6) 7.708612021383E+00 +# param( 7) -5.406731307549E+00 +# param( 8) 1.768918917046E-01 + + +----------- vlocal.ini ------------ +1 mk_vlocal +2.0 rcut # 0.8 x peak +7 vtype +3 iorb_start +0.0 pcoeff +0 0 0.01 0.01 0 +-1 magnetic fit +2e-1 magnetic fitting weight +-0.18278 E(high spin) - E(low spin) +1 3 5.0 1.0 0.0 occ spin up (valence only) +1 3 0.5 1.0 0.0 occ spin down (valence only) +5 npar + -1.291122848582E+01 + 1.827712066813E+00 + 9.985740009095E+00 + -1.007753993798E+01 + 2.466727220282E+00 + 4.351593722481E+00 + -4.949207452990E+00 + 8.565133747198E-01 + diff --git a/tests/PP_ORB/al_lps.cpi b/tests/PP_ORB/al_lps.cpi new file mode 100644 index 0000000000..0dccb9749f --- /dev/null +++ b/tests/PP_ORB/al_lps.cpi @@ -0,0 +1,10045 @@ +local psp + 13.000 3.000 20210830 zatom,zion,pspd +8 11 0 0 9999 0 pspcode,pspxc,lmax,lloc,mmax,r2well +0 -1 0 rchrg,fchrg,qchrg +0 0 0 0 0 nproj +0 extension_switch +0 + 1 0.00000E+00 -1.148284E+01 + 2 1.00000E-03 -1.148284E+01 + 3 2.00000E-03 -1.148284E+01 + 4 3.00000E-03 -1.148284E+01 + 5 4.00000E-03 -1.148283E+01 + 6 5.00000E-03 -1.148282E+01 + 7 6.00000E-03 -1.148280E+01 + 8 7.00000E-03 -1.148277E+01 + 9 8.00000E-03 -1.148273E+01 + 10 9.00000E-03 -1.148269E+01 + 11 1.00000E-02 -1.148263E+01 + 12 1.10000E-02 -1.148256E+01 + 13 1.20000E-02 -1.148247E+01 + 14 1.30000E-02 -1.148238E+01 + 15 1.40000E-02 -1.148226E+01 + 16 1.50000E-02 -1.148213E+01 + 17 1.60000E-02 -1.148198E+01 + 18 1.70000E-02 -1.148181E+01 + 19 1.80000E-02 -1.148161E+01 + 20 1.90000E-02 -1.148140E+01 + 21 2.00000E-02 -1.148116E+01 + 22 2.10000E-02 -1.148090E+01 + 23 2.20000E-02 -1.148062E+01 + 24 2.30000E-02 -1.148030E+01 + 25 2.40000E-02 -1.147996E+01 + 26 2.50000E-02 -1.147959E+01 + 27 2.60000E-02 -1.147920E+01 + 28 2.70000E-02 -1.147877E+01 + 29 2.80000E-02 -1.147831E+01 + 30 2.90000E-02 -1.147781E+01 + 31 3.00000E-02 -1.147729E+01 + 32 3.10000E-02 -1.147672E+01 + 33 3.20000E-02 -1.147613E+01 + 34 3.30000E-02 -1.147549E+01 + 35 3.40000E-02 -1.147482E+01 + 36 3.50000E-02 -1.147411E+01 + 37 3.60000E-02 -1.147336E+01 + 38 3.70000E-02 -1.147257E+01 + 39 3.80000E-02 -1.147174E+01 + 40 3.90000E-02 -1.147086E+01 + 41 4.00000E-02 -1.146994E+01 + 42 4.10000E-02 -1.146898E+01 + 43 4.20000E-02 -1.146797E+01 + 44 4.30000E-02 -1.146692E+01 + 45 4.40000E-02 -1.146582E+01 + 46 4.50000E-02 -1.146467E+01 + 47 4.60000E-02 -1.146347E+01 + 48 4.70000E-02 -1.146222E+01 + 49 4.80000E-02 -1.146093E+01 + 50 4.90000E-02 -1.145958E+01 + 51 5.00000E-02 -1.145818E+01 + 52 5.10000E-02 -1.145672E+01 + 53 5.20000E-02 -1.145521E+01 + 54 5.30000E-02 -1.145365E+01 + 55 5.40000E-02 -1.145203E+01 + 56 5.50000E-02 -1.145036E+01 + 57 5.60000E-02 -1.144863E+01 + 58 5.70000E-02 -1.144684E+01 + 59 5.80000E-02 -1.144499E+01 + 60 5.90000E-02 -1.144308E+01 + 61 6.00000E-02 -1.144111E+01 + 62 6.10000E-02 -1.143909E+01 + 63 6.20000E-02 -1.143700E+01 + 64 6.30000E-02 -1.143484E+01 + 65 6.40000E-02 -1.143263E+01 + 66 6.50000E-02 -1.143035E+01 + 67 6.60000E-02 -1.142801E+01 + 68 6.70000E-02 -1.142560E+01 + 69 6.80000E-02 -1.142313E+01 + 70 6.90000E-02 -1.142059E+01 + 71 7.00000E-02 -1.141798E+01 + 72 7.10000E-02 -1.141530E+01 + 73 7.20000E-02 -1.141256E+01 + 74 7.30000E-02 -1.140975E+01 + 75 7.40000E-02 -1.140687E+01 + 76 7.50000E-02 -1.140391E+01 + 77 7.60000E-02 -1.140089E+01 + 78 7.70000E-02 -1.139779E+01 + 79 7.80000E-02 -1.139463E+01 + 80 7.90000E-02 -1.139139E+01 + 81 8.00000E-02 -1.138808E+01 + 82 8.10000E-02 -1.138469E+01 + 83 8.20000E-02 -1.138123E+01 + 84 8.30000E-02 -1.137769E+01 + 85 8.40000E-02 -1.137408E+01 + 86 8.50000E-02 -1.137039E+01 + 87 8.60000E-02 -1.136663E+01 + 88 8.70000E-02 -1.136278E+01 + 89 8.80000E-02 -1.135887E+01 + 90 8.90000E-02 -1.135487E+01 + 91 9.00000E-02 -1.135079E+01 + 92 9.10000E-02 -1.134664E+01 + 93 9.20000E-02 -1.134240E+01 + 94 9.30000E-02 -1.133808E+01 + 95 9.40000E-02 -1.133369E+01 + 96 9.50000E-02 -1.132921E+01 + 97 9.60000E-02 -1.132465E+01 + 98 9.70000E-02 -1.132001E+01 + 99 9.80000E-02 -1.131529E+01 + 100 9.90000E-02 -1.131048E+01 + 101 1.00000E-01 -1.130559E+01 + 102 1.01000E-01 -1.130062E+01 + 103 1.02000E-01 -1.129556E+01 + 104 1.03000E-01 -1.129041E+01 + 105 1.04000E-01 -1.128519E+01 + 106 1.05000E-01 -1.127987E+01 + 107 1.06000E-01 -1.127447E+01 + 108 1.07000E-01 -1.126899E+01 + 109 1.08000E-01 -1.126341E+01 + 110 1.09000E-01 -1.125775E+01 + 111 1.10000E-01 -1.125201E+01 + 112 1.11000E-01 -1.124617E+01 + 113 1.12000E-01 -1.124025E+01 + 114 1.13000E-01 -1.123424E+01 + 115 1.14000E-01 -1.122814E+01 + 116 1.15000E-01 -1.122195E+01 + 117 1.16000E-01 -1.121567E+01 + 118 1.17000E-01 -1.120930E+01 + 119 1.18000E-01 -1.120284E+01 + 120 1.19000E-01 -1.119629E+01 + 121 1.20000E-01 -1.118965E+01 + 122 1.21000E-01 -1.118292E+01 + 123 1.22000E-01 -1.117610E+01 + 124 1.23000E-01 -1.116919E+01 + 125 1.24000E-01 -1.116218E+01 + 126 1.25000E-01 -1.115508E+01 + 127 1.26000E-01 -1.114789E+01 + 128 1.27000E-01 -1.114061E+01 + 129 1.28000E-01 -1.113323E+01 + 130 1.29000E-01 -1.112576E+01 + 131 1.30000E-01 -1.111820E+01 + 132 1.31000E-01 -1.111054E+01 + 133 1.32000E-01 -1.110279E+01 + 134 1.33000E-01 -1.109495E+01 + 135 1.34000E-01 -1.108701E+01 + 136 1.35000E-01 -1.107898E+01 + 137 1.36000E-01 -1.107085E+01 + 138 1.37000E-01 -1.106263E+01 + 139 1.38000E-01 -1.105431E+01 + 140 1.39000E-01 -1.104590E+01 + 141 1.40000E-01 -1.103739E+01 + 142 1.41000E-01 -1.102878E+01 + 143 1.42000E-01 -1.102008E+01 + 144 1.43000E-01 -1.101129E+01 + 145 1.44000E-01 -1.100240E+01 + 146 1.45000E-01 -1.099341E+01 + 147 1.46000E-01 -1.098432E+01 + 148 1.47000E-01 -1.097514E+01 + 149 1.48000E-01 -1.096586E+01 + 150 1.49000E-01 -1.095649E+01 + 151 1.50000E-01 -1.094702E+01 + 152 1.51000E-01 -1.093745E+01 + 153 1.52000E-01 -1.092778E+01 + 154 1.53000E-01 -1.091802E+01 + 155 1.54000E-01 -1.090815E+01 + 156 1.55000E-01 -1.089820E+01 + 157 1.56000E-01 -1.088814E+01 + 158 1.57000E-01 -1.087799E+01 + 159 1.58000E-01 -1.086773E+01 + 160 1.59000E-01 -1.085738E+01 + 161 1.60000E-01 -1.084694E+01 + 162 1.61000E-01 -1.083639E+01 + 163 1.62000E-01 -1.082575E+01 + 164 1.63000E-01 -1.081501E+01 + 165 1.64000E-01 -1.080417E+01 + 166 1.65000E-01 -1.079323E+01 + 167 1.66000E-01 -1.078219E+01 + 168 1.67000E-01 -1.077106E+01 + 169 1.68000E-01 -1.075982E+01 + 170 1.69000E-01 -1.074849E+01 + 171 1.70000E-01 -1.073706E+01 + 172 1.71000E-01 -1.072553E+01 + 173 1.72000E-01 -1.071391E+01 + 174 1.73000E-01 -1.070218E+01 + 175 1.74000E-01 -1.069036E+01 + 176 1.75000E-01 -1.067844E+01 + 177 1.76000E-01 -1.066642E+01 + 178 1.77000E-01 -1.065430E+01 + 179 1.78000E-01 -1.064208E+01 + 180 1.79000E-01 -1.062977E+01 + 181 1.80000E-01 -1.061735E+01 + 182 1.81000E-01 -1.060484E+01 + 183 1.82000E-01 -1.059223E+01 + 184 1.83000E-01 -1.057952E+01 + 185 1.84000E-01 -1.056672E+01 + 186 1.85000E-01 -1.055381E+01 + 187 1.86000E-01 -1.054081E+01 + 188 1.87000E-01 -1.052771E+01 + 189 1.88000E-01 -1.051451E+01 + 190 1.89000E-01 -1.050121E+01 + 191 1.90000E-01 -1.048782E+01 + 192 1.91000E-01 -1.047433E+01 + 193 1.92000E-01 -1.046074E+01 + 194 1.93000E-01 -1.044705E+01 + 195 1.94000E-01 -1.043327E+01 + 196 1.95000E-01 -1.041939E+01 + 197 1.96000E-01 -1.040541E+01 + 198 1.97000E-01 -1.039133E+01 + 199 1.98000E-01 -1.037716E+01 + 200 1.99000E-01 -1.036288E+01 + 201 2.00000E-01 -1.034852E+01 + 202 2.01000E-01 -1.033405E+01 + 203 2.02000E-01 -1.031949E+01 + 204 2.03000E-01 -1.030483E+01 + 205 2.04000E-01 -1.029008E+01 + 206 2.05000E-01 -1.027523E+01 + 207 2.06000E-01 -1.026028E+01 + 208 2.07000E-01 -1.024524E+01 + 209 2.08000E-01 -1.023010E+01 + 210 2.09000E-01 -1.021487E+01 + 211 2.10000E-01 -1.019954E+01 + 212 2.11000E-01 -1.018412E+01 + 213 2.12000E-01 -1.016860E+01 + 214 2.13000E-01 -1.015298E+01 + 215 2.14000E-01 -1.013727E+01 + 216 2.15000E-01 -1.012147E+01 + 217 2.16000E-01 -1.010557E+01 + 218 2.17000E-01 -1.008957E+01 + 219 2.18000E-01 -1.007349E+01 + 220 2.19000E-01 -1.005730E+01 + 221 2.20000E-01 -1.004103E+01 + 222 2.21000E-01 -1.002466E+01 + 223 2.22000E-01 -1.000820E+01 + 224 2.23000E-01 -9.991641E+00 + 225 2.24000E-01 -9.974992E+00 + 226 2.25000E-01 -9.958250E+00 + 227 2.26000E-01 -9.941416E+00 + 228 2.27000E-01 -9.924489E+00 + 229 2.28000E-01 -9.907470E+00 + 230 2.29000E-01 -9.890359E+00 + 231 2.30000E-01 -9.873156E+00 + 232 2.31000E-01 -9.855862E+00 + 233 2.32000E-01 -9.838477E+00 + 234 2.33000E-01 -9.821000E+00 + 235 2.34000E-01 -9.803433E+00 + 236 2.35000E-01 -9.785774E+00 + 237 2.36000E-01 -9.768026E+00 + 238 2.37000E-01 -9.750188E+00 + 239 2.38000E-01 -9.732259E+00 + 240 2.39000E-01 -9.714241E+00 + 241 2.40000E-01 -9.696134E+00 + 242 2.41000E-01 -9.677937E+00 + 243 2.42000E-01 -9.659651E+00 + 244 2.43000E-01 -9.641278E+00 + 245 2.44000E-01 -9.622815E+00 + 246 2.45000E-01 -9.604265E+00 + 247 2.46000E-01 -9.585627E+00 + 248 2.47000E-01 -9.566901E+00 + 249 2.48000E-01 -9.548088E+00 + 250 2.49000E-01 -9.529188E+00 + 251 2.50000E-01 -9.510202E+00 + 252 2.51000E-01 -9.491129E+00 + 253 2.52000E-01 -9.471970E+00 + 254 2.53000E-01 -9.452725E+00 + 255 2.54000E-01 -9.433394E+00 + 256 2.55000E-01 -9.413979E+00 + 257 2.56000E-01 -9.394478E+00 + 258 2.57000E-01 -9.374893E+00 + 259 2.58000E-01 -9.355224E+00 + 260 2.59000E-01 -9.335470E+00 + 261 2.60000E-01 -9.315633E+00 + 262 2.61000E-01 -9.295713E+00 + 263 2.62000E-01 -9.275709E+00 + 264 2.63000E-01 -9.255622E+00 + 265 2.64000E-01 -9.235454E+00 + 266 2.65000E-01 -9.215203E+00 + 267 2.66000E-01 -9.194870E+00 + 268 2.67000E-01 -9.174456E+00 + 269 2.68000E-01 -9.153961E+00 + 270 2.69000E-01 -9.133384E+00 + 271 2.70000E-01 -9.112728E+00 + 272 2.71000E-01 -9.091991E+00 + 273 2.72000E-01 -9.071174E+00 + 274 2.73000E-01 -9.050278E+00 + 275 2.74000E-01 -9.029303E+00 + 276 2.75000E-01 -9.008249E+00 + 277 2.76000E-01 -8.987117E+00 + 278 2.77000E-01 -8.965907E+00 + 279 2.78000E-01 -8.944619E+00 + 280 2.79000E-01 -8.923253E+00 + 281 2.80000E-01 -8.901810E+00 + 282 2.81000E-01 -8.880292E+00 + 283 2.82000E-01 -8.858696E+00 + 284 2.83000E-01 -8.837024E+00 + 285 2.84000E-01 -8.815278E+00 + 286 2.85000E-01 -8.793456E+00 + 287 2.86000E-01 -8.771558E+00 + 288 2.87000E-01 -8.749587E+00 + 289 2.88000E-01 -8.727542E+00 + 290 2.89000E-01 -8.705422E+00 + 291 2.90000E-01 -8.683230E+00 + 292 2.91000E-01 -8.660964E+00 + 293 2.92000E-01 -8.638626E+00 + 294 2.93000E-01 -8.616216E+00 + 295 2.94000E-01 -8.593734E+00 + 296 2.95000E-01 -8.571181E+00 + 297 2.96000E-01 -8.548556E+00 + 298 2.97000E-01 -8.525860E+00 + 299 2.98000E-01 -8.503095E+00 + 300 2.99000E-01 -8.480260E+00 + 301 3.00000E-01 -8.457355E+00 + 302 3.01000E-01 -8.434381E+00 + 303 3.02000E-01 -8.411339E+00 + 304 3.03000E-01 -8.388228E+00 + 305 3.04000E-01 -8.365049E+00 + 306 3.05000E-01 -8.341803E+00 + 307 3.06000E-01 -8.318490E+00 + 308 3.07000E-01 -8.295111E+00 + 309 3.08000E-01 -8.271664E+00 + 310 3.09000E-01 -8.248152E+00 + 311 3.10000E-01 -8.224575E+00 + 312 3.11000E-01 -8.200933E+00 + 313 3.12000E-01 -8.177226E+00 + 314 3.13000E-01 -8.153455E+00 + 315 3.14000E-01 -8.129620E+00 + 316 3.15000E-01 -8.105722E+00 + 317 3.16000E-01 -8.081760E+00 + 318 3.17000E-01 -8.057737E+00 + 319 3.18000E-01 -8.033652E+00 + 320 3.19000E-01 -8.009504E+00 + 321 3.20000E-01 -7.985295E+00 + 322 3.21000E-01 -7.961026E+00 + 323 3.22000E-01 -7.936697E+00 + 324 3.23000E-01 -7.912307E+00 + 325 3.24000E-01 -7.887857E+00 + 326 3.25000E-01 -7.863349E+00 + 327 3.26000E-01 -7.838783E+00 + 328 3.27000E-01 -7.814157E+00 + 329 3.28000E-01 -7.789474E+00 + 330 3.29000E-01 -7.764734E+00 + 331 3.30000E-01 -7.739937E+00 + 332 3.31000E-01 -7.715083E+00 + 333 3.32000E-01 -7.690174E+00 + 334 3.33000E-01 -7.665209E+00 + 335 3.34000E-01 -7.640189E+00 + 336 3.35000E-01 -7.615114E+00 + 337 3.36000E-01 -7.589984E+00 + 338 3.37000E-01 -7.564801E+00 + 339 3.38000E-01 -7.539566E+00 + 340 3.39000E-01 -7.514276E+00 + 341 3.40000E-01 -7.488934E+00 + 342 3.41000E-01 -7.463540E+00 + 343 3.42000E-01 -7.438096E+00 + 344 3.43000E-01 -7.412599E+00 + 345 3.44000E-01 -7.387052E+00 + 346 3.45000E-01 -7.361455E+00 + 347 3.46000E-01 -7.335809E+00 + 348 3.47000E-01 -7.310112E+00 + 349 3.48000E-01 -7.284367E+00 + 350 3.49000E-01 -7.258573E+00 + 351 3.50000E-01 -7.232733E+00 + 352 3.51000E-01 -7.206844E+00 + 353 3.52000E-01 -7.180908E+00 + 354 3.53000E-01 -7.154926E+00 + 355 3.54000E-01 -7.128898E+00 + 356 3.55000E-01 -7.102825E+00 + 357 3.56000E-01 -7.076705E+00 + 358 3.57000E-01 -7.050541E+00 + 359 3.58000E-01 -7.024334E+00 + 360 3.59000E-01 -6.998083E+00 + 361 3.60000E-01 -6.971788E+00 + 362 3.61000E-01 -6.945450E+00 + 363 3.62000E-01 -6.919070E+00 + 364 3.63000E-01 -6.892649E+00 + 365 3.64000E-01 -6.866186E+00 + 366 3.65000E-01 -6.839681E+00 + 367 3.66000E-01 -6.813136E+00 + 368 3.67000E-01 -6.786552E+00 + 369 3.68000E-01 -6.759929E+00 + 370 3.69000E-01 -6.733266E+00 + 371 3.70000E-01 -6.706564E+00 + 372 3.71000E-01 -6.679824E+00 + 373 3.72000E-01 -6.653047E+00 + 374 3.73000E-01 -6.626233E+00 + 375 3.74000E-01 -6.599381E+00 + 376 3.75000E-01 -6.572493E+00 + 377 3.76000E-01 -6.545571E+00 + 378 3.77000E-01 -6.518613E+00 + 379 3.78000E-01 -6.491620E+00 + 380 3.79000E-01 -6.464592E+00 + 381 3.80000E-01 -6.437530E+00 + 382 3.81000E-01 -6.410437E+00 + 383 3.82000E-01 -6.383310E+00 + 384 3.83000E-01 -6.356150E+00 + 385 3.84000E-01 -6.328957E+00 + 386 3.85000E-01 -6.301734E+00 + 387 3.86000E-01 -6.274481E+00 + 388 3.87000E-01 -6.247197E+00 + 389 3.88000E-01 -6.219882E+00 + 390 3.89000E-01 -6.192537E+00 + 391 3.90000E-01 -6.165165E+00 + 392 3.91000E-01 -6.137764E+00 + 393 3.92000E-01 -6.110334E+00 + 394 3.93000E-01 -6.082876E+00 + 395 3.94000E-01 -6.055392E+00 + 396 3.95000E-01 -6.027881E+00 + 397 3.96000E-01 -6.000345E+00 + 398 3.97000E-01 -5.972782E+00 + 399 3.98000E-01 -5.945193E+00 + 400 3.99000E-01 -5.917580E+00 + 401 4.00000E-01 -5.889944E+00 + 402 4.01000E-01 -5.862285E+00 + 403 4.02000E-01 -5.834600E+00 + 404 4.03000E-01 -5.806893E+00 + 405 4.04000E-01 -5.779164E+00 + 406 4.05000E-01 -5.751414E+00 + 407 4.06000E-01 -5.723643E+00 + 408 4.07000E-01 -5.695849E+00 + 409 4.08000E-01 -5.668035E+00 + 410 4.09000E-01 -5.640202E+00 + 411 4.10000E-01 -5.612351E+00 + 412 4.11000E-01 -5.584480E+00 + 413 4.12000E-01 -5.556590E+00 + 414 4.13000E-01 -5.528681E+00 + 415 4.14000E-01 -5.500755E+00 + 416 4.15000E-01 -5.472814E+00 + 417 4.16000E-01 -5.444856E+00 + 418 4.17000E-01 -5.416881E+00 + 419 4.18000E-01 -5.388890E+00 + 420 4.19000E-01 -5.360884E+00 + 421 4.20000E-01 -5.332865E+00 + 422 4.21000E-01 -5.304832E+00 + 423 4.22000E-01 -5.276784E+00 + 424 4.23000E-01 -5.248723E+00 + 425 4.24000E-01 -5.220649E+00 + 426 4.25000E-01 -5.192564E+00 + 427 4.26000E-01 -5.164468E+00 + 428 4.27000E-01 -5.136359E+00 + 429 4.28000E-01 -5.108239E+00 + 430 4.29000E-01 -5.080109E+00 + 431 4.30000E-01 -5.051970E+00 + 432 4.31000E-01 -5.023823E+00 + 433 4.32000E-01 -4.995665E+00 + 434 4.33000E-01 -4.967499E+00 + 435 4.34000E-01 -4.939324E+00 + 436 4.35000E-01 -4.911143E+00 + 437 4.36000E-01 -4.882957E+00 + 438 4.37000E-01 -4.854763E+00 + 439 4.38000E-01 -4.826562E+00 + 440 4.39000E-01 -4.798355E+00 + 441 4.40000E-01 -4.770144E+00 + 442 4.41000E-01 -4.741930E+00 + 443 4.42000E-01 -4.713712E+00 + 444 4.43000E-01 -4.685489E+00 + 445 4.44000E-01 -4.657262E+00 + 446 4.45000E-01 -4.629032E+00 + 447 4.46000E-01 -4.600802E+00 + 448 4.47000E-01 -4.572571E+00 + 449 4.48000E-01 -4.544337E+00 + 450 4.49000E-01 -4.516102E+00 + 451 4.50000E-01 -4.487866E+00 + 452 4.51000E-01 -4.459631E+00 + 453 4.52000E-01 -4.431399E+00 + 454 4.53000E-01 -4.403167E+00 + 455 4.54000E-01 -4.374936E+00 + 456 4.55000E-01 -4.346705E+00 + 457 4.56000E-01 -4.318478E+00 + 458 4.57000E-01 -4.290255E+00 + 459 4.58000E-01 -4.262037E+00 + 460 4.59000E-01 -4.233821E+00 + 461 4.60000E-01 -4.205608E+00 + 462 4.61000E-01 -4.177400E+00 + 463 4.62000E-01 -4.149198E+00 + 464 4.63000E-01 -4.121004E+00 + 465 4.64000E-01 -4.092816E+00 + 466 4.65000E-01 -4.064633E+00 + 467 4.66000E-01 -4.036456E+00 + 468 4.67000E-01 -4.008287E+00 + 469 4.68000E-01 -3.980128E+00 + 470 4.69000E-01 -3.951978E+00 + 471 4.70000E-01 -3.923837E+00 + 472 4.71000E-01 -3.895704E+00 + 473 4.72000E-01 -3.867580E+00 + 474 4.73000E-01 -3.839467E+00 + 475 4.74000E-01 -3.811365E+00 + 476 4.75000E-01 -3.783277E+00 + 477 4.76000E-01 -3.755200E+00 + 478 4.77000E-01 -3.727133E+00 + 479 4.78000E-01 -3.699078E+00 + 480 4.79000E-01 -3.671037E+00 + 481 4.80000E-01 -3.643010E+00 + 482 4.81000E-01 -3.615000E+00 + 483 4.82000E-01 -3.587002E+00 + 484 4.83000E-01 -3.559018E+00 + 485 4.84000E-01 -3.531048E+00 + 486 4.85000E-01 -3.503095E+00 + 487 4.86000E-01 -3.475160E+00 + 488 4.87000E-01 -3.447244E+00 + 489 4.88000E-01 -3.419342E+00 + 490 4.89000E-01 -3.391456E+00 + 491 4.90000E-01 -3.363589E+00 + 492 4.91000E-01 -3.335740E+00 + 493 4.92000E-01 -3.307912E+00 + 494 4.93000E-01 -3.280105E+00 + 495 4.94000E-01 -3.252315E+00 + 496 4.95000E-01 -3.224545E+00 + 497 4.96000E-01 -3.196794E+00 + 498 4.97000E-01 -3.169066E+00 + 499 4.98000E-01 -3.141361E+00 + 500 4.99000E-01 -3.113679E+00 + 501 5.00000E-01 -3.086018E+00 + 502 5.01000E-01 -3.058378E+00 + 503 5.02000E-01 -3.030761E+00 + 504 5.03000E-01 -3.003168E+00 + 505 5.04000E-01 -2.975601E+00 + 506 5.05000E-01 -2.948060E+00 + 507 5.06000E-01 -2.920543E+00 + 508 5.07000E-01 -2.893050E+00 + 509 5.08000E-01 -2.865581E+00 + 510 5.09000E-01 -2.838139E+00 + 511 5.10000E-01 -2.810726E+00 + 512 5.11000E-01 -2.783342E+00 + 513 5.12000E-01 -2.755984E+00 + 514 5.13000E-01 -2.728652E+00 + 515 5.14000E-01 -2.701348E+00 + 516 5.15000E-01 -2.674073E+00 + 517 5.16000E-01 -2.646828E+00 + 518 5.17000E-01 -2.619615E+00 + 519 5.18000E-01 -2.592432E+00 + 520 5.19000E-01 -2.565277E+00 + 521 5.20000E-01 -2.538152E+00 + 522 5.21000E-01 -2.511058E+00 + 523 5.22000E-01 -2.483997E+00 + 524 5.23000E-01 -2.456970E+00 + 525 5.24000E-01 -2.429977E+00 + 526 5.25000E-01 -2.403014E+00 + 527 5.26000E-01 -2.376084E+00 + 528 5.27000E-01 -2.349186E+00 + 529 5.28000E-01 -2.322323E+00 + 530 5.29000E-01 -2.295496E+00 + 531 5.30000E-01 -2.268706E+00 + 532 5.31000E-01 -2.241951E+00 + 533 5.32000E-01 -2.215230E+00 + 534 5.33000E-01 -2.188543E+00 + 535 5.34000E-01 -2.161893E+00 + 536 5.35000E-01 -2.135281E+00 + 537 5.36000E-01 -2.108708E+00 + 538 5.37000E-01 -2.082175E+00 + 539 5.38000E-01 -2.055677E+00 + 540 5.39000E-01 -2.029216E+00 + 541 5.40000E-01 -2.002793E+00 + 542 5.41000E-01 -1.976410E+00 + 543 5.42000E-01 -1.950069E+00 + 544 5.43000E-01 -1.923770E+00 + 545 5.44000E-01 -1.897511E+00 + 546 5.45000E-01 -1.871290E+00 + 547 5.46000E-01 -1.845109E+00 + 548 5.47000E-01 -1.818969E+00 + 549 5.48000E-01 -1.792872E+00 + 550 5.49000E-01 -1.766819E+00 + 551 5.50000E-01 -1.740812E+00 + 552 5.51000E-01 -1.714846E+00 + 553 5.52000E-01 -1.688921E+00 + 554 5.53000E-01 -1.663039E+00 + 555 5.54000E-01 -1.637201E+00 + 556 5.55000E-01 -1.611409E+00 + 557 5.56000E-01 -1.585664E+00 + 558 5.57000E-01 -1.559966E+00 + 559 5.58000E-01 -1.534312E+00 + 560 5.59000E-01 -1.508701E+00 + 561 5.60000E-01 -1.483136E+00 + 562 5.61000E-01 -1.457618E+00 + 563 5.62000E-01 -1.432148E+00 + 564 5.63000E-01 -1.406729E+00 + 565 5.64000E-01 -1.381359E+00 + 566 5.65000E-01 -1.356034E+00 + 567 5.66000E-01 -1.330755E+00 + 568 5.67000E-01 -1.305525E+00 + 569 5.68000E-01 -1.280344E+00 + 570 5.69000E-01 -1.255214E+00 + 571 5.70000E-01 -1.230138E+00 + 572 5.71000E-01 -1.205113E+00 + 573 5.72000E-01 -1.180135E+00 + 574 5.73000E-01 -1.155206E+00 + 575 5.74000E-01 -1.130328E+00 + 576 5.75000E-01 -1.105501E+00 + 577 5.76000E-01 -1.080729E+00 + 578 5.77000E-01 -1.056012E+00 + 579 5.78000E-01 -1.031349E+00 + 580 5.79000E-01 -1.006735E+00 + 581 5.80000E-01 -9.821727E-01 + 582 5.81000E-01 -9.576632E-01 + 583 5.82000E-01 -9.332081E-01 + 584 5.83000E-01 -9.088091E-01 + 585 5.84000E-01 -8.844678E-01 + 586 5.85000E-01 -8.601833E-01 + 587 5.86000E-01 -8.359507E-01 + 588 5.87000E-01 -8.117714E-01 + 589 5.88000E-01 -7.876469E-01 + 590 5.89000E-01 -7.635791E-01 + 591 5.90000E-01 -7.395694E-01 + 592 5.91000E-01 -7.156196E-01 + 593 5.92000E-01 -6.917297E-01 + 594 5.93000E-01 -6.678943E-01 + 595 5.94000E-01 -6.441140E-01 + 596 5.95000E-01 -6.203905E-01 + 597 5.96000E-01 -5.967255E-01 + 598 5.97000E-01 -5.731205E-01 + 599 5.98000E-01 -5.495774E-01 + 600 5.99000E-01 -5.260972E-01 + 601 6.00000E-01 -5.026748E-01 + 602 6.01000E-01 -4.793092E-01 + 603 6.02000E-01 -4.560020E-01 + 604 6.03000E-01 -4.327549E-01 + 605 6.04000E-01 -4.095697E-01 + 606 6.05000E-01 -3.864480E-01 + 607 6.06000E-01 -3.633914E-01 + 608 6.07000E-01 -3.403974E-01 + 609 6.08000E-01 -3.174616E-01 + 610 6.09000E-01 -2.945857E-01 + 611 6.10000E-01 -2.717715E-01 + 612 6.11000E-01 -2.490205E-01 + 613 6.12000E-01 -2.263346E-01 + 614 6.13000E-01 -2.037153E-01 + 615 6.14000E-01 -1.811633E-01 + 616 6.15000E-01 -1.586722E-01 + 617 6.16000E-01 -1.362423E-01 + 618 6.17000E-01 -1.138752E-01 + 619 6.18000E-01 -9.157267E-02 + 620 6.19000E-01 -6.933642E-02 + 621 6.20000E-01 -4.716814E-02 + 622 6.21000E-01 -2.506956E-02 + 623 6.22000E-01 -3.037745E-03 + 624 6.23000E-01 1.893192E-02 + 625 6.24000E-01 4.083775E-02 + 626 6.25000E-01 6.267800E-02 + 627 6.26000E-01 8.445096E-02 + 628 6.27000E-01 1.061549E-01 + 629 6.28000E-01 1.277881E-01 + 630 6.29000E-01 1.493492E-01 + 631 6.30000E-01 1.708445E-01 + 632 6.31000E-01 1.922753E-01 + 633 6.32000E-01 2.136397E-01 + 634 6.33000E-01 2.349361E-01 + 635 6.34000E-01 2.561626E-01 + 636 6.35000E-01 2.773176E-01 + 637 6.36000E-01 2.983993E-01 + 638 6.37000E-01 3.194076E-01 + 639 6.38000E-01 3.403497E-01 + 640 6.39000E-01 3.612250E-01 + 641 6.40000E-01 3.820317E-01 + 642 6.41000E-01 4.027681E-01 + 643 6.42000E-01 4.234324E-01 + 644 6.43000E-01 4.440228E-01 + 645 6.44000E-01 4.645375E-01 + 646 6.45000E-01 4.849779E-01 + 647 6.46000E-01 5.053509E-01 + 648 6.47000E-01 5.256550E-01 + 649 6.48000E-01 5.458886E-01 + 650 6.49000E-01 5.660499E-01 + 651 6.50000E-01 5.861369E-01 + 652 6.51000E-01 6.061480E-01 + 653 6.52000E-01 6.260813E-01 + 654 6.53000E-01 6.459391E-01 + 655 6.54000E-01 6.657279E-01 + 656 6.55000E-01 6.854462E-01 + 657 6.56000E-01 7.050921E-01 + 658 6.57000E-01 7.246640E-01 + 659 6.58000E-01 7.441598E-01 + 660 6.59000E-01 7.635779E-01 + 661 6.60000E-01 7.829163E-01 + 662 6.61000E-01 8.021772E-01 + 663 6.62000E-01 8.213677E-01 + 664 6.63000E-01 8.404862E-01 + 665 6.64000E-01 8.595308E-01 + 666 6.65000E-01 8.784999E-01 + 667 6.66000E-01 8.973914E-01 + 668 6.67000E-01 9.162036E-01 + 669 6.68000E-01 9.349346E-01 + 670 6.69000E-01 9.535853E-01 + 671 6.70000E-01 9.721640E-01 + 672 6.71000E-01 9.906696E-01 + 673 6.72000E-01 1.009100E+00 + 674 6.73000E-01 1.027454E+00 + 675 6.74000E-01 1.045729E+00 + 676 6.75000E-01 1.063923E+00 + 677 6.76000E-01 1.082035E+00 + 678 6.77000E-01 1.100064E+00 + 679 6.78000E-01 1.118018E+00 + 680 6.79000E-01 1.135898E+00 + 681 6.80000E-01 1.153703E+00 + 682 6.81000E-01 1.171429E+00 + 683 6.82000E-01 1.189076E+00 + 684 6.83000E-01 1.206642E+00 + 685 6.84000E-01 1.224124E+00 + 686 6.85000E-01 1.241520E+00 + 687 6.86000E-01 1.258838E+00 + 688 6.87000E-01 1.276081E+00 + 689 6.88000E-01 1.293248E+00 + 690 6.89000E-01 1.310337E+00 + 691 6.90000E-01 1.327345E+00 + 692 6.91000E-01 1.344271E+00 + 693 6.92000E-01 1.361113E+00 + 694 6.93000E-01 1.377868E+00 + 695 6.94000E-01 1.394539E+00 + 696 6.95000E-01 1.411134E+00 + 697 6.96000E-01 1.427653E+00 + 698 6.97000E-01 1.444093E+00 + 699 6.98000E-01 1.460453E+00 + 700 6.99000E-01 1.476729E+00 + 701 7.00000E-01 1.492922E+00 + 702 7.01000E-01 1.509027E+00 + 703 7.02000E-01 1.525044E+00 + 704 7.03000E-01 1.540981E+00 + 705 7.04000E-01 1.556841E+00 + 706 7.05000E-01 1.572623E+00 + 707 7.06000E-01 1.588325E+00 + 708 7.07000E-01 1.603943E+00 + 709 7.08000E-01 1.619477E+00 + 710 7.09000E-01 1.634924E+00 + 711 7.10000E-01 1.650283E+00 + 712 7.11000E-01 1.665553E+00 + 713 7.12000E-01 1.680745E+00 + 714 7.13000E-01 1.695859E+00 + 715 7.14000E-01 1.710893E+00 + 716 7.15000E-01 1.725845E+00 + 717 7.16000E-01 1.740713E+00 + 718 7.17000E-01 1.755494E+00 + 719 7.18000E-01 1.770187E+00 + 720 7.19000E-01 1.784789E+00 + 721 7.20000E-01 1.799304E+00 + 722 7.21000E-01 1.813741E+00 + 723 7.22000E-01 1.828099E+00 + 724 7.23000E-01 1.842376E+00 + 725 7.24000E-01 1.856569E+00 + 726 7.25000E-01 1.870677E+00 + 727 7.26000E-01 1.884697E+00 + 728 7.27000E-01 1.898627E+00 + 729 7.28000E-01 1.912465E+00 + 730 7.29000E-01 1.926216E+00 + 731 7.30000E-01 1.939890E+00 + 732 7.31000E-01 1.953484E+00 + 733 7.32000E-01 1.966996E+00 + 734 7.33000E-01 1.980423E+00 + 735 7.34000E-01 1.993763E+00 + 736 7.35000E-01 2.007015E+00 + 737 7.36000E-01 2.020175E+00 + 738 7.37000E-01 2.033242E+00 + 739 7.38000E-01 2.046223E+00 + 740 7.39000E-01 2.059125E+00 + 741 7.40000E-01 2.071948E+00 + 742 7.41000E-01 2.084687E+00 + 743 7.42000E-01 2.097342E+00 + 744 7.43000E-01 2.109909E+00 + 745 7.44000E-01 2.122386E+00 + 746 7.45000E-01 2.134772E+00 + 747 7.46000E-01 2.147063E+00 + 748 7.47000E-01 2.159266E+00 + 749 7.48000E-01 2.171391E+00 + 750 7.49000E-01 2.183436E+00 + 751 7.50000E-01 2.195398E+00 + 752 7.51000E-01 2.207274E+00 + 753 7.52000E-01 2.219063E+00 + 754 7.53000E-01 2.230762E+00 + 755 7.54000E-01 2.242369E+00 + 756 7.55000E-01 2.253880E+00 + 757 7.56000E-01 2.265301E+00 + 758 7.57000E-01 2.276643E+00 + 759 7.58000E-01 2.287905E+00 + 760 7.59000E-01 2.299085E+00 + 761 7.60000E-01 2.310179E+00 + 762 7.61000E-01 2.321187E+00 + 763 7.62000E-01 2.332104E+00 + 764 7.63000E-01 2.342929E+00 + 765 7.64000E-01 2.353658E+00 + 766 7.65000E-01 2.364293E+00 + 767 7.66000E-01 2.374847E+00 + 768 7.67000E-01 2.385323E+00 + 769 7.68000E-01 2.395717E+00 + 770 7.69000E-01 2.406027E+00 + 771 7.70000E-01 2.416250E+00 + 772 7.71000E-01 2.426383E+00 + 773 7.72000E-01 2.436425E+00 + 774 7.73000E-01 2.446371E+00 + 775 7.74000E-01 2.456220E+00 + 776 7.75000E-01 2.465983E+00 + 777 7.76000E-01 2.475669E+00 + 778 7.77000E-01 2.485275E+00 + 779 7.78000E-01 2.494797E+00 + 780 7.79000E-01 2.504234E+00 + 781 7.80000E-01 2.513583E+00 + 782 7.81000E-01 2.522840E+00 + 783 7.82000E-01 2.532004E+00 + 784 7.83000E-01 2.541070E+00 + 785 7.84000E-01 2.550041E+00 + 786 7.85000E-01 2.558934E+00 + 787 7.86000E-01 2.567749E+00 + 788 7.87000E-01 2.576483E+00 + 789 7.88000E-01 2.585133E+00 + 790 7.89000E-01 2.593696E+00 + 791 7.90000E-01 2.602170E+00 + 792 7.91000E-01 2.610551E+00 + 793 7.92000E-01 2.618836E+00 + 794 7.93000E-01 2.627023E+00 + 795 7.94000E-01 2.635120E+00 + 796 7.95000E-01 2.643142E+00 + 797 7.96000E-01 2.651086E+00 + 798 7.97000E-01 2.658949E+00 + 799 7.98000E-01 2.666727E+00 + 800 7.99000E-01 2.674419E+00 + 801 8.00000E-01 2.682019E+00 + 802 8.01000E-01 2.689525E+00 + 803 8.02000E-01 2.696934E+00 + 804 8.03000E-01 2.704244E+00 + 805 8.04000E-01 2.711470E+00 + 806 8.05000E-01 2.718622E+00 + 807 8.06000E-01 2.725697E+00 + 808 8.07000E-01 2.732691E+00 + 809 8.08000E-01 2.739601E+00 + 810 8.09000E-01 2.746423E+00 + 811 8.10000E-01 2.753153E+00 + 812 8.11000E-01 2.759789E+00 + 813 8.12000E-01 2.766326E+00 + 814 8.13000E-01 2.772762E+00 + 815 8.14000E-01 2.779120E+00 + 816 8.15000E-01 2.785405E+00 + 817 8.16000E-01 2.791614E+00 + 818 8.17000E-01 2.797744E+00 + 819 8.18000E-01 2.803789E+00 + 820 8.19000E-01 2.809747E+00 + 821 8.20000E-01 2.815612E+00 + 822 8.21000E-01 2.821383E+00 + 823 8.22000E-01 2.827053E+00 + 824 8.23000E-01 2.832622E+00 + 825 8.24000E-01 2.838114E+00 + 826 8.25000E-01 2.843537E+00 + 827 8.26000E-01 2.848885E+00 + 828 8.27000E-01 2.854155E+00 + 829 8.28000E-01 2.859343E+00 + 830 8.29000E-01 2.864443E+00 + 831 8.30000E-01 2.869452E+00 + 832 8.31000E-01 2.874364E+00 + 833 8.32000E-01 2.879177E+00 + 834 8.33000E-01 2.883884E+00 + 835 8.34000E-01 2.888514E+00 + 836 8.35000E-01 2.893078E+00 + 837 8.36000E-01 2.897572E+00 + 838 8.37000E-01 2.901991E+00 + 839 8.38000E-01 2.906328E+00 + 840 8.39000E-01 2.910580E+00 + 841 8.40000E-01 2.914741E+00 + 842 8.41000E-01 2.918806E+00 + 843 8.42000E-01 2.922770E+00 + 844 8.43000E-01 2.926627E+00 + 845 8.44000E-01 2.930396E+00 + 846 8.45000E-01 2.934107E+00 + 847 8.46000E-01 2.937753E+00 + 848 8.47000E-01 2.941328E+00 + 849 8.48000E-01 2.944827E+00 + 850 8.49000E-01 2.948241E+00 + 851 8.50000E-01 2.951567E+00 + 852 8.51000E-01 2.954796E+00 + 853 8.52000E-01 2.957922E+00 + 854 8.53000E-01 2.960941E+00 + 855 8.54000E-01 2.963855E+00 + 856 8.55000E-01 2.966714E+00 + 857 8.56000E-01 2.969519E+00 + 858 8.57000E-01 2.972261E+00 + 859 8.58000E-01 2.974933E+00 + 860 8.59000E-01 2.977525E+00 + 861 8.60000E-01 2.980030E+00 + 862 8.61000E-01 2.982439E+00 + 863 8.62000E-01 2.984744E+00 + 864 8.63000E-01 2.986937E+00 + 865 8.64000E-01 2.989009E+00 + 866 8.65000E-01 2.991009E+00 + 867 8.66000E-01 2.992977E+00 + 868 8.67000E-01 2.994898E+00 + 869 8.68000E-01 2.996761E+00 + 870 8.69000E-01 2.998554E+00 + 871 8.70000E-01 3.000263E+00 + 872 8.71000E-01 3.001875E+00 + 873 8.72000E-01 3.003379E+00 + 874 8.73000E-01 3.004762E+00 + 875 8.74000E-01 3.006010E+00 + 876 8.75000E-01 3.007129E+00 + 877 8.76000E-01 3.008245E+00 + 878 8.77000E-01 3.009369E+00 + 879 8.78000E-01 3.010472E+00 + 880 8.79000E-01 3.011529E+00 + 881 8.80000E-01 3.012511E+00 + 882 8.81000E-01 3.013391E+00 + 883 8.82000E-01 3.014142E+00 + 884 8.83000E-01 3.014737E+00 + 885 8.84000E-01 3.015149E+00 + 886 8.85000E-01 3.015349E+00 + 887 8.86000E-01 3.015362E+00 + 888 8.87000E-01 3.015351E+00 + 889 8.88000E-01 3.015330E+00 + 890 8.89000E-01 3.015300E+00 + 891 8.90000E-01 3.015261E+00 + 892 8.91000E-01 3.015213E+00 + 893 8.92000E-01 3.015156E+00 + 894 8.93000E-01 3.015091E+00 + 895 8.94000E-01 3.015018E+00 + 896 8.95000E-01 3.014937E+00 + 897 8.96000E-01 3.014849E+00 + 898 8.97000E-01 3.014689E+00 + 899 8.98000E-01 3.014315E+00 + 900 8.99000E-01 3.013747E+00 + 901 9.00000E-01 3.013009E+00 + 902 9.01000E-01 3.012128E+00 + 903 9.02000E-01 3.011129E+00 + 904 9.03000E-01 3.010037E+00 + 905 9.04000E-01 3.008878E+00 + 906 9.05000E-01 3.007678E+00 + 907 9.06000E-01 3.006462E+00 + 908 9.07000E-01 3.005256E+00 + 909 9.08000E-01 3.004036E+00 + 910 9.09000E-01 3.002692E+00 + 911 9.10000E-01 3.001228E+00 + 912 9.11000E-01 2.999655E+00 + 913 9.12000E-01 2.997983E+00 + 914 9.13000E-01 2.996223E+00 + 915 9.14000E-01 2.994386E+00 + 916 9.15000E-01 2.992481E+00 + 917 9.16000E-01 2.990520E+00 + 918 9.17000E-01 2.988512E+00 + 919 9.18000E-01 2.986470E+00 + 920 9.19000E-01 2.984387E+00 + 921 9.20000E-01 2.982204E+00 + 922 9.21000E-01 2.979919E+00 + 923 9.22000E-01 2.977540E+00 + 924 9.23000E-01 2.975072E+00 + 925 9.24000E-01 2.972523E+00 + 926 9.25000E-01 2.969899E+00 + 927 9.26000E-01 2.967207E+00 + 928 9.27000E-01 2.964453E+00 + 929 9.28000E-01 2.961644E+00 + 930 9.29000E-01 2.958788E+00 + 931 9.30000E-01 2.955887E+00 + 932 9.31000E-01 2.952905E+00 + 933 9.32000E-01 2.949830E+00 + 934 9.33000E-01 2.946668E+00 + 935 9.34000E-01 2.943422E+00 + 936 9.35000E-01 2.940098E+00 + 937 9.36000E-01 2.936702E+00 + 938 9.37000E-01 2.933236E+00 + 939 9.38000E-01 2.929707E+00 + 940 9.39000E-01 2.926120E+00 + 941 9.40000E-01 2.922478E+00 + 942 9.41000E-01 2.918787E+00 + 943 9.42000E-01 2.915036E+00 + 944 9.43000E-01 2.911198E+00 + 945 9.44000E-01 2.907277E+00 + 946 9.45000E-01 2.903277E+00 + 947 9.46000E-01 2.899201E+00 + 948 9.47000E-01 2.895054E+00 + 949 9.48000E-01 2.890838E+00 + 950 9.49000E-01 2.886558E+00 + 951 9.50000E-01 2.882217E+00 + 952 9.51000E-01 2.877820E+00 + 953 9.52000E-01 2.873370E+00 + 954 9.53000E-01 2.868870E+00 + 955 9.54000E-01 2.864296E+00 + 956 9.55000E-01 2.859644E+00 + 957 9.56000E-01 2.854915E+00 + 958 9.57000E-01 2.850112E+00 + 959 9.58000E-01 2.845239E+00 + 960 9.59000E-01 2.840299E+00 + 961 9.60000E-01 2.835295E+00 + 962 9.61000E-01 2.830230E+00 + 963 9.62000E-01 2.825107E+00 + 964 9.63000E-01 2.819929E+00 + 965 9.64000E-01 2.814699E+00 + 966 9.65000E-01 2.809416E+00 + 967 9.66000E-01 2.804060E+00 + 968 9.67000E-01 2.798630E+00 + 969 9.68000E-01 2.793128E+00 + 970 9.69000E-01 2.787558E+00 + 971 9.70000E-01 2.781922E+00 + 972 9.71000E-01 2.776223E+00 + 973 9.72000E-01 2.770463E+00 + 974 9.73000E-01 2.764644E+00 + 975 9.74000E-01 2.758770E+00 + 976 9.75000E-01 2.752843E+00 + 977 9.76000E-01 2.746865E+00 + 978 9.77000E-01 2.740833E+00 + 979 9.78000E-01 2.734731E+00 + 980 9.79000E-01 2.728560E+00 + 981 9.80000E-01 2.722323E+00 + 982 9.81000E-01 2.716021E+00 + 983 9.82000E-01 2.709656E+00 + 984 9.83000E-01 2.703232E+00 + 985 9.84000E-01 2.696749E+00 + 986 9.85000E-01 2.690211E+00 + 987 9.86000E-01 2.683619E+00 + 988 9.87000E-01 2.676976E+00 + 989 9.88000E-01 2.670284E+00 + 990 9.89000E-01 2.663540E+00 + 991 9.90000E-01 2.656731E+00 + 992 9.91000E-01 2.649857E+00 + 993 9.92000E-01 2.642919E+00 + 994 9.93000E-01 2.635921E+00 + 995 9.94000E-01 2.628864E+00 + 996 9.95000E-01 2.621750E+00 + 997 9.96000E-01 2.614581E+00 + 998 9.97000E-01 2.607358E+00 + 999 9.98000E-01 2.600085E+00 + 1000 9.99000E-01 2.592762E+00 + 1001 1.00000E+00 2.585392E+00 + 1002 1.00100E+00 2.577973E+00 + 1003 1.00200E+00 2.570495E+00 + 1004 1.00300E+00 2.562955E+00 + 1005 1.00400E+00 2.555356E+00 + 1006 1.00500E+00 2.547699E+00 + 1007 1.00600E+00 2.539987E+00 + 1008 1.00700E+00 2.532220E+00 + 1009 1.00800E+00 2.524401E+00 + 1010 1.00900E+00 2.516532E+00 + 1011 1.01000E+00 2.508613E+00 + 1012 1.01100E+00 2.500648E+00 + 1013 1.01200E+00 2.492636E+00 + 1014 1.01300E+00 2.484581E+00 + 1015 1.01400E+00 2.476472E+00 + 1016 1.01500E+00 2.468306E+00 + 1017 1.01600E+00 2.460084E+00 + 1018 1.01700E+00 2.451807E+00 + 1019 1.01800E+00 2.443478E+00 + 1020 1.01900E+00 2.435097E+00 + 1021 1.02000E+00 2.426667E+00 + 1022 1.02100E+00 2.418189E+00 + 1023 1.02200E+00 2.409664E+00 + 1024 1.02300E+00 2.401094E+00 + 1025 1.02400E+00 2.392481E+00 + 1026 1.02500E+00 2.383826E+00 + 1027 1.02600E+00 2.375127E+00 + 1028 1.02700E+00 2.366374E+00 + 1029 1.02800E+00 2.357568E+00 + 1030 1.02900E+00 2.348711E+00 + 1031 1.03000E+00 2.339805E+00 + 1032 1.03100E+00 2.330850E+00 + 1033 1.03200E+00 2.321848E+00 + 1034 1.03300E+00 2.312801E+00 + 1035 1.03400E+00 2.303710E+00 + 1036 1.03500E+00 2.294576E+00 + 1037 1.03600E+00 2.285401E+00 + 1038 1.03700E+00 2.276186E+00 + 1039 1.03800E+00 2.266933E+00 + 1040 1.03900E+00 2.257634E+00 + 1041 1.04000E+00 2.248285E+00 + 1042 1.04100E+00 2.238889E+00 + 1043 1.04200E+00 2.229446E+00 + 1044 1.04300E+00 2.219958E+00 + 1045 1.04400E+00 2.210425E+00 + 1046 1.04500E+00 2.200850E+00 + 1047 1.04600E+00 2.191233E+00 + 1048 1.04700E+00 2.181576E+00 + 1049 1.04800E+00 2.171880E+00 + 1050 1.04900E+00 2.162147E+00 + 1051 1.05000E+00 2.152377E+00 + 1052 1.05100E+00 2.142571E+00 + 1053 1.05200E+00 2.132722E+00 + 1054 1.05300E+00 2.122828E+00 + 1055 1.05400E+00 2.112890E+00 + 1056 1.05500E+00 2.102909E+00 + 1057 1.05600E+00 2.092888E+00 + 1058 1.05700E+00 2.082826E+00 + 1059 1.05800E+00 2.072725E+00 + 1060 1.05900E+00 2.062587E+00 + 1061 1.06000E+00 2.052412E+00 + 1062 1.06100E+00 2.042202E+00 + 1063 1.06200E+00 2.031959E+00 + 1064 1.06300E+00 2.021682E+00 + 1065 1.06400E+00 2.011372E+00 + 1066 1.06500E+00 2.001023E+00 + 1067 1.06600E+00 1.990632E+00 + 1068 1.06700E+00 1.980202E+00 + 1069 1.06800E+00 1.969734E+00 + 1070 1.06900E+00 1.959228E+00 + 1071 1.07000E+00 1.948687E+00 + 1072 1.07100E+00 1.938110E+00 + 1073 1.07200E+00 1.927499E+00 + 1074 1.07300E+00 1.916855E+00 + 1075 1.07400E+00 1.906180E+00 + 1076 1.07500E+00 1.895475E+00 + 1077 1.07600E+00 1.884740E+00 + 1078 1.07700E+00 1.873976E+00 + 1079 1.07800E+00 1.863176E+00 + 1080 1.07900E+00 1.852340E+00 + 1081 1.08000E+00 1.841468E+00 + 1082 1.08100E+00 1.830562E+00 + 1083 1.08200E+00 1.819622E+00 + 1084 1.08300E+00 1.808650E+00 + 1085 1.08400E+00 1.797646E+00 + 1086 1.08500E+00 1.786613E+00 + 1087 1.08600E+00 1.775550E+00 + 1088 1.08700E+00 1.764459E+00 + 1089 1.08800E+00 1.753341E+00 + 1090 1.08900E+00 1.742197E+00 + 1091 1.09000E+00 1.731029E+00 + 1092 1.09100E+00 1.719830E+00 + 1093 1.09200E+00 1.708598E+00 + 1094 1.09300E+00 1.697335E+00 + 1095 1.09400E+00 1.686041E+00 + 1096 1.09500E+00 1.674718E+00 + 1097 1.09600E+00 1.663366E+00 + 1098 1.09700E+00 1.651986E+00 + 1099 1.09800E+00 1.640579E+00 + 1100 1.09900E+00 1.629147E+00 + 1101 1.10000E+00 1.617691E+00 + 1102 1.10100E+00 1.606211E+00 + 1103 1.10200E+00 1.594708E+00 + 1104 1.10300E+00 1.583184E+00 + 1105 1.10400E+00 1.571636E+00 + 1106 1.10500E+00 1.560061E+00 + 1107 1.10600E+00 1.548457E+00 + 1108 1.10700E+00 1.536826E+00 + 1109 1.10800E+00 1.525170E+00 + 1110 1.10900E+00 1.513488E+00 + 1111 1.11000E+00 1.501782E+00 + 1112 1.11100E+00 1.490054E+00 + 1113 1.11200E+00 1.478303E+00 + 1114 1.11300E+00 1.466531E+00 + 1115 1.11400E+00 1.454739E+00 + 1116 1.11500E+00 1.442927E+00 + 1117 1.11600E+00 1.431098E+00 + 1118 1.11700E+00 1.419251E+00 + 1119 1.11800E+00 1.407382E+00 + 1120 1.11900E+00 1.395489E+00 + 1121 1.12000E+00 1.383573E+00 + 1122 1.12100E+00 1.371634E+00 + 1123 1.12200E+00 1.359673E+00 + 1124 1.12300E+00 1.347693E+00 + 1125 1.12400E+00 1.335692E+00 + 1126 1.12500E+00 1.323673E+00 + 1127 1.12600E+00 1.311636E+00 + 1128 1.12700E+00 1.299583E+00 + 1129 1.12800E+00 1.287514E+00 + 1130 1.12900E+00 1.275429E+00 + 1131 1.13000E+00 1.263331E+00 + 1132 1.13100E+00 1.251219E+00 + 1133 1.13200E+00 1.239088E+00 + 1134 1.13300E+00 1.226936E+00 + 1135 1.13400E+00 1.214766E+00 + 1136 1.13500E+00 1.202578E+00 + 1137 1.13600E+00 1.190373E+00 + 1138 1.13700E+00 1.178152E+00 + 1139 1.13800E+00 1.165915E+00 + 1140 1.13900E+00 1.153664E+00 + 1141 1.14000E+00 1.141400E+00 + 1142 1.14100E+00 1.129123E+00 + 1143 1.14200E+00 1.116834E+00 + 1144 1.14300E+00 1.104535E+00 + 1145 1.14400E+00 1.092226E+00 + 1146 1.14500E+00 1.079906E+00 + 1147 1.14600E+00 1.067572E+00 + 1148 1.14700E+00 1.055221E+00 + 1149 1.14800E+00 1.042856E+00 + 1150 1.14900E+00 1.030478E+00 + 1151 1.15000E+00 1.018086E+00 + 1152 1.15100E+00 1.005683E+00 + 1153 1.15200E+00 9.932679E-01 + 1154 1.15300E+00 9.808430E-01 + 1155 1.15400E+00 9.684087E-01 + 1156 1.15500E+00 9.559660E-01 + 1157 1.15600E+00 9.435156E-01 + 1158 1.15700E+00 9.310586E-01 + 1159 1.15800E+00 9.185957E-01 + 1160 1.15900E+00 9.061270E-01 + 1161 1.16000E+00 8.936474E-01 + 1162 1.16100E+00 8.811564E-01 + 1163 1.16200E+00 8.686548E-01 + 1164 1.16300E+00 8.561435E-01 + 1165 1.16400E+00 8.436233E-01 + 1166 1.16500E+00 8.310952E-01 + 1167 1.16600E+00 8.185600E-01 + 1168 1.16700E+00 8.060185E-01 + 1169 1.16800E+00 7.934716E-01 + 1170 1.16900E+00 7.809202E-01 + 1171 1.17000E+00 7.683651E-01 + 1172 1.17100E+00 7.558073E-01 + 1173 1.17200E+00 7.432474E-01 + 1174 1.17300E+00 7.306864E-01 + 1175 1.17400E+00 7.181198E-01 + 1176 1.17500E+00 7.055456E-01 + 1177 1.17600E+00 6.929647E-01 + 1178 1.17700E+00 6.803781E-01 + 1179 1.17800E+00 6.677864E-01 + 1180 1.17900E+00 6.551907E-01 + 1181 1.18000E+00 6.425917E-01 + 1182 1.18100E+00 6.299902E-01 + 1183 1.18200E+00 6.173872E-01 + 1184 1.18300E+00 6.047835E-01 + 1185 1.18400E+00 5.921798E-01 + 1186 1.18500E+00 5.795772E-01 + 1187 1.18600E+00 5.669764E-01 + 1188 1.18700E+00 5.543782E-01 + 1189 1.18800E+00 5.417813E-01 + 1190 1.18900E+00 5.291807E-01 + 1191 1.19000E+00 5.165772E-01 + 1192 1.19100E+00 5.039716E-01 + 1193 1.19200E+00 4.913647E-01 + 1194 1.19300E+00 4.787574E-01 + 1195 1.19400E+00 4.661504E-01 + 1196 1.19500E+00 4.535447E-01 + 1197 1.19600E+00 4.409411E-01 + 1198 1.19700E+00 4.283404E-01 + 1199 1.19800E+00 4.157434E-01 + 1200 1.19900E+00 4.031510E-01 + 1201 1.20000E+00 3.905640E-01 + 1202 1.20100E+00 3.779833E-01 + 1203 1.20200E+00 3.654096E-01 + 1204 1.20300E+00 3.528386E-01 + 1205 1.20400E+00 3.402680E-01 + 1206 1.20500E+00 3.276989E-01 + 1207 1.20600E+00 3.151319E-01 + 1208 1.20700E+00 3.025679E-01 + 1209 1.20800E+00 2.900079E-01 + 1210 1.20900E+00 2.774525E-01 + 1211 1.21000E+00 2.649026E-01 + 1212 1.21100E+00 2.523591E-01 + 1213 1.21200E+00 2.398227E-01 + 1214 1.21300E+00 2.272944E-01 + 1215 1.21400E+00 2.147749E-01 + 1216 1.21500E+00 2.022652E-01 + 1217 1.21600E+00 1.897659E-01 + 1218 1.21700E+00 1.772774E-01 + 1219 1.21800E+00 1.647943E-01 + 1220 1.21900E+00 1.523159E-01 + 1221 1.22000E+00 1.398428E-01 + 1222 1.22100E+00 1.273761E-01 + 1223 1.22200E+00 1.149164E-01 + 1224 1.22300E+00 1.024646E-01 + 1225 1.22400E+00 9.002166E-02 + 1226 1.22500E+00 7.758825E-02 + 1227 1.22600E+00 6.516525E-02 + 1228 1.22700E+00 5.275349E-02 + 1229 1.22800E+00 4.035380E-02 + 1230 1.22900E+00 2.796701E-02 + 1231 1.23000E+00 1.559394E-02 + 1232 1.23100E+00 3.235431E-03 + 1233 1.23200E+00 -9.108412E-03 + 1234 1.23300E+00 -2.144316E-02 + 1235 1.23400E+00 -3.376949E-02 + 1236 1.23500E+00 -4.608658E-02 + 1237 1.23600E+00 -5.839359E-02 + 1238 1.23700E+00 -7.068970E-02 + 1239 1.23800E+00 -8.297408E-02 + 1240 1.23900E+00 -9.524589E-02 + 1241 1.24000E+00 -1.075043E-01 + 1242 1.24100E+00 -1.197485E-01 + 1243 1.24200E+00 -1.319777E-01 + 1244 1.24300E+00 -1.441910E-01 + 1245 1.24400E+00 -1.563875E-01 + 1246 1.24500E+00 -1.685666E-01 + 1247 1.24600E+00 -1.807272E-01 + 1248 1.24700E+00 -1.928690E-01 + 1249 1.24800E+00 -2.049972E-01 + 1250 1.24900E+00 -2.171135E-01 + 1251 1.25000E+00 -2.292170E-01 + 1252 1.25100E+00 -2.413070E-01 + 1253 1.25200E+00 -2.533825E-01 + 1254 1.25300E+00 -2.654427E-01 + 1255 1.25400E+00 -2.774869E-01 + 1256 1.25500E+00 -2.895141E-01 + 1257 1.25600E+00 -3.015236E-01 + 1258 1.25700E+00 -3.135145E-01 + 1259 1.25800E+00 -3.254860E-01 + 1260 1.25900E+00 -3.374372E-01 + 1261 1.26000E+00 -3.493673E-01 + 1262 1.26100E+00 -3.612755E-01 + 1263 1.26200E+00 -3.731609E-01 + 1264 1.26300E+00 -3.850268E-01 + 1265 1.26400E+00 -3.968775E-01 + 1266 1.26500E+00 -4.087122E-01 + 1267 1.26600E+00 -4.205301E-01 + 1268 1.26700E+00 -4.323304E-01 + 1269 1.26800E+00 -4.441122E-01 + 1270 1.26900E+00 -4.558747E-01 + 1271 1.27000E+00 -4.676170E-01 + 1272 1.27100E+00 -4.793384E-01 + 1273 1.27200E+00 -4.910379E-01 + 1274 1.27300E+00 -5.027147E-01 + 1275 1.27400E+00 -5.143681E-01 + 1276 1.27500E+00 -5.259970E-01 + 1277 1.27600E+00 -5.376008E-01 + 1278 1.27700E+00 -5.491786E-01 + 1279 1.27800E+00 -5.607303E-01 + 1280 1.27900E+00 -5.722622E-01 + 1281 1.28000E+00 -5.837754E-01 + 1282 1.28100E+00 -5.952689E-01 + 1283 1.28200E+00 -6.067419E-01 + 1284 1.28300E+00 -6.181935E-01 + 1285 1.28400E+00 -6.296230E-01 + 1286 1.28500E+00 -6.410294E-01 + 1287 1.28600E+00 -6.524118E-01 + 1288 1.28700E+00 -6.637696E-01 + 1289 1.28800E+00 -6.751017E-01 + 1290 1.28900E+00 -6.864074E-01 + 1291 1.29000E+00 -6.976859E-01 + 1292 1.29100E+00 -7.089361E-01 + 1293 1.29200E+00 -7.201574E-01 + 1294 1.29300E+00 -7.313489E-01 + 1295 1.29400E+00 -7.425121E-01 + 1296 1.29500E+00 -7.536535E-01 + 1297 1.29600E+00 -7.647728E-01 + 1298 1.29700E+00 -7.758691E-01 + 1299 1.29800E+00 -7.869416E-01 + 1300 1.29900E+00 -7.979893E-01 + 1301 1.30000E+00 -8.090115E-01 + 1302 1.30100E+00 -8.200072E-01 + 1303 1.30200E+00 -8.309757E-01 + 1304 1.30300E+00 -8.419159E-01 + 1305 1.30400E+00 -8.528272E-01 + 1306 1.30500E+00 -8.637086E-01 + 1307 1.30600E+00 -8.745593E-01 + 1308 1.30700E+00 -8.853784E-01 + 1309 1.30800E+00 -8.961650E-01 + 1310 1.30900E+00 -9.069183E-01 + 1311 1.31000E+00 -9.176408E-01 + 1312 1.31100E+00 -9.283388E-01 + 1313 1.31200E+00 -9.390117E-01 + 1314 1.31300E+00 -9.496587E-01 + 1315 1.31400E+00 -9.602790E-01 + 1316 1.31500E+00 -9.708715E-01 + 1317 1.31600E+00 -9.814355E-01 + 1318 1.31700E+00 -9.919700E-01 + 1319 1.31800E+00 -1.002474E+00 + 1320 1.31900E+00 -1.012947E+00 + 1321 1.32000E+00 -1.023388E+00 + 1322 1.32100E+00 -1.033796E+00 + 1323 1.32200E+00 -1.044171E+00 + 1324 1.32300E+00 -1.054510E+00 + 1325 1.32400E+00 -1.064814E+00 + 1326 1.32500E+00 -1.075082E+00 + 1327 1.32600E+00 -1.085315E+00 + 1328 1.32700E+00 -1.095520E+00 + 1329 1.32800E+00 -1.105699E+00 + 1330 1.32900E+00 -1.115848E+00 + 1331 1.33000E+00 -1.125969E+00 + 1332 1.33100E+00 -1.136059E+00 + 1333 1.33200E+00 -1.146118E+00 + 1334 1.33300E+00 -1.156145E+00 + 1335 1.33400E+00 -1.166139E+00 + 1336 1.33500E+00 -1.176099E+00 + 1337 1.33600E+00 -1.186025E+00 + 1338 1.33700E+00 -1.195915E+00 + 1339 1.33800E+00 -1.205769E+00 + 1340 1.33900E+00 -1.215585E+00 + 1341 1.34000E+00 -1.225363E+00 + 1342 1.34100E+00 -1.235102E+00 + 1343 1.34200E+00 -1.244801E+00 + 1344 1.34300E+00 -1.254470E+00 + 1345 1.34400E+00 -1.264109E+00 + 1346 1.34500E+00 -1.273717E+00 + 1347 1.34600E+00 -1.283294E+00 + 1348 1.34700E+00 -1.292839E+00 + 1349 1.34800E+00 -1.302351E+00 + 1350 1.34900E+00 -1.311828E+00 + 1351 1.35000E+00 -1.321271E+00 + 1352 1.35100E+00 -1.330677E+00 + 1353 1.35200E+00 -1.340047E+00 + 1354 1.35300E+00 -1.349379E+00 + 1355 1.35400E+00 -1.358672E+00 + 1356 1.35500E+00 -1.367926E+00 + 1357 1.35600E+00 -1.377139E+00 + 1358 1.35700E+00 -1.386310E+00 + 1359 1.35800E+00 -1.395439E+00 + 1360 1.35900E+00 -1.404530E+00 + 1361 1.36000E+00 -1.413589E+00 + 1362 1.36100E+00 -1.422617E+00 + 1363 1.36200E+00 -1.431612E+00 + 1364 1.36300E+00 -1.440573E+00 + 1365 1.36400E+00 -1.449499E+00 + 1366 1.36500E+00 -1.458390E+00 + 1367 1.36600E+00 -1.467244E+00 + 1368 1.36700E+00 -1.476060E+00 + 1369 1.36800E+00 -1.484837E+00 + 1370 1.36900E+00 -1.493575E+00 + 1371 1.37000E+00 -1.502273E+00 + 1372 1.37100E+00 -1.510929E+00 + 1373 1.37200E+00 -1.519543E+00 + 1374 1.37300E+00 -1.528113E+00 + 1375 1.37400E+00 -1.536640E+00 + 1376 1.37500E+00 -1.545121E+00 + 1377 1.37600E+00 -1.553565E+00 + 1378 1.37700E+00 -1.561977E+00 + 1379 1.37800E+00 -1.570354E+00 + 1380 1.37900E+00 -1.578697E+00 + 1381 1.38000E+00 -1.587004E+00 + 1382 1.38100E+00 -1.595275E+00 + 1383 1.38200E+00 -1.603507E+00 + 1384 1.38300E+00 -1.611701E+00 + 1385 1.38400E+00 -1.619855E+00 + 1386 1.38500E+00 -1.627969E+00 + 1387 1.38600E+00 -1.636040E+00 + 1388 1.38700E+00 -1.644069E+00 + 1389 1.38800E+00 -1.652055E+00 + 1390 1.38900E+00 -1.659995E+00 + 1391 1.39000E+00 -1.667890E+00 + 1392 1.39100E+00 -1.675739E+00 + 1393 1.39200E+00 -1.683540E+00 + 1394 1.39300E+00 -1.691304E+00 + 1395 1.39400E+00 -1.699034E+00 + 1396 1.39500E+00 -1.706729E+00 + 1397 1.39600E+00 -1.714387E+00 + 1398 1.39700E+00 -1.722009E+00 + 1399 1.39800E+00 -1.729592E+00 + 1400 1.39900E+00 -1.737136E+00 + 1401 1.40000E+00 -1.744640E+00 + 1402 1.40100E+00 -1.752102E+00 + 1403 1.40200E+00 -1.759522E+00 + 1404 1.40300E+00 -1.766899E+00 + 1405 1.40400E+00 -1.774231E+00 + 1406 1.40500E+00 -1.781518E+00 + 1407 1.40600E+00 -1.788759E+00 + 1408 1.40700E+00 -1.795952E+00 + 1409 1.40800E+00 -1.803096E+00 + 1410 1.40900E+00 -1.810192E+00 + 1411 1.41000E+00 -1.817247E+00 + 1412 1.41100E+00 -1.824268E+00 + 1413 1.41200E+00 -1.831252E+00 + 1414 1.41300E+00 -1.838200E+00 + 1415 1.41400E+00 -1.845110E+00 + 1416 1.41500E+00 -1.851981E+00 + 1417 1.41600E+00 -1.858812E+00 + 1418 1.41700E+00 -1.865602E+00 + 1419 1.41800E+00 -1.872349E+00 + 1420 1.41900E+00 -1.879053E+00 + 1421 1.42000E+00 -1.885713E+00 + 1422 1.42100E+00 -1.892327E+00 + 1423 1.42200E+00 -1.898895E+00 + 1424 1.42300E+00 -1.905414E+00 + 1425 1.42400E+00 -1.911885E+00 + 1426 1.42500E+00 -1.918306E+00 + 1427 1.42600E+00 -1.924677E+00 + 1428 1.42700E+00 -1.931001E+00 + 1429 1.42800E+00 -1.937290E+00 + 1430 1.42900E+00 -1.943544E+00 + 1431 1.43000E+00 -1.949761E+00 + 1432 1.43100E+00 -1.955940E+00 + 1433 1.43200E+00 -1.962079E+00 + 1434 1.43300E+00 -1.968179E+00 + 1435 1.43400E+00 -1.974237E+00 + 1436 1.43500E+00 -1.980252E+00 + 1437 1.43600E+00 -1.986224E+00 + 1438 1.43700E+00 -1.992150E+00 + 1439 1.43800E+00 -1.998031E+00 + 1440 1.43900E+00 -2.003864E+00 + 1441 1.44000E+00 -2.009649E+00 + 1442 1.44100E+00 -2.015385E+00 + 1443 1.44200E+00 -2.021069E+00 + 1444 1.44300E+00 -2.026702E+00 + 1445 1.44400E+00 -2.032283E+00 + 1446 1.44500E+00 -2.037825E+00 + 1447 1.44600E+00 -2.043331E+00 + 1448 1.44700E+00 -2.048802E+00 + 1449 1.44800E+00 -2.054236E+00 + 1450 1.44900E+00 -2.059631E+00 + 1451 1.45000E+00 -2.064987E+00 + 1452 1.45100E+00 -2.070302E+00 + 1453 1.45200E+00 -2.075574E+00 + 1454 1.45300E+00 -2.080803E+00 + 1455 1.45400E+00 -2.085987E+00 + 1456 1.45500E+00 -2.091126E+00 + 1457 1.45600E+00 -2.096217E+00 + 1458 1.45700E+00 -2.101260E+00 + 1459 1.45800E+00 -2.106253E+00 + 1460 1.45900E+00 -2.111195E+00 + 1461 1.46000E+00 -2.116084E+00 + 1462 1.46100E+00 -2.120921E+00 + 1463 1.46200E+00 -2.125706E+00 + 1464 1.46300E+00 -2.130455E+00 + 1465 1.46400E+00 -2.135170E+00 + 1466 1.46500E+00 -2.139850E+00 + 1467 1.46600E+00 -2.144493E+00 + 1468 1.46700E+00 -2.149098E+00 + 1469 1.46800E+00 -2.153664E+00 + 1470 1.46900E+00 -2.158189E+00 + 1471 1.47000E+00 -2.162671E+00 + 1472 1.47100E+00 -2.167110E+00 + 1473 1.47200E+00 -2.171503E+00 + 1474 1.47300E+00 -2.175851E+00 + 1475 1.47400E+00 -2.180150E+00 + 1476 1.47500E+00 -2.184400E+00 + 1477 1.47600E+00 -2.188600E+00 + 1478 1.47700E+00 -2.192748E+00 + 1479 1.47800E+00 -2.196842E+00 + 1480 1.47900E+00 -2.200882E+00 + 1481 1.48000E+00 -2.204870E+00 + 1482 1.48100E+00 -2.208824E+00 + 1483 1.48200E+00 -2.212745E+00 + 1484 1.48300E+00 -2.216633E+00 + 1485 1.48400E+00 -2.220486E+00 + 1486 1.48500E+00 -2.224302E+00 + 1487 1.48600E+00 -2.228080E+00 + 1488 1.48700E+00 -2.231817E+00 + 1489 1.48800E+00 -2.235513E+00 + 1490 1.48900E+00 -2.239166E+00 + 1491 1.49000E+00 -2.242774E+00 + 1492 1.49100E+00 -2.246335E+00 + 1493 1.49200E+00 -2.249849E+00 + 1494 1.49300E+00 -2.253313E+00 + 1495 1.49400E+00 -2.256727E+00 + 1496 1.49500E+00 -2.260088E+00 + 1497 1.49600E+00 -2.263394E+00 + 1498 1.49700E+00 -2.266645E+00 + 1499 1.49800E+00 -2.269840E+00 + 1500 1.49900E+00 -2.273002E+00 + 1501 1.50000E+00 -2.276135E+00 + 1502 1.50100E+00 -2.279237E+00 + 1503 1.50200E+00 -2.282307E+00 + 1504 1.50300E+00 -2.285342E+00 + 1505 1.50400E+00 -2.288341E+00 + 1506 1.50500E+00 -2.291302E+00 + 1507 1.50600E+00 -2.294224E+00 + 1508 1.50700E+00 -2.297103E+00 + 1509 1.50800E+00 -2.299939E+00 + 1510 1.50900E+00 -2.302729E+00 + 1511 1.51000E+00 -2.305472E+00 + 1512 1.51100E+00 -2.308165E+00 + 1513 1.51200E+00 -2.310807E+00 + 1514 1.51300E+00 -2.313397E+00 + 1515 1.51400E+00 -2.315931E+00 + 1516 1.51500E+00 -2.318408E+00 + 1517 1.51600E+00 -2.320827E+00 + 1518 1.51700E+00 -2.323202E+00 + 1519 1.51800E+00 -2.325555E+00 + 1520 1.51900E+00 -2.327883E+00 + 1521 1.52000E+00 -2.330183E+00 + 1522 1.52100E+00 -2.332454E+00 + 1523 1.52200E+00 -2.334693E+00 + 1524 1.52300E+00 -2.336898E+00 + 1525 1.52400E+00 -2.339065E+00 + 1526 1.52500E+00 -2.341193E+00 + 1527 1.52600E+00 -2.343280E+00 + 1528 1.52700E+00 -2.345322E+00 + 1529 1.52800E+00 -2.347318E+00 + 1530 1.52900E+00 -2.349264E+00 + 1531 1.53000E+00 -2.351160E+00 + 1532 1.53100E+00 -2.353001E+00 + 1533 1.53200E+00 -2.354787E+00 + 1534 1.53300E+00 -2.356513E+00 + 1535 1.53400E+00 -2.358179E+00 + 1536 1.53500E+00 -2.359783E+00 + 1537 1.53600E+00 -2.361363E+00 + 1538 1.53700E+00 -2.362930E+00 + 1539 1.53800E+00 -2.364481E+00 + 1540 1.53900E+00 -2.366011E+00 + 1541 1.54000E+00 -2.367518E+00 + 1542 1.54100E+00 -2.368998E+00 + 1543 1.54200E+00 -2.370446E+00 + 1544 1.54300E+00 -2.371860E+00 + 1545 1.54400E+00 -2.373235E+00 + 1546 1.54500E+00 -2.374568E+00 + 1547 1.54600E+00 -2.375855E+00 + 1548 1.54700E+00 -2.377093E+00 + 1549 1.54800E+00 -2.378277E+00 + 1550 1.54900E+00 -2.379404E+00 + 1551 1.55000E+00 -2.380471E+00 + 1552 1.55100E+00 -2.381474E+00 + 1553 1.55200E+00 -2.382408E+00 + 1554 1.55300E+00 -2.383271E+00 + 1555 1.55400E+00 -2.384065E+00 + 1556 1.55500E+00 -2.384853E+00 + 1557 1.55600E+00 -2.385644E+00 + 1558 1.55700E+00 -2.386435E+00 + 1559 1.55800E+00 -2.387218E+00 + 1560 1.55900E+00 -2.387990E+00 + 1561 1.56000E+00 -2.388743E+00 + 1562 1.56100E+00 -2.389474E+00 + 1563 1.56200E+00 -2.390175E+00 + 1564 1.56300E+00 -2.390842E+00 + 1565 1.56400E+00 -2.391470E+00 + 1566 1.56500E+00 -2.392052E+00 + 1567 1.56600E+00 -2.392583E+00 + 1568 1.56700E+00 -2.393057E+00 + 1569 1.56800E+00 -2.393470E+00 + 1570 1.56900E+00 -2.393815E+00 + 1571 1.57000E+00 -2.394088E+00 + 1572 1.57100E+00 -2.394281E+00 + 1573 1.57200E+00 -2.394391E+00 + 1574 1.57300E+00 -2.394414E+00 + 1575 1.57400E+00 -2.394400E+00 + 1576 1.57500E+00 -2.394367E+00 + 1577 1.57600E+00 -2.394317E+00 + 1578 1.57700E+00 -2.394251E+00 + 1579 1.57800E+00 -2.394168E+00 + 1580 1.57900E+00 -2.394070E+00 + 1581 1.58000E+00 -2.393958E+00 + 1582 1.58100E+00 -2.393831E+00 + 1583 1.58200E+00 -2.393691E+00 + 1584 1.58300E+00 -2.393539E+00 + 1585 1.58400E+00 -2.393374E+00 + 1586 1.58500E+00 -2.393198E+00 + 1587 1.58600E+00 -2.393012E+00 + 1588 1.58700E+00 -2.392816E+00 + 1589 1.58800E+00 -2.392611E+00 + 1590 1.58900E+00 -2.392397E+00 + 1591 1.59000E+00 -2.392175E+00 + 1592 1.59100E+00 -2.391946E+00 + 1593 1.59200E+00 -2.391711E+00 + 1594 1.59300E+00 -2.391433E+00 + 1595 1.59400E+00 -2.391069E+00 + 1596 1.59500E+00 -2.390625E+00 + 1597 1.59600E+00 -2.390105E+00 + 1598 1.59700E+00 -2.389515E+00 + 1599 1.59800E+00 -2.388859E+00 + 1600 1.59900E+00 -2.388145E+00 + 1601 1.60000E+00 -2.387376E+00 + 1602 1.60100E+00 -2.386557E+00 + 1603 1.60200E+00 -2.385695E+00 + 1604 1.60300E+00 -2.384794E+00 + 1605 1.60400E+00 -2.383861E+00 + 1606 1.60500E+00 -2.382898E+00 + 1607 1.60600E+00 -2.381914E+00 + 1608 1.60700E+00 -2.380911E+00 + 1609 1.60800E+00 -2.379897E+00 + 1610 1.60900E+00 -2.378876E+00 + 1611 1.61000E+00 -2.377853E+00 + 1612 1.61100E+00 -2.376833E+00 + 1613 1.61200E+00 -2.375818E+00 + 1614 1.61300E+00 -2.374764E+00 + 1615 1.61400E+00 -2.373659E+00 + 1616 1.61500E+00 -2.372506E+00 + 1617 1.61600E+00 -2.371306E+00 + 1618 1.61700E+00 -2.370063E+00 + 1619 1.61800E+00 -2.368778E+00 + 1620 1.61900E+00 -2.367455E+00 + 1621 1.62000E+00 -2.366095E+00 + 1622 1.62100E+00 -2.364700E+00 + 1623 1.62200E+00 -2.363274E+00 + 1624 1.62300E+00 -2.361819E+00 + 1625 1.62400E+00 -2.360337E+00 + 1626 1.62500E+00 -2.358830E+00 + 1627 1.62600E+00 -2.357301E+00 + 1628 1.62700E+00 -2.355752E+00 + 1629 1.62800E+00 -2.354186E+00 + 1630 1.62900E+00 -2.352605E+00 + 1631 1.63000E+00 -2.351011E+00 + 1632 1.63100E+00 -2.349407E+00 + 1633 1.63200E+00 -2.347790E+00 + 1634 1.63300E+00 -2.346137E+00 + 1635 1.63400E+00 -2.344445E+00 + 1636 1.63500E+00 -2.342716E+00 + 1637 1.63600E+00 -2.340951E+00 + 1638 1.63700E+00 -2.339152E+00 + 1639 1.63800E+00 -2.337321E+00 + 1640 1.63900E+00 -2.335459E+00 + 1641 1.64000E+00 -2.333567E+00 + 1642 1.64100E+00 -2.331647E+00 + 1643 1.64200E+00 -2.329701E+00 + 1644 1.64300E+00 -2.327730E+00 + 1645 1.64400E+00 -2.325736E+00 + 1646 1.64500E+00 -2.323720E+00 + 1647 1.64600E+00 -2.321684E+00 + 1648 1.64700E+00 -2.319629E+00 + 1649 1.64800E+00 -2.317557E+00 + 1650 1.64900E+00 -2.315470E+00 + 1651 1.65000E+00 -2.313368E+00 + 1652 1.65100E+00 -2.311254E+00 + 1653 1.65200E+00 -2.309127E+00 + 1654 1.65300E+00 -2.306971E+00 + 1655 1.65400E+00 -2.304784E+00 + 1656 1.65500E+00 -2.302566E+00 + 1657 1.65600E+00 -2.300320E+00 + 1658 1.65700E+00 -2.298047E+00 + 1659 1.65800E+00 -2.295747E+00 + 1660 1.65900E+00 -2.293421E+00 + 1661 1.66000E+00 -2.291072E+00 + 1662 1.66100E+00 -2.288699E+00 + 1663 1.66200E+00 -2.286305E+00 + 1664 1.66300E+00 -2.283889E+00 + 1665 1.66400E+00 -2.281455E+00 + 1666 1.66500E+00 -2.279001E+00 + 1667 1.66600E+00 -2.276530E+00 + 1668 1.66700E+00 -2.274044E+00 + 1669 1.66800E+00 -2.271542E+00 + 1670 1.66900E+00 -2.269026E+00 + 1671 1.67000E+00 -2.266497E+00 + 1672 1.67100E+00 -2.263957E+00 + 1673 1.67200E+00 -2.261406E+00 + 1674 1.67300E+00 -2.258836E+00 + 1675 1.67400E+00 -2.256240E+00 + 1676 1.67500E+00 -2.253620E+00 + 1677 1.67600E+00 -2.250978E+00 + 1678 1.67700E+00 -2.248312E+00 + 1679 1.67800E+00 -2.245626E+00 + 1680 1.67900E+00 -2.242919E+00 + 1681 1.68000E+00 -2.240193E+00 + 1682 1.68100E+00 -2.237448E+00 + 1683 1.68200E+00 -2.234686E+00 + 1684 1.68300E+00 -2.231907E+00 + 1685 1.68400E+00 -2.229112E+00 + 1686 1.68500E+00 -2.226303E+00 + 1687 1.68600E+00 -2.223479E+00 + 1688 1.68700E+00 -2.220642E+00 + 1689 1.68800E+00 -2.217794E+00 + 1690 1.68900E+00 -2.214934E+00 + 1691 1.69000E+00 -2.212064E+00 + 1692 1.69100E+00 -2.209184E+00 + 1693 1.69200E+00 -2.206297E+00 + 1694 1.69300E+00 -2.203399E+00 + 1695 1.69400E+00 -2.200483E+00 + 1696 1.69500E+00 -2.197548E+00 + 1697 1.69600E+00 -2.194595E+00 + 1698 1.69700E+00 -2.191625E+00 + 1699 1.69800E+00 -2.188638E+00 + 1700 1.69900E+00 -2.185636E+00 + 1701 1.70000E+00 -2.182619E+00 + 1702 1.70100E+00 -2.179587E+00 + 1703 1.70200E+00 -2.176542E+00 + 1704 1.70300E+00 -2.173485E+00 + 1705 1.70400E+00 -2.170416E+00 + 1706 1.70500E+00 -2.167336E+00 + 1707 1.70600E+00 -2.164245E+00 + 1708 1.70700E+00 -2.161146E+00 + 1709 1.70800E+00 -2.158037E+00 + 1710 1.70900E+00 -2.154921E+00 + 1711 1.71000E+00 -2.151798E+00 + 1712 1.71100E+00 -2.148668E+00 + 1713 1.71200E+00 -2.145533E+00 + 1714 1.71300E+00 -2.142393E+00 + 1715 1.71400E+00 -2.139246E+00 + 1716 1.71500E+00 -2.136086E+00 + 1717 1.71600E+00 -2.132912E+00 + 1718 1.71700E+00 -2.129725E+00 + 1719 1.71800E+00 -2.126526E+00 + 1720 1.71900E+00 -2.123317E+00 + 1721 1.72000E+00 -2.120096E+00 + 1722 1.72100E+00 -2.116866E+00 + 1723 1.72200E+00 -2.113626E+00 + 1724 1.72300E+00 -2.110379E+00 + 1725 1.72400E+00 -2.107123E+00 + 1726 1.72500E+00 -2.103860E+00 + 1727 1.72600E+00 -2.100591E+00 + 1728 1.72700E+00 -2.097317E+00 + 1729 1.72800E+00 -2.094037E+00 + 1730 1.72900E+00 -2.090754E+00 + 1731 1.73000E+00 -2.087466E+00 + 1732 1.73100E+00 -2.084176E+00 + 1733 1.73200E+00 -2.080884E+00 + 1734 1.73300E+00 -2.077591E+00 + 1735 1.73400E+00 -2.074296E+00 + 1736 1.73500E+00 -2.071000E+00 + 1737 1.73600E+00 -2.067695E+00 + 1738 1.73700E+00 -2.064381E+00 + 1739 1.73800E+00 -2.061060E+00 + 1740 1.73900E+00 -2.057732E+00 + 1741 1.74000E+00 -2.054397E+00 + 1742 1.74100E+00 -2.051057E+00 + 1743 1.74200E+00 -2.047711E+00 + 1744 1.74300E+00 -2.044361E+00 + 1745 1.74400E+00 -2.041007E+00 + 1746 1.74500E+00 -2.037651E+00 + 1747 1.74600E+00 -2.034291E+00 + 1748 1.74700E+00 -2.030930E+00 + 1749 1.74800E+00 -2.027568E+00 + 1750 1.74900E+00 -2.024205E+00 + 1751 1.75000E+00 -2.020843E+00 + 1752 1.75100E+00 -2.017481E+00 + 1753 1.75200E+00 -2.014120E+00 + 1754 1.75300E+00 -2.010762E+00 + 1755 1.75400E+00 -2.007406E+00 + 1756 1.75500E+00 -2.004054E+00 + 1757 1.75600E+00 -2.000705E+00 + 1758 1.75700E+00 -1.997354E+00 + 1759 1.75800E+00 -1.993999E+00 + 1760 1.75900E+00 -1.990641E+00 + 1761 1.76000E+00 -1.987280E+00 + 1762 1.76100E+00 -1.983917E+00 + 1763 1.76200E+00 -1.980553E+00 + 1764 1.76300E+00 -1.977188E+00 + 1765 1.76400E+00 -1.973823E+00 + 1766 1.76500E+00 -1.970459E+00 + 1767 1.76600E+00 -1.967096E+00 + 1768 1.76700E+00 -1.963734E+00 + 1769 1.76800E+00 -1.960375E+00 + 1770 1.76900E+00 -1.957020E+00 + 1771 1.77000E+00 -1.953667E+00 + 1772 1.77100E+00 -1.950319E+00 + 1773 1.77200E+00 -1.946977E+00 + 1774 1.77300E+00 -1.943639E+00 + 1775 1.77400E+00 -1.940308E+00 + 1776 1.77500E+00 -1.936984E+00 + 1777 1.77600E+00 -1.933667E+00 + 1778 1.77700E+00 -1.930358E+00 + 1779 1.77800E+00 -1.927055E+00 + 1780 1.77900E+00 -1.923752E+00 + 1781 1.78000E+00 -1.920450E+00 + 1782 1.78100E+00 -1.917150E+00 + 1783 1.78200E+00 -1.913852E+00 + 1784 1.78300E+00 -1.910556E+00 + 1785 1.78400E+00 -1.907264E+00 + 1786 1.78500E+00 -1.903975E+00 + 1787 1.78600E+00 -1.900691E+00 + 1788 1.78700E+00 -1.897412E+00 + 1789 1.78800E+00 -1.894138E+00 + 1790 1.78900E+00 -1.890871E+00 + 1791 1.79000E+00 -1.887611E+00 + 1792 1.79100E+00 -1.884358E+00 + 1793 1.79200E+00 -1.881113E+00 + 1794 1.79300E+00 -1.877877E+00 + 1795 1.79400E+00 -1.874651E+00 + 1796 1.79500E+00 -1.871434E+00 + 1797 1.79600E+00 -1.868228E+00 + 1798 1.79700E+00 -1.865033E+00 + 1799 1.79800E+00 -1.861849E+00 + 1800 1.79900E+00 -1.858679E+00 + 1801 1.80000E+00 -1.855517E+00 + 1802 1.80100E+00 -1.852359E+00 + 1803 1.80200E+00 -1.849206E+00 + 1804 1.80300E+00 -1.846059E+00 + 1805 1.80400E+00 -1.842917E+00 + 1806 1.80500E+00 -1.839782E+00 + 1807 1.80600E+00 -1.836654E+00 + 1808 1.80700E+00 -1.833534E+00 + 1809 1.80800E+00 -1.830422E+00 + 1810 1.80900E+00 -1.827319E+00 + 1811 1.81000E+00 -1.824226E+00 + 1812 1.81100E+00 -1.821143E+00 + 1813 1.81200E+00 -1.818070E+00 + 1814 1.81300E+00 -1.815009E+00 + 1815 1.81400E+00 -1.811960E+00 + 1816 1.81500E+00 -1.808923E+00 + 1817 1.81600E+00 -1.805900E+00 + 1818 1.81700E+00 -1.802890E+00 + 1819 1.81800E+00 -1.799895E+00 + 1820 1.81900E+00 -1.796914E+00 + 1821 1.82000E+00 -1.793950E+00 + 1822 1.82100E+00 -1.791001E+00 + 1823 1.82200E+00 -1.788066E+00 + 1824 1.82300E+00 -1.785139E+00 + 1825 1.82400E+00 -1.782219E+00 + 1826 1.82500E+00 -1.779308E+00 + 1827 1.82600E+00 -1.776406E+00 + 1828 1.82700E+00 -1.773514E+00 + 1829 1.82800E+00 -1.770632E+00 + 1830 1.82900E+00 -1.767761E+00 + 1831 1.83000E+00 -1.764901E+00 + 1832 1.83100E+00 -1.762053E+00 + 1833 1.83200E+00 -1.759218E+00 + 1834 1.83300E+00 -1.756396E+00 + 1835 1.83400E+00 -1.753588E+00 + 1836 1.83500E+00 -1.750795E+00 + 1837 1.83600E+00 -1.748016E+00 + 1838 1.83700E+00 -1.745253E+00 + 1839 1.83800E+00 -1.742506E+00 + 1840 1.83900E+00 -1.739776E+00 + 1841 1.84000E+00 -1.737064E+00 + 1842 1.84100E+00 -1.734369E+00 + 1843 1.84200E+00 -1.731693E+00 + 1844 1.84300E+00 -1.729036E+00 + 1845 1.84400E+00 -1.726398E+00 + 1846 1.84500E+00 -1.723771E+00 + 1847 1.84600E+00 -1.721155E+00 + 1848 1.84700E+00 -1.718550E+00 + 1849 1.84800E+00 -1.715956E+00 + 1850 1.84900E+00 -1.713373E+00 + 1851 1.85000E+00 -1.710803E+00 + 1852 1.85100E+00 -1.708246E+00 + 1853 1.85200E+00 -1.705703E+00 + 1854 1.85300E+00 -1.703174E+00 + 1855 1.85400E+00 -1.700659E+00 + 1856 1.85500E+00 -1.698160E+00 + 1857 1.85600E+00 -1.695677E+00 + 1858 1.85700E+00 -1.693210E+00 + 1859 1.85800E+00 -1.690760E+00 + 1860 1.85900E+00 -1.688328E+00 + 1861 1.86000E+00 -1.685914E+00 + 1862 1.86100E+00 -1.683518E+00 + 1863 1.86200E+00 -1.681142E+00 + 1864 1.86300E+00 -1.678786E+00 + 1865 1.86400E+00 -1.676450E+00 + 1866 1.86500E+00 -1.674135E+00 + 1867 1.86600E+00 -1.671842E+00 + 1868 1.86700E+00 -1.669568E+00 + 1869 1.86800E+00 -1.667307E+00 + 1870 1.86900E+00 -1.665057E+00 + 1871 1.87000E+00 -1.662819E+00 + 1872 1.87100E+00 -1.660595E+00 + 1873 1.87200E+00 -1.658384E+00 + 1874 1.87300E+00 -1.656188E+00 + 1875 1.87400E+00 -1.654006E+00 + 1876 1.87500E+00 -1.651839E+00 + 1877 1.87600E+00 -1.649687E+00 + 1878 1.87700E+00 -1.647552E+00 + 1879 1.87800E+00 -1.645434E+00 + 1880 1.87900E+00 -1.643332E+00 + 1881 1.88000E+00 -1.641249E+00 + 1882 1.88100E+00 -1.639183E+00 + 1883 1.88200E+00 -1.637137E+00 + 1884 1.88300E+00 -1.635109E+00 + 1885 1.88400E+00 -1.633102E+00 + 1886 1.88500E+00 -1.631114E+00 + 1887 1.88600E+00 -1.629148E+00 + 1888 1.88700E+00 -1.627203E+00 + 1889 1.88800E+00 -1.625280E+00 + 1890 1.88900E+00 -1.623379E+00 + 1891 1.89000E+00 -1.621498E+00 + 1892 1.89100E+00 -1.619630E+00 + 1893 1.89200E+00 -1.617774E+00 + 1894 1.89300E+00 -1.615932E+00 + 1895 1.89400E+00 -1.614104E+00 + 1896 1.89500E+00 -1.612290E+00 + 1897 1.89600E+00 -1.610490E+00 + 1898 1.89700E+00 -1.608705E+00 + 1899 1.89800E+00 -1.606936E+00 + 1900 1.89900E+00 -1.605182E+00 + 1901 1.90000E+00 -1.603444E+00 + 1902 1.90100E+00 -1.601723E+00 + 1903 1.90200E+00 -1.600018E+00 + 1904 1.90300E+00 -1.598331E+00 + 1905 1.90400E+00 -1.596661E+00 + 1906 1.90500E+00 -1.595010E+00 + 1907 1.90600E+00 -1.593377E+00 + 1908 1.90700E+00 -1.591763E+00 + 1909 1.90800E+00 -1.590168E+00 + 1910 1.90900E+00 -1.588593E+00 + 1911 1.91000E+00 -1.587039E+00 + 1912 1.91100E+00 -1.585504E+00 + 1913 1.91200E+00 -1.583991E+00 + 1914 1.91300E+00 -1.582497E+00 + 1915 1.91400E+00 -1.581018E+00 + 1916 1.91500E+00 -1.579552E+00 + 1917 1.91600E+00 -1.578099E+00 + 1918 1.91700E+00 -1.576660E+00 + 1919 1.91800E+00 -1.575234E+00 + 1920 1.91900E+00 -1.573822E+00 + 1921 1.92000E+00 -1.572423E+00 + 1922 1.92100E+00 -1.571039E+00 + 1923 1.92200E+00 -1.569669E+00 + 1924 1.92300E+00 -1.568314E+00 + 1925 1.92400E+00 -1.566973E+00 + 1926 1.92500E+00 -1.565647E+00 + 1927 1.92600E+00 -1.564335E+00 + 1928 1.92700E+00 -1.563039E+00 + 1929 1.92800E+00 -1.561758E+00 + 1930 1.92900E+00 -1.560492E+00 + 1931 1.93000E+00 -1.559241E+00 + 1932 1.93100E+00 -1.558007E+00 + 1933 1.93200E+00 -1.556788E+00 + 1934 1.93300E+00 -1.555585E+00 + 1935 1.93400E+00 -1.554398E+00 + 1936 1.93500E+00 -1.553228E+00 + 1937 1.93600E+00 -1.552073E+00 + 1938 1.93700E+00 -1.550935E+00 + 1939 1.93800E+00 -1.549809E+00 + 1940 1.93900E+00 -1.548697E+00 + 1941 1.94000E+00 -1.547597E+00 + 1942 1.94100E+00 -1.546511E+00 + 1943 1.94200E+00 -1.545436E+00 + 1944 1.94300E+00 -1.544374E+00 + 1945 1.94400E+00 -1.543324E+00 + 1946 1.94500E+00 -1.542285E+00 + 1947 1.94600E+00 -1.541257E+00 + 1948 1.94700E+00 -1.540240E+00 + 1949 1.94800E+00 -1.539234E+00 + 1950 1.94900E+00 -1.538239E+00 + 1951 1.95000E+00 -1.537253E+00 + 1952 1.95100E+00 -1.536278E+00 + 1953 1.95200E+00 -1.535312E+00 + 1954 1.95300E+00 -1.534355E+00 + 1955 1.95400E+00 -1.533407E+00 + 1956 1.95500E+00 -1.532468E+00 + 1957 1.95600E+00 -1.531538E+00 + 1958 1.95700E+00 -1.530615E+00 + 1959 1.95800E+00 -1.529701E+00 + 1960 1.95900E+00 -1.528794E+00 + 1961 1.96000E+00 -1.527895E+00 + 1962 1.96100E+00 -1.527006E+00 + 1963 1.96200E+00 -1.526129E+00 + 1964 1.96300E+00 -1.525262E+00 + 1965 1.96400E+00 -1.524407E+00 + 1966 1.96500E+00 -1.523561E+00 + 1967 1.96600E+00 -1.522724E+00 + 1968 1.96700E+00 -1.521896E+00 + 1969 1.96800E+00 -1.521076E+00 + 1970 1.96900E+00 -1.520263E+00 + 1971 1.97000E+00 -1.519457E+00 + 1972 1.97100E+00 -1.518657E+00 + 1973 1.97200E+00 -1.517862E+00 + 1974 1.97300E+00 -1.517072E+00 + 1975 1.97400E+00 -1.516286E+00 + 1976 1.97500E+00 -1.515504E+00 + 1977 1.97600E+00 -1.514725E+00 + 1978 1.97700E+00 -1.513947E+00 + 1979 1.97800E+00 -1.513172E+00 + 1980 1.97900E+00 -1.512397E+00 + 1981 1.98000E+00 -1.511623E+00 + 1982 1.98100E+00 -1.510849E+00 + 1983 1.98200E+00 -1.510074E+00 + 1984 1.98300E+00 -1.509297E+00 + 1985 1.98400E+00 -1.508518E+00 + 1986 1.98500E+00 -1.507740E+00 + 1987 1.98600E+00 -1.506965E+00 + 1988 1.98700E+00 -1.506194E+00 + 1989 1.98800E+00 -1.505425E+00 + 1990 1.98900E+00 -1.504659E+00 + 1991 1.99000E+00 -1.503896E+00 + 1992 1.99100E+00 -1.503136E+00 + 1993 1.99200E+00 -1.502377E+00 + 1994 1.99300E+00 -1.501621E+00 + 1995 1.99400E+00 -1.500867E+00 + 1996 1.99500E+00 -1.500114E+00 + 1997 1.99600E+00 -1.499364E+00 + 1998 1.99700E+00 -1.498615E+00 + 1999 1.99800E+00 -1.497867E+00 + 2000 1.99900E+00 -1.497120E+00 + 2001 2.00000E+00 -1.496374E+00 + 2002 2.00100E+00 -1.495630E+00 + 2003 2.00200E+00 -1.494885E+00 + 2004 2.00300E+00 -1.494142E+00 + 2005 2.00400E+00 -1.493399E+00 + 2006 2.00500E+00 -1.492656E+00 + 2007 2.00600E+00 -1.491913E+00 + 2008 2.00700E+00 -1.491169E+00 + 2009 2.00800E+00 -1.490426E+00 + 2010 2.00900E+00 -1.489682E+00 + 2011 2.01000E+00 -1.488940E+00 + 2012 2.01100E+00 -1.488197E+00 + 2013 2.01200E+00 -1.487456E+00 + 2014 2.01300E+00 -1.486716E+00 + 2015 2.01400E+00 -1.485976E+00 + 2016 2.01500E+00 -1.485237E+00 + 2017 2.01600E+00 -1.484499E+00 + 2018 2.01700E+00 -1.483761E+00 + 2019 2.01800E+00 -1.483025E+00 + 2020 2.01900E+00 -1.482289E+00 + 2021 2.02000E+00 -1.481554E+00 + 2022 2.02100E+00 -1.480820E+00 + 2023 2.02200E+00 -1.480086E+00 + 2024 2.02300E+00 -1.479354E+00 + 2025 2.02400E+00 -1.478622E+00 + 2026 2.02500E+00 -1.477891E+00 + 2027 2.02600E+00 -1.477160E+00 + 2028 2.02700E+00 -1.476431E+00 + 2029 2.02800E+00 -1.475702E+00 + 2030 2.02900E+00 -1.474974E+00 + 2031 2.03000E+00 -1.474247E+00 + 2032 2.03100E+00 -1.473520E+00 + 2033 2.03200E+00 -1.472795E+00 + 2034 2.03300E+00 -1.472070E+00 + 2035 2.03400E+00 -1.471346E+00 + 2036 2.03500E+00 -1.470622E+00 + 2037 2.03600E+00 -1.469900E+00 + 2038 2.03700E+00 -1.469178E+00 + 2039 2.03800E+00 -1.468457E+00 + 2040 2.03900E+00 -1.467736E+00 + 2041 2.04000E+00 -1.467017E+00 + 2042 2.04100E+00 -1.466298E+00 + 2043 2.04200E+00 -1.465580E+00 + 2044 2.04300E+00 -1.464863E+00 + 2045 2.04400E+00 -1.464146E+00 + 2046 2.04500E+00 -1.463430E+00 + 2047 2.04600E+00 -1.462715E+00 + 2048 2.04700E+00 -1.462001E+00 + 2049 2.04800E+00 -1.461287E+00 + 2050 2.04900E+00 -1.460575E+00 + 2051 2.05000E+00 -1.459863E+00 + 2052 2.05100E+00 -1.459151E+00 + 2053 2.05200E+00 -1.458441E+00 + 2054 2.05300E+00 -1.457731E+00 + 2055 2.05400E+00 -1.457022E+00 + 2056 2.05500E+00 -1.456313E+00 + 2057 2.05600E+00 -1.455606E+00 + 2058 2.05700E+00 -1.454899E+00 + 2059 2.05800E+00 -1.454193E+00 + 2060 2.05900E+00 -1.453488E+00 + 2061 2.06000E+00 -1.452783E+00 + 2062 2.06100E+00 -1.452079E+00 + 2063 2.06200E+00 -1.451376E+00 + 2064 2.06300E+00 -1.450673E+00 + 2065 2.06400E+00 -1.449972E+00 + 2066 2.06500E+00 -1.449271E+00 + 2067 2.06600E+00 -1.448570E+00 + 2068 2.06700E+00 -1.447871E+00 + 2069 2.06800E+00 -1.447172E+00 + 2070 2.06900E+00 -1.446474E+00 + 2071 2.07000E+00 -1.445776E+00 + 2072 2.07100E+00 -1.445080E+00 + 2073 2.07200E+00 -1.444384E+00 + 2074 2.07300E+00 -1.443688E+00 + 2075 2.07400E+00 -1.442994E+00 + 2076 2.07500E+00 -1.442300E+00 + 2077 2.07600E+00 -1.441607E+00 + 2078 2.07700E+00 -1.440914E+00 + 2079 2.07800E+00 -1.440223E+00 + 2080 2.07900E+00 -1.439532E+00 + 2081 2.08000E+00 -1.438841E+00 + 2082 2.08100E+00 -1.438152E+00 + 2083 2.08200E+00 -1.437463E+00 + 2084 2.08300E+00 -1.436775E+00 + 2085 2.08400E+00 -1.436087E+00 + 2086 2.08500E+00 -1.435401E+00 + 2087 2.08600E+00 -1.434714E+00 + 2088 2.08700E+00 -1.434029E+00 + 2089 2.08800E+00 -1.433344E+00 + 2090 2.08900E+00 -1.432660E+00 + 2091 2.09000E+00 -1.431977E+00 + 2092 2.09100E+00 -1.431294E+00 + 2093 2.09200E+00 -1.430613E+00 + 2094 2.09300E+00 -1.429931E+00 + 2095 2.09400E+00 -1.429251E+00 + 2096 2.09500E+00 -1.428571E+00 + 2097 2.09600E+00 -1.427892E+00 + 2098 2.09700E+00 -1.427213E+00 + 2099 2.09800E+00 -1.426535E+00 + 2100 2.09900E+00 -1.425858E+00 + 2101 2.10000E+00 -1.425182E+00 + 2102 2.10100E+00 -1.424506E+00 + 2103 2.10200E+00 -1.423831E+00 + 2104 2.10300E+00 -1.423157E+00 + 2105 2.10400E+00 -1.422483E+00 + 2106 2.10500E+00 -1.421810E+00 + 2107 2.10600E+00 -1.421137E+00 + 2108 2.10700E+00 -1.420466E+00 + 2109 2.10800E+00 -1.419795E+00 + 2110 2.10900E+00 -1.419124E+00 + 2111 2.11000E+00 -1.418455E+00 + 2112 2.11100E+00 -1.417786E+00 + 2113 2.11200E+00 -1.417117E+00 + 2114 2.11300E+00 -1.416450E+00 + 2115 2.11400E+00 -1.415783E+00 + 2116 2.11500E+00 -1.415116E+00 + 2117 2.11600E+00 -1.414451E+00 + 2118 2.11700E+00 -1.413785E+00 + 2119 2.11800E+00 -1.413121E+00 + 2120 2.11900E+00 -1.412457E+00 + 2121 2.12000E+00 -1.411794E+00 + 2122 2.12100E+00 -1.411132E+00 + 2123 2.12200E+00 -1.410470E+00 + 2124 2.12300E+00 -1.409809E+00 + 2125 2.12400E+00 -1.409148E+00 + 2126 2.12500E+00 -1.408489E+00 + 2127 2.12600E+00 -1.407829E+00 + 2128 2.12700E+00 -1.407171E+00 + 2129 2.12800E+00 -1.406513E+00 + 2130 2.12900E+00 -1.405856E+00 + 2131 2.13000E+00 -1.405199E+00 + 2132 2.13100E+00 -1.404543E+00 + 2133 2.13200E+00 -1.403888E+00 + 2134 2.13300E+00 -1.403233E+00 + 2135 2.13400E+00 -1.402580E+00 + 2136 2.13500E+00 -1.401926E+00 + 2137 2.13600E+00 -1.401273E+00 + 2138 2.13700E+00 -1.400621E+00 + 2139 2.13800E+00 -1.399970E+00 + 2140 2.13900E+00 -1.399319E+00 + 2141 2.14000E+00 -1.398669E+00 + 2142 2.14100E+00 -1.398019E+00 + 2143 2.14200E+00 -1.397371E+00 + 2144 2.14300E+00 -1.396722E+00 + 2145 2.14400E+00 -1.396075E+00 + 2146 2.14500E+00 -1.395428E+00 + 2147 2.14600E+00 -1.394781E+00 + 2148 2.14700E+00 -1.394135E+00 + 2149 2.14800E+00 -1.393490E+00 + 2150 2.14900E+00 -1.392846E+00 + 2151 2.15000E+00 -1.392202E+00 + 2152 2.15100E+00 -1.391558E+00 + 2153 2.15200E+00 -1.390916E+00 + 2154 2.15300E+00 -1.390274E+00 + 2155 2.15400E+00 -1.389632E+00 + 2156 2.15500E+00 -1.388991E+00 + 2157 2.15600E+00 -1.388351E+00 + 2158 2.15700E+00 -1.387712E+00 + 2159 2.15800E+00 -1.387073E+00 + 2160 2.15900E+00 -1.386434E+00 + 2161 2.16000E+00 -1.385797E+00 + 2162 2.16100E+00 -1.385160E+00 + 2163 2.16200E+00 -1.384523E+00 + 2164 2.16300E+00 -1.383887E+00 + 2165 2.16400E+00 -1.383252E+00 + 2166 2.16500E+00 -1.382617E+00 + 2167 2.16600E+00 -1.381983E+00 + 2168 2.16700E+00 -1.381350E+00 + 2169 2.16800E+00 -1.380717E+00 + 2170 2.16900E+00 -1.380085E+00 + 2171 2.17000E+00 -1.379453E+00 + 2172 2.17100E+00 -1.378822E+00 + 2173 2.17200E+00 -1.378191E+00 + 2174 2.17300E+00 -1.377561E+00 + 2175 2.17400E+00 -1.376932E+00 + 2176 2.17500E+00 -1.376303E+00 + 2177 2.17600E+00 -1.375675E+00 + 2178 2.17700E+00 -1.375048E+00 + 2179 2.17800E+00 -1.374421E+00 + 2180 2.17900E+00 -1.373795E+00 + 2181 2.18000E+00 -1.373169E+00 + 2182 2.18100E+00 -1.372544E+00 + 2183 2.18200E+00 -1.371919E+00 + 2184 2.18300E+00 -1.371295E+00 + 2185 2.18400E+00 -1.370672E+00 + 2186 2.18500E+00 -1.370049E+00 + 2187 2.18600E+00 -1.369427E+00 + 2188 2.18700E+00 -1.368805E+00 + 2189 2.18800E+00 -1.368184E+00 + 2190 2.18900E+00 -1.367564E+00 + 2191 2.19000E+00 -1.366944E+00 + 2192 2.19100E+00 -1.366325E+00 + 2193 2.19200E+00 -1.365706E+00 + 2194 2.19300E+00 -1.365088E+00 + 2195 2.19400E+00 -1.364471E+00 + 2196 2.19500E+00 -1.363854E+00 + 2197 2.19600E+00 -1.363237E+00 + 2198 2.19700E+00 -1.362621E+00 + 2199 2.19800E+00 -1.362006E+00 + 2200 2.19900E+00 -1.361391E+00 + 2201 2.20000E+00 -1.360777E+00 + 2202 2.20100E+00 -1.360164E+00 + 2203 2.20200E+00 -1.359551E+00 + 2204 2.20300E+00 -1.358938E+00 + 2205 2.20400E+00 -1.358326E+00 + 2206 2.20500E+00 -1.357715E+00 + 2207 2.20600E+00 -1.357105E+00 + 2208 2.20700E+00 -1.356494E+00 + 2209 2.20800E+00 -1.355885E+00 + 2210 2.20900E+00 -1.355276E+00 + 2211 2.21000E+00 -1.354667E+00 + 2212 2.21100E+00 -1.354059E+00 + 2213 2.21200E+00 -1.353452E+00 + 2214 2.21300E+00 -1.352845E+00 + 2215 2.21400E+00 -1.352239E+00 + 2216 2.21500E+00 -1.351634E+00 + 2217 2.21600E+00 -1.351029E+00 + 2218 2.21700E+00 -1.350424E+00 + 2219 2.21800E+00 -1.349820E+00 + 2220 2.21900E+00 -1.349217E+00 + 2221 2.22000E+00 -1.348614E+00 + 2222 2.22100E+00 -1.348011E+00 + 2223 2.22200E+00 -1.347410E+00 + 2224 2.22300E+00 -1.346809E+00 + 2225 2.22400E+00 -1.346208E+00 + 2226 2.22500E+00 -1.345608E+00 + 2227 2.22600E+00 -1.345008E+00 + 2228 2.22700E+00 -1.344409E+00 + 2229 2.22800E+00 -1.343811E+00 + 2230 2.22900E+00 -1.343213E+00 + 2231 2.23000E+00 -1.342615E+00 + 2232 2.23100E+00 -1.342018E+00 + 2233 2.23200E+00 -1.341422E+00 + 2234 2.23300E+00 -1.340826E+00 + 2235 2.23400E+00 -1.340231E+00 + 2236 2.23500E+00 -1.339636E+00 + 2237 2.23600E+00 -1.339042E+00 + 2238 2.23700E+00 -1.338449E+00 + 2239 2.23800E+00 -1.337856E+00 + 2240 2.23900E+00 -1.337263E+00 + 2241 2.24000E+00 -1.336671E+00 + 2242 2.24100E+00 -1.336080E+00 + 2243 2.24200E+00 -1.335489E+00 + 2244 2.24300E+00 -1.334898E+00 + 2245 2.24400E+00 -1.334308E+00 + 2246 2.24500E+00 -1.333719E+00 + 2247 2.24600E+00 -1.333130E+00 + 2248 2.24700E+00 -1.332542E+00 + 2249 2.24800E+00 -1.331954E+00 + 2250 2.24900E+00 -1.331367E+00 + 2251 2.25000E+00 -1.330780E+00 + 2252 2.25100E+00 -1.330194E+00 + 2253 2.25200E+00 -1.329609E+00 + 2254 2.25300E+00 -1.329023E+00 + 2255 2.25400E+00 -1.328439E+00 + 2256 2.25500E+00 -1.327855E+00 + 2257 2.25600E+00 -1.327271E+00 + 2258 2.25700E+00 -1.326688E+00 + 2259 2.25800E+00 -1.326106E+00 + 2260 2.25900E+00 -1.325524E+00 + 2261 2.26000E+00 -1.324942E+00 + 2262 2.26100E+00 -1.324361E+00 + 2263 2.26200E+00 -1.323781E+00 + 2264 2.26300E+00 -1.323201E+00 + 2265 2.26400E+00 -1.322621E+00 + 2266 2.26500E+00 -1.322043E+00 + 2267 2.26600E+00 -1.321464E+00 + 2268 2.26700E+00 -1.320886E+00 + 2269 2.26800E+00 -1.320309E+00 + 2270 2.26900E+00 -1.319732E+00 + 2271 2.27000E+00 -1.319156E+00 + 2272 2.27100E+00 -1.318580E+00 + 2273 2.27200E+00 -1.318005E+00 + 2274 2.27300E+00 -1.317430E+00 + 2275 2.27400E+00 -1.316856E+00 + 2276 2.27500E+00 -1.316282E+00 + 2277 2.27600E+00 -1.315709E+00 + 2278 2.27700E+00 -1.315136E+00 + 2279 2.27800E+00 -1.314564E+00 + 2280 2.27900E+00 -1.313992E+00 + 2281 2.28000E+00 -1.313421E+00 + 2282 2.28100E+00 -1.312850E+00 + 2283 2.28200E+00 -1.312279E+00 + 2284 2.28300E+00 -1.311710E+00 + 2285 2.28400E+00 -1.311140E+00 + 2286 2.28500E+00 -1.310572E+00 + 2287 2.28600E+00 -1.310003E+00 + 2288 2.28700E+00 -1.309436E+00 + 2289 2.28800E+00 -1.308868E+00 + 2290 2.28900E+00 -1.308302E+00 + 2291 2.29000E+00 -1.307735E+00 + 2292 2.29100E+00 -1.307169E+00 + 2293 2.29200E+00 -1.306604E+00 + 2294 2.29300E+00 -1.306039E+00 + 2295 2.29400E+00 -1.305475E+00 + 2296 2.29500E+00 -1.304911E+00 + 2297 2.29600E+00 -1.304348E+00 + 2298 2.29700E+00 -1.303785E+00 + 2299 2.29800E+00 -1.303223E+00 + 2300 2.29900E+00 -1.302661E+00 + 2301 2.30000E+00 -1.302100E+00 + 2302 2.30100E+00 -1.301539E+00 + 2303 2.30200E+00 -1.300978E+00 + 2304 2.30300E+00 -1.300418E+00 + 2305 2.30400E+00 -1.299859E+00 + 2306 2.30500E+00 -1.299300E+00 + 2307 2.30600E+00 -1.298742E+00 + 2308 2.30700E+00 -1.298184E+00 + 2309 2.30800E+00 -1.297626E+00 + 2310 2.30900E+00 -1.297069E+00 + 2311 2.31000E+00 -1.296513E+00 + 2312 2.31100E+00 -1.295957E+00 + 2313 2.31200E+00 -1.295401E+00 + 2314 2.31300E+00 -1.294846E+00 + 2315 2.31400E+00 -1.294291E+00 + 2316 2.31500E+00 -1.293737E+00 + 2317 2.31600E+00 -1.293183E+00 + 2318 2.31700E+00 -1.292630E+00 + 2319 2.31800E+00 -1.292078E+00 + 2320 2.31900E+00 -1.291525E+00 + 2321 2.32000E+00 -1.290974E+00 + 2322 2.32100E+00 -1.290422E+00 + 2323 2.32200E+00 -1.289871E+00 + 2324 2.32300E+00 -1.289321E+00 + 2325 2.32400E+00 -1.288771E+00 + 2326 2.32500E+00 -1.288222E+00 + 2327 2.32600E+00 -1.287673E+00 + 2328 2.32700E+00 -1.287125E+00 + 2329 2.32800E+00 -1.286577E+00 + 2330 2.32900E+00 -1.286029E+00 + 2331 2.33000E+00 -1.285482E+00 + 2332 2.33100E+00 -1.284936E+00 + 2333 2.33200E+00 -1.284389E+00 + 2334 2.33300E+00 -1.283844E+00 + 2335 2.33400E+00 -1.283299E+00 + 2336 2.33500E+00 -1.282754E+00 + 2337 2.33600E+00 -1.282210E+00 + 2338 2.33700E+00 -1.281666E+00 + 2339 2.33800E+00 -1.281122E+00 + 2340 2.33900E+00 -1.280580E+00 + 2341 2.34000E+00 -1.280037E+00 + 2342 2.34100E+00 -1.279495E+00 + 2343 2.34200E+00 -1.278954E+00 + 2344 2.34300E+00 -1.278413E+00 + 2345 2.34400E+00 -1.277872E+00 + 2346 2.34500E+00 -1.277332E+00 + 2347 2.34600E+00 -1.276792E+00 + 2348 2.34700E+00 -1.276253E+00 + 2349 2.34800E+00 -1.275714E+00 + 2350 2.34900E+00 -1.275176E+00 + 2351 2.35000E+00 -1.274638E+00 + 2352 2.35100E+00 -1.274101E+00 + 2353 2.35200E+00 -1.273564E+00 + 2354 2.35300E+00 -1.273027E+00 + 2355 2.35400E+00 -1.272491E+00 + 2356 2.35500E+00 -1.271956E+00 + 2357 2.35600E+00 -1.271421E+00 + 2358 2.35700E+00 -1.270886E+00 + 2359 2.35800E+00 -1.270352E+00 + 2360 2.35900E+00 -1.269818E+00 + 2361 2.36000E+00 -1.269285E+00 + 2362 2.36100E+00 -1.268752E+00 + 2363 2.36200E+00 -1.268219E+00 + 2364 2.36300E+00 -1.267687E+00 + 2365 2.36400E+00 -1.267156E+00 + 2366 2.36500E+00 -1.266625E+00 + 2367 2.36600E+00 -1.266094E+00 + 2368 2.36700E+00 -1.265564E+00 + 2369 2.36800E+00 -1.265034E+00 + 2370 2.36900E+00 -1.264505E+00 + 2371 2.37000E+00 -1.263976E+00 + 2372 2.37100E+00 -1.263447E+00 + 2373 2.37200E+00 -1.262919E+00 + 2374 2.37300E+00 -1.262392E+00 + 2375 2.37400E+00 -1.261864E+00 + 2376 2.37500E+00 -1.261338E+00 + 2377 2.37600E+00 -1.260811E+00 + 2378 2.37700E+00 -1.260286E+00 + 2379 2.37800E+00 -1.259760E+00 + 2380 2.37900E+00 -1.259235E+00 + 2381 2.38000E+00 -1.258711E+00 + 2382 2.38100E+00 -1.258187E+00 + 2383 2.38200E+00 -1.257663E+00 + 2384 2.38300E+00 -1.257140E+00 + 2385 2.38400E+00 -1.256617E+00 + 2386 2.38500E+00 -1.256095E+00 + 2387 2.38600E+00 -1.255573E+00 + 2388 2.38700E+00 -1.255052E+00 + 2389 2.38800E+00 -1.254530E+00 + 2390 2.38900E+00 -1.254010E+00 + 2391 2.39000E+00 -1.253490E+00 + 2392 2.39100E+00 -1.252970E+00 + 2393 2.39200E+00 -1.252451E+00 + 2394 2.39300E+00 -1.251932E+00 + 2395 2.39400E+00 -1.251413E+00 + 2396 2.39500E+00 -1.250895E+00 + 2397 2.39600E+00 -1.250378E+00 + 2398 2.39700E+00 -1.249860E+00 + 2399 2.39800E+00 -1.249344E+00 + 2400 2.39900E+00 -1.248827E+00 + 2401 2.40000E+00 -1.248311E+00 + 2402 2.40100E+00 -1.247796E+00 + 2403 2.40200E+00 -1.247281E+00 + 2404 2.40300E+00 -1.246766E+00 + 2405 2.40400E+00 -1.246252E+00 + 2406 2.40500E+00 -1.245738E+00 + 2407 2.40600E+00 -1.245225E+00 + 2408 2.40700E+00 -1.244712E+00 + 2409 2.40800E+00 -1.244199E+00 + 2410 2.40900E+00 -1.243687E+00 + 2411 2.41000E+00 -1.243175E+00 + 2412 2.41100E+00 -1.242664E+00 + 2413 2.41200E+00 -1.242153E+00 + 2414 2.41300E+00 -1.241643E+00 + 2415 2.41400E+00 -1.241133E+00 + 2416 2.41500E+00 -1.240623E+00 + 2417 2.41600E+00 -1.240114E+00 + 2418 2.41700E+00 -1.239605E+00 + 2419 2.41800E+00 -1.239097E+00 + 2420 2.41900E+00 -1.238589E+00 + 2421 2.42000E+00 -1.238081E+00 + 2422 2.42100E+00 -1.237574E+00 + 2423 2.42200E+00 -1.237067E+00 + 2424 2.42300E+00 -1.236561E+00 + 2425 2.42400E+00 -1.236055E+00 + 2426 2.42500E+00 -1.235550E+00 + 2427 2.42600E+00 -1.235045E+00 + 2428 2.42700E+00 -1.234540E+00 + 2429 2.42800E+00 -1.234036E+00 + 2430 2.42900E+00 -1.233532E+00 + 2431 2.43000E+00 -1.233028E+00 + 2432 2.43100E+00 -1.232525E+00 + 2433 2.43200E+00 -1.232023E+00 + 2434 2.43300E+00 -1.231520E+00 + 2435 2.43400E+00 -1.231018E+00 + 2436 2.43500E+00 -1.230517E+00 + 2437 2.43600E+00 -1.230016E+00 + 2438 2.43700E+00 -1.229515E+00 + 2439 2.43800E+00 -1.229015E+00 + 2440 2.43900E+00 -1.228515E+00 + 2441 2.44000E+00 -1.228016E+00 + 2442 2.44100E+00 -1.227517E+00 + 2443 2.44200E+00 -1.227019E+00 + 2444 2.44300E+00 -1.226520E+00 + 2445 2.44400E+00 -1.226023E+00 + 2446 2.44500E+00 -1.225525E+00 + 2447 2.44600E+00 -1.225028E+00 + 2448 2.44700E+00 -1.224532E+00 + 2449 2.44800E+00 -1.224036E+00 + 2450 2.44900E+00 -1.223540E+00 + 2451 2.45000E+00 -1.223044E+00 + 2452 2.45100E+00 -1.222549E+00 + 2453 2.45200E+00 -1.222055E+00 + 2454 2.45300E+00 -1.221560E+00 + 2455 2.45400E+00 -1.221067E+00 + 2456 2.45500E+00 -1.220573E+00 + 2457 2.45600E+00 -1.220080E+00 + 2458 2.45700E+00 -1.219588E+00 + 2459 2.45800E+00 -1.219095E+00 + 2460 2.45900E+00 -1.218603E+00 + 2461 2.46000E+00 -1.218112E+00 + 2462 2.46100E+00 -1.217621E+00 + 2463 2.46200E+00 -1.217130E+00 + 2464 2.46300E+00 -1.216640E+00 + 2465 2.46400E+00 -1.216150E+00 + 2466 2.46500E+00 -1.215661E+00 + 2467 2.46600E+00 -1.215172E+00 + 2468 2.46700E+00 -1.214683E+00 + 2469 2.46800E+00 -1.214195E+00 + 2470 2.46900E+00 -1.213707E+00 + 2471 2.47000E+00 -1.213219E+00 + 2472 2.47100E+00 -1.212732E+00 + 2473 2.47200E+00 -1.212245E+00 + 2474 2.47300E+00 -1.211759E+00 + 2475 2.47400E+00 -1.211273E+00 + 2476 2.47500E+00 -1.210787E+00 + 2477 2.47600E+00 -1.210302E+00 + 2478 2.47700E+00 -1.209817E+00 + 2479 2.47800E+00 -1.209333E+00 + 2480 2.47900E+00 -1.208849E+00 + 2481 2.48000E+00 -1.208365E+00 + 2482 2.48100E+00 -1.207882E+00 + 2483 2.48200E+00 -1.207399E+00 + 2484 2.48300E+00 -1.206916E+00 + 2485 2.48400E+00 -1.206434E+00 + 2486 2.48500E+00 -1.205952E+00 + 2487 2.48600E+00 -1.205471E+00 + 2488 2.48700E+00 -1.204990E+00 + 2489 2.48800E+00 -1.204509E+00 + 2490 2.48900E+00 -1.204029E+00 + 2491 2.49000E+00 -1.203549E+00 + 2492 2.49100E+00 -1.203069E+00 + 2493 2.49200E+00 -1.202590E+00 + 2494 2.49300E+00 -1.202112E+00 + 2495 2.49400E+00 -1.201633E+00 + 2496 2.49500E+00 -1.201155E+00 + 2497 2.49600E+00 -1.200678E+00 + 2498 2.49700E+00 -1.200200E+00 + 2499 2.49800E+00 -1.199723E+00 + 2500 2.49900E+00 -1.199247E+00 + 2501 2.50000E+00 -1.198771E+00 + 2502 2.50100E+00 -1.198295E+00 + 2503 2.50200E+00 -1.197820E+00 + 2504 2.50300E+00 -1.197345E+00 + 2505 2.50400E+00 -1.196870E+00 + 2506 2.50500E+00 -1.196396E+00 + 2507 2.50600E+00 -1.195922E+00 + 2508 2.50700E+00 -1.195449E+00 + 2509 2.50800E+00 -1.194975E+00 + 2510 2.50900E+00 -1.194503E+00 + 2511 2.51000E+00 -1.194030E+00 + 2512 2.51100E+00 -1.193558E+00 + 2513 2.51200E+00 -1.193086E+00 + 2514 2.51300E+00 -1.192615E+00 + 2515 2.51400E+00 -1.192144E+00 + 2516 2.51500E+00 -1.191674E+00 + 2517 2.51600E+00 -1.191203E+00 + 2518 2.51700E+00 -1.190734E+00 + 2519 2.51800E+00 -1.190264E+00 + 2520 2.51900E+00 -1.189795E+00 + 2521 2.52000E+00 -1.189326E+00 + 2522 2.52100E+00 -1.188858E+00 + 2523 2.52200E+00 -1.188390E+00 + 2524 2.52300E+00 -1.187922E+00 + 2525 2.52400E+00 -1.187455E+00 + 2526 2.52500E+00 -1.186988E+00 + 2527 2.52600E+00 -1.186521E+00 + 2528 2.52700E+00 -1.186055E+00 + 2529 2.52800E+00 -1.185589E+00 + 2530 2.52900E+00 -1.185124E+00 + 2531 2.53000E+00 -1.184659E+00 + 2532 2.53100E+00 -1.184194E+00 + 2533 2.53200E+00 -1.183730E+00 + 2534 2.53300E+00 -1.183265E+00 + 2535 2.53400E+00 -1.182802E+00 + 2536 2.53500E+00 -1.182339E+00 + 2537 2.53600E+00 -1.181876E+00 + 2538 2.53700E+00 -1.181413E+00 + 2539 2.53800E+00 -1.180951E+00 + 2540 2.53900E+00 -1.180489E+00 + 2541 2.54000E+00 -1.180027E+00 + 2542 2.54100E+00 -1.179566E+00 + 2543 2.54200E+00 -1.179105E+00 + 2544 2.54300E+00 -1.178645E+00 + 2545 2.54400E+00 -1.178185E+00 + 2546 2.54500E+00 -1.177725E+00 + 2547 2.54600E+00 -1.177266E+00 + 2548 2.54700E+00 -1.176807E+00 + 2549 2.54800E+00 -1.176348E+00 + 2550 2.54900E+00 -1.175889E+00 + 2551 2.55000E+00 -1.175431E+00 + 2552 2.55100E+00 -1.174974E+00 + 2553 2.55200E+00 -1.174517E+00 + 2554 2.55300E+00 -1.174060E+00 + 2555 2.55400E+00 -1.173603E+00 + 2556 2.55500E+00 -1.173147E+00 + 2557 2.55600E+00 -1.172691E+00 + 2558 2.55700E+00 -1.172235E+00 + 2559 2.55800E+00 -1.171780E+00 + 2560 2.55900E+00 -1.171325E+00 + 2561 2.56000E+00 -1.170871E+00 + 2562 2.56100E+00 -1.170417E+00 + 2563 2.56200E+00 -1.169963E+00 + 2564 2.56300E+00 -1.169509E+00 + 2565 2.56400E+00 -1.169056E+00 + 2566 2.56500E+00 -1.168604E+00 + 2567 2.56600E+00 -1.168151E+00 + 2568 2.56700E+00 -1.167699E+00 + 2569 2.56800E+00 -1.167248E+00 + 2570 2.56900E+00 -1.166796E+00 + 2571 2.57000E+00 -1.166345E+00 + 2572 2.57100E+00 -1.165894E+00 + 2573 2.57200E+00 -1.165444E+00 + 2574 2.57300E+00 -1.164994E+00 + 2575 2.57400E+00 -1.164544E+00 + 2576 2.57500E+00 -1.164095E+00 + 2577 2.57600E+00 -1.163646E+00 + 2578 2.57700E+00 -1.163197E+00 + 2579 2.57800E+00 -1.162749E+00 + 2580 2.57900E+00 -1.162301E+00 + 2581 2.58000E+00 -1.161854E+00 + 2582 2.58100E+00 -1.161406E+00 + 2583 2.58200E+00 -1.160959E+00 + 2584 2.58300E+00 -1.160513E+00 + 2585 2.58400E+00 -1.160066E+00 + 2586 2.58500E+00 -1.159621E+00 + 2587 2.58600E+00 -1.159175E+00 + 2588 2.58700E+00 -1.158730E+00 + 2589 2.58800E+00 -1.158285E+00 + 2590 2.58900E+00 -1.157840E+00 + 2591 2.59000E+00 -1.157396E+00 + 2592 2.59100E+00 -1.156952E+00 + 2593 2.59200E+00 -1.156509E+00 + 2594 2.59300E+00 -1.156065E+00 + 2595 2.59400E+00 -1.155622E+00 + 2596 2.59500E+00 -1.155180E+00 + 2597 2.59600E+00 -1.154738E+00 + 2598 2.59700E+00 -1.154296E+00 + 2599 2.59800E+00 -1.153854E+00 + 2600 2.59900E+00 -1.153413E+00 + 2601 2.60000E+00 -1.152972E+00 + 2602 2.60100E+00 -1.152532E+00 + 2603 2.60200E+00 -1.152092E+00 + 2604 2.60300E+00 -1.151652E+00 + 2605 2.60400E+00 -1.151212E+00 + 2606 2.60500E+00 -1.150773E+00 + 2607 2.60600E+00 -1.150334E+00 + 2608 2.60700E+00 -1.149895E+00 + 2609 2.60800E+00 -1.149457E+00 + 2610 2.60900E+00 -1.149019E+00 + 2611 2.61000E+00 -1.148582E+00 + 2612 2.61100E+00 -1.148144E+00 + 2613 2.61200E+00 -1.147707E+00 + 2614 2.61300E+00 -1.147271E+00 + 2615 2.61400E+00 -1.146835E+00 + 2616 2.61500E+00 -1.146399E+00 + 2617 2.61600E+00 -1.145963E+00 + 2618 2.61700E+00 -1.145528E+00 + 2619 2.61800E+00 -1.145093E+00 + 2620 2.61900E+00 -1.144658E+00 + 2621 2.62000E+00 -1.144224E+00 + 2622 2.62100E+00 -1.143790E+00 + 2623 2.62200E+00 -1.143356E+00 + 2624 2.62300E+00 -1.142923E+00 + 2625 2.62400E+00 -1.142490E+00 + 2626 2.62500E+00 -1.142057E+00 + 2627 2.62600E+00 -1.141625E+00 + 2628 2.62700E+00 -1.141193E+00 + 2629 2.62800E+00 -1.140761E+00 + 2630 2.62900E+00 -1.140330E+00 + 2631 2.63000E+00 -1.139899E+00 + 2632 2.63100E+00 -1.139468E+00 + 2633 2.63200E+00 -1.139037E+00 + 2634 2.63300E+00 -1.138607E+00 + 2635 2.63400E+00 -1.138178E+00 + 2636 2.63500E+00 -1.137748E+00 + 2637 2.63600E+00 -1.137319E+00 + 2638 2.63700E+00 -1.136890E+00 + 2639 2.63800E+00 -1.136462E+00 + 2640 2.63900E+00 -1.136033E+00 + 2641 2.64000E+00 -1.135605E+00 + 2642 2.64100E+00 -1.135178E+00 + 2643 2.64200E+00 -1.134751E+00 + 2644 2.64300E+00 -1.134324E+00 + 2645 2.64400E+00 -1.133897E+00 + 2646 2.64500E+00 -1.133471E+00 + 2647 2.64600E+00 -1.133045E+00 + 2648 2.64700E+00 -1.132619E+00 + 2649 2.64800E+00 -1.132194E+00 + 2650 2.64900E+00 -1.131769E+00 + 2651 2.65000E+00 -1.131344E+00 + 2652 2.65100E+00 -1.130919E+00 + 2653 2.65200E+00 -1.130495E+00 + 2654 2.65300E+00 -1.130072E+00 + 2655 2.65400E+00 -1.129648E+00 + 2656 2.65500E+00 -1.129225E+00 + 2657 2.65600E+00 -1.128802E+00 + 2658 2.65700E+00 -1.128380E+00 + 2659 2.65800E+00 -1.127957E+00 + 2660 2.65900E+00 -1.127536E+00 + 2661 2.66000E+00 -1.127114E+00 + 2662 2.66100E+00 -1.126693E+00 + 2663 2.66200E+00 -1.126272E+00 + 2664 2.66300E+00 -1.125851E+00 + 2665 2.66400E+00 -1.125431E+00 + 2666 2.66500E+00 -1.125011E+00 + 2667 2.66600E+00 -1.124591E+00 + 2668 2.66700E+00 -1.124172E+00 + 2669 2.66800E+00 -1.123753E+00 + 2670 2.66900E+00 -1.123334E+00 + 2671 2.67000E+00 -1.122915E+00 + 2672 2.67100E+00 -1.122497E+00 + 2673 2.67200E+00 -1.122079E+00 + 2674 2.67300E+00 -1.121661E+00 + 2675 2.67400E+00 -1.121244E+00 + 2676 2.67500E+00 -1.120827E+00 + 2677 2.67600E+00 -1.120411E+00 + 2678 2.67700E+00 -1.119994E+00 + 2679 2.67800E+00 -1.119578E+00 + 2680 2.67900E+00 -1.119162E+00 + 2681 2.68000E+00 -1.118747E+00 + 2682 2.68100E+00 -1.118332E+00 + 2683 2.68200E+00 -1.117917E+00 + 2684 2.68300E+00 -1.117502E+00 + 2685 2.68400E+00 -1.117088E+00 + 2686 2.68500E+00 -1.116674E+00 + 2687 2.68600E+00 -1.116261E+00 + 2688 2.68700E+00 -1.115847E+00 + 2689 2.68800E+00 -1.115434E+00 + 2690 2.68900E+00 -1.115022E+00 + 2691 2.69000E+00 -1.114609E+00 + 2692 2.69100E+00 -1.114197E+00 + 2693 2.69200E+00 -1.113785E+00 + 2694 2.69300E+00 -1.113374E+00 + 2695 2.69400E+00 -1.112963E+00 + 2696 2.69500E+00 -1.112552E+00 + 2697 2.69600E+00 -1.112141E+00 + 2698 2.69700E+00 -1.111731E+00 + 2699 2.69800E+00 -1.111321E+00 + 2700 2.69900E+00 -1.110911E+00 + 2701 2.70000E+00 -1.110502E+00 + 2702 2.70100E+00 -1.110093E+00 + 2703 2.70200E+00 -1.109684E+00 + 2704 2.70300E+00 -1.109275E+00 + 2705 2.70400E+00 -1.108867E+00 + 2706 2.70500E+00 -1.108459E+00 + 2707 2.70600E+00 -1.108051E+00 + 2708 2.70700E+00 -1.107644E+00 + 2709 2.70800E+00 -1.107237E+00 + 2710 2.70900E+00 -1.106830E+00 + 2711 2.71000E+00 -1.106424E+00 + 2712 2.71100E+00 -1.106017E+00 + 2713 2.71200E+00 -1.105612E+00 + 2714 2.71300E+00 -1.105206E+00 + 2715 2.71400E+00 -1.104801E+00 + 2716 2.71500E+00 -1.104396E+00 + 2717 2.71600E+00 -1.103991E+00 + 2718 2.71700E+00 -1.103587E+00 + 2719 2.71800E+00 -1.103182E+00 + 2720 2.71900E+00 -1.102779E+00 + 2721 2.72000E+00 -1.102375E+00 + 2722 2.72100E+00 -1.101972E+00 + 2723 2.72200E+00 -1.101569E+00 + 2724 2.72300E+00 -1.101166E+00 + 2725 2.72400E+00 -1.100764E+00 + 2726 2.72500E+00 -1.100362E+00 + 2727 2.72600E+00 -1.099960E+00 + 2728 2.72700E+00 -1.099559E+00 + 2729 2.72800E+00 -1.099157E+00 + 2730 2.72900E+00 -1.098757E+00 + 2731 2.73000E+00 -1.098356E+00 + 2732 2.73100E+00 -1.097956E+00 + 2733 2.73200E+00 -1.097556E+00 + 2734 2.73300E+00 -1.097156E+00 + 2735 2.73400E+00 -1.096756E+00 + 2736 2.73500E+00 -1.096357E+00 + 2737 2.73600E+00 -1.095958E+00 + 2738 2.73700E+00 -1.095560E+00 + 2739 2.73800E+00 -1.095161E+00 + 2740 2.73900E+00 -1.094763E+00 + 2741 2.74000E+00 -1.094365E+00 + 2742 2.74100E+00 -1.093968E+00 + 2743 2.74200E+00 -1.093571E+00 + 2744 2.74300E+00 -1.093174E+00 + 2745 2.74400E+00 -1.092777E+00 + 2746 2.74500E+00 -1.092381E+00 + 2747 2.74600E+00 -1.091985E+00 + 2748 2.74700E+00 -1.091589E+00 + 2749 2.74800E+00 -1.091193E+00 + 2750 2.74900E+00 -1.090798E+00 + 2751 2.75000E+00 -1.090403E+00 + 2752 2.75100E+00 -1.090009E+00 + 2753 2.75200E+00 -1.089614E+00 + 2754 2.75300E+00 -1.089220E+00 + 2755 2.75400E+00 -1.088826E+00 + 2756 2.75500E+00 -1.088433E+00 + 2757 2.75600E+00 -1.088040E+00 + 2758 2.75700E+00 -1.087647E+00 + 2759 2.75800E+00 -1.087254E+00 + 2760 2.75900E+00 -1.086862E+00 + 2761 2.76000E+00 -1.086470E+00 + 2762 2.76100E+00 -1.086078E+00 + 2763 2.76200E+00 -1.085686E+00 + 2764 2.76300E+00 -1.085295E+00 + 2765 2.76400E+00 -1.084904E+00 + 2766 2.76500E+00 -1.084513E+00 + 2767 2.76600E+00 -1.084123E+00 + 2768 2.76700E+00 -1.083733E+00 + 2769 2.76800E+00 -1.083343E+00 + 2770 2.76900E+00 -1.082953E+00 + 2771 2.77000E+00 -1.082564E+00 + 2772 2.77100E+00 -1.082175E+00 + 2773 2.77200E+00 -1.081786E+00 + 2774 2.77300E+00 -1.081397E+00 + 2775 2.77400E+00 -1.081009E+00 + 2776 2.77500E+00 -1.080621E+00 + 2777 2.77600E+00 -1.080233E+00 + 2778 2.77700E+00 -1.079846E+00 + 2779 2.77800E+00 -1.079459E+00 + 2780 2.77900E+00 -1.079072E+00 + 2781 2.78000E+00 -1.078685E+00 + 2782 2.78100E+00 -1.078299E+00 + 2783 2.78200E+00 -1.077913E+00 + 2784 2.78300E+00 -1.077527E+00 + 2785 2.78400E+00 -1.077142E+00 + 2786 2.78500E+00 -1.076756E+00 + 2787 2.78600E+00 -1.076372E+00 + 2788 2.78700E+00 -1.075987E+00 + 2789 2.78800E+00 -1.075602E+00 + 2790 2.78900E+00 -1.075218E+00 + 2791 2.79000E+00 -1.074834E+00 + 2792 2.79100E+00 -1.074451E+00 + 2793 2.79200E+00 -1.074068E+00 + 2794 2.79300E+00 -1.073685E+00 + 2795 2.79400E+00 -1.073302E+00 + 2796 2.79500E+00 -1.072919E+00 + 2797 2.79600E+00 -1.072537E+00 + 2798 2.79700E+00 -1.072155E+00 + 2799 2.79800E+00 -1.071773E+00 + 2800 2.79900E+00 -1.071392E+00 + 2801 2.80000E+00 -1.071011E+00 + 2802 2.80100E+00 -1.070630E+00 + 2803 2.80200E+00 -1.070249E+00 + 2804 2.80300E+00 -1.069869E+00 + 2805 2.80400E+00 -1.069489E+00 + 2806 2.80500E+00 -1.069109E+00 + 2807 2.80600E+00 -1.068729E+00 + 2808 2.80700E+00 -1.068350E+00 + 2809 2.80800E+00 -1.067971E+00 + 2810 2.80900E+00 -1.067592E+00 + 2811 2.81000E+00 -1.067214E+00 + 2812 2.81100E+00 -1.066835E+00 + 2813 2.81200E+00 -1.066457E+00 + 2814 2.81300E+00 -1.066080E+00 + 2815 2.81400E+00 -1.065702E+00 + 2816 2.81500E+00 -1.065325E+00 + 2817 2.81600E+00 -1.064948E+00 + 2818 2.81700E+00 -1.064571E+00 + 2819 2.81800E+00 -1.064195E+00 + 2820 2.81900E+00 -1.063819E+00 + 2821 2.82000E+00 -1.063443E+00 + 2822 2.82100E+00 -1.063067E+00 + 2823 2.82200E+00 -1.062692E+00 + 2824 2.82300E+00 -1.062317E+00 + 2825 2.82400E+00 -1.061942E+00 + 2826 2.82500E+00 -1.061568E+00 + 2827 2.82600E+00 -1.061193E+00 + 2828 2.82700E+00 -1.060819E+00 + 2829 2.82800E+00 -1.060446E+00 + 2830 2.82900E+00 -1.060072E+00 + 2831 2.83000E+00 -1.059699E+00 + 2832 2.83100E+00 -1.059326E+00 + 2833 2.83200E+00 -1.058953E+00 + 2834 2.83300E+00 -1.058581E+00 + 2835 2.83400E+00 -1.058208E+00 + 2836 2.83500E+00 -1.057836E+00 + 2837 2.83600E+00 -1.057465E+00 + 2838 2.83700E+00 -1.057093E+00 + 2839 2.83800E+00 -1.056722E+00 + 2840 2.83900E+00 -1.056351E+00 + 2841 2.84000E+00 -1.055981E+00 + 2842 2.84100E+00 -1.055610E+00 + 2843 2.84200E+00 -1.055240E+00 + 2844 2.84300E+00 -1.054870E+00 + 2845 2.84400E+00 -1.054500E+00 + 2846 2.84500E+00 -1.054131E+00 + 2847 2.84600E+00 -1.053762E+00 + 2848 2.84700E+00 -1.053393E+00 + 2849 2.84800E+00 -1.053024E+00 + 2850 2.84900E+00 -1.052656E+00 + 2851 2.85000E+00 -1.052288E+00 + 2852 2.85100E+00 -1.051920E+00 + 2853 2.85200E+00 -1.051552E+00 + 2854 2.85300E+00 -1.051185E+00 + 2855 2.85400E+00 -1.050818E+00 + 2856 2.85500E+00 -1.050451E+00 + 2857 2.85600E+00 -1.050084E+00 + 2858 2.85700E+00 -1.049718E+00 + 2859 2.85800E+00 -1.049352E+00 + 2860 2.85900E+00 -1.048986E+00 + 2861 2.86000E+00 -1.048621E+00 + 2862 2.86100E+00 -1.048255E+00 + 2863 2.86200E+00 -1.047890E+00 + 2864 2.86300E+00 -1.047525E+00 + 2865 2.86400E+00 -1.047161E+00 + 2866 2.86500E+00 -1.046797E+00 + 2867 2.86600E+00 -1.046432E+00 + 2868 2.86700E+00 -1.046069E+00 + 2869 2.86800E+00 -1.045705E+00 + 2870 2.86900E+00 -1.045342E+00 + 2871 2.87000E+00 -1.044979E+00 + 2872 2.87100E+00 -1.044616E+00 + 2873 2.87200E+00 -1.044253E+00 + 2874 2.87300E+00 -1.043891E+00 + 2875 2.87400E+00 -1.043529E+00 + 2876 2.87500E+00 -1.043167E+00 + 2877 2.87600E+00 -1.042805E+00 + 2878 2.87700E+00 -1.042444E+00 + 2879 2.87800E+00 -1.042083E+00 + 2880 2.87900E+00 -1.041722E+00 + 2881 2.88000E+00 -1.041362E+00 + 2882 2.88100E+00 -1.041001E+00 + 2883 2.88200E+00 -1.040641E+00 + 2884 2.88300E+00 -1.040281E+00 + 2885 2.88400E+00 -1.039922E+00 + 2886 2.88500E+00 -1.039562E+00 + 2887 2.88600E+00 -1.039203E+00 + 2888 2.88700E+00 -1.038844E+00 + 2889 2.88800E+00 -1.038486E+00 + 2890 2.88900E+00 -1.038127E+00 + 2891 2.89000E+00 -1.037769E+00 + 2892 2.89100E+00 -1.037411E+00 + 2893 2.89200E+00 -1.037054E+00 + 2894 2.89300E+00 -1.036696E+00 + 2895 2.89400E+00 -1.036339E+00 + 2896 2.89500E+00 -1.035982E+00 + 2897 2.89600E+00 -1.035625E+00 + 2898 2.89700E+00 -1.035269E+00 + 2899 2.89800E+00 -1.034913E+00 + 2900 2.89900E+00 -1.034557E+00 + 2901 2.90000E+00 -1.034201E+00 + 2902 2.90100E+00 -1.033846E+00 + 2903 2.90200E+00 -1.033491E+00 + 2904 2.90300E+00 -1.033136E+00 + 2905 2.90400E+00 -1.032781E+00 + 2906 2.90500E+00 -1.032426E+00 + 2907 2.90600E+00 -1.032072E+00 + 2908 2.90700E+00 -1.031718E+00 + 2909 2.90800E+00 -1.031364E+00 + 2910 2.90900E+00 -1.031011E+00 + 2911 2.91000E+00 -1.030658E+00 + 2912 2.91100E+00 -1.030305E+00 + 2913 2.91200E+00 -1.029952E+00 + 2914 2.91300E+00 -1.029599E+00 + 2915 2.91400E+00 -1.029247E+00 + 2916 2.91500E+00 -1.028895E+00 + 2917 2.91600E+00 -1.028543E+00 + 2918 2.91700E+00 -1.028191E+00 + 2919 2.91800E+00 -1.027840E+00 + 2920 2.91900E+00 -1.027489E+00 + 2921 2.92000E+00 -1.027138E+00 + 2922 2.92100E+00 -1.026787E+00 + 2923 2.92200E+00 -1.026437E+00 + 2924 2.92300E+00 -1.026086E+00 + 2925 2.92400E+00 -1.025736E+00 + 2926 2.92500E+00 -1.025387E+00 + 2927 2.92600E+00 -1.025037E+00 + 2928 2.92700E+00 -1.024688E+00 + 2929 2.92800E+00 -1.024339E+00 + 2930 2.92900E+00 -1.023990E+00 + 2931 2.93000E+00 -1.023642E+00 + 2932 2.93100E+00 -1.023293E+00 + 2933 2.93200E+00 -1.022945E+00 + 2934 2.93300E+00 -1.022597E+00 + 2935 2.93400E+00 -1.022250E+00 + 2936 2.93500E+00 -1.021902E+00 + 2937 2.93600E+00 -1.021555E+00 + 2938 2.93700E+00 -1.021208E+00 + 2939 2.93800E+00 -1.020862E+00 + 2940 2.93900E+00 -1.020515E+00 + 2941 2.94000E+00 -1.020169E+00 + 2942 2.94100E+00 -1.019823E+00 + 2943 2.94200E+00 -1.019477E+00 + 2944 2.94300E+00 -1.019132E+00 + 2945 2.94400E+00 -1.018787E+00 + 2946 2.94500E+00 -1.018442E+00 + 2947 2.94600E+00 -1.018097E+00 + 2948 2.94700E+00 -1.017752E+00 + 2949 2.94800E+00 -1.017408E+00 + 2950 2.94900E+00 -1.017064E+00 + 2951 2.95000E+00 -1.016720E+00 + 2952 2.95100E+00 -1.016376E+00 + 2953 2.95200E+00 -1.016033E+00 + 2954 2.95300E+00 -1.015689E+00 + 2955 2.95400E+00 -1.015346E+00 + 2956 2.95500E+00 -1.015004E+00 + 2957 2.95600E+00 -1.014661E+00 + 2958 2.95700E+00 -1.014319E+00 + 2959 2.95800E+00 -1.013977E+00 + 2960 2.95900E+00 -1.013635E+00 + 2961 2.96000E+00 -1.013293E+00 + 2962 2.96100E+00 -1.012952E+00 + 2963 2.96200E+00 -1.012611E+00 + 2964 2.96300E+00 -1.012270E+00 + 2965 2.96400E+00 -1.011929E+00 + 2966 2.96500E+00 -1.011589E+00 + 2967 2.96600E+00 -1.011248E+00 + 2968 2.96700E+00 -1.010908E+00 + 2969 2.96800E+00 -1.010569E+00 + 2970 2.96900E+00 -1.010229E+00 + 2971 2.97000E+00 -1.009890E+00 + 2972 2.97100E+00 -1.009551E+00 + 2973 2.97200E+00 -1.009212E+00 + 2974 2.97300E+00 -1.008873E+00 + 2975 2.97400E+00 -1.008535E+00 + 2976 2.97500E+00 -1.008197E+00 + 2977 2.97600E+00 -1.007859E+00 + 2978 2.97700E+00 -1.007521E+00 + 2979 2.97800E+00 -1.007183E+00 + 2980 2.97900E+00 -1.006846E+00 + 2981 2.98000E+00 -1.006509E+00 + 2982 2.98100E+00 -1.006172E+00 + 2983 2.98200E+00 -1.005835E+00 + 2984 2.98300E+00 -1.005499E+00 + 2985 2.98400E+00 -1.005163E+00 + 2986 2.98500E+00 -1.004827E+00 + 2987 2.98600E+00 -1.004491E+00 + 2988 2.98700E+00 -1.004156E+00 + 2989 2.98800E+00 -1.003820E+00 + 2990 2.98900E+00 -1.003485E+00 + 2991 2.99000E+00 -1.003150E+00 + 2992 2.99100E+00 -1.002816E+00 + 2993 2.99200E+00 -1.002481E+00 + 2994 2.99300E+00 -1.002147E+00 + 2995 2.99400E+00 -1.001813E+00 + 2996 2.99500E+00 -1.001479E+00 + 2997 2.99600E+00 -1.001146E+00 + 2998 2.99700E+00 -1.000812E+00 + 2999 2.99800E+00 -1.000479E+00 + 3000 2.99900E+00 -1.000146E+00 + 3001 3.00000E+00 -9.998138E-01 + 3002 3.00100E+00 -9.994814E-01 + 3003 3.00200E+00 -9.991491E-01 + 3004 3.00300E+00 -9.988172E-01 + 3005 3.00400E+00 -9.984854E-01 + 3006 3.00500E+00 -9.981539E-01 + 3007 3.00600E+00 -9.978225E-01 + 3008 3.00700E+00 -9.974914E-01 + 3009 3.00800E+00 -9.971606E-01 + 3010 3.00900E+00 -9.968299E-01 + 3011 3.01000E+00 -9.964994E-01 + 3012 3.01100E+00 -9.961692E-01 + 3013 3.01200E+00 -9.958392E-01 + 3014 3.01300E+00 -9.955093E-01 + 3015 3.01400E+00 -9.951797E-01 + 3016 3.01500E+00 -9.948503E-01 + 3017 3.01600E+00 -9.945212E-01 + 3018 3.01700E+00 -9.941922E-01 + 3019 3.01800E+00 -9.938635E-01 + 3020 3.01900E+00 -9.935349E-01 + 3021 3.02000E+00 -9.932066E-01 + 3022 3.02100E+00 -9.928785E-01 + 3023 3.02200E+00 -9.925506E-01 + 3024 3.02300E+00 -9.922229E-01 + 3025 3.02400E+00 -9.918955E-01 + 3026 3.02500E+00 -9.915682E-01 + 3027 3.02600E+00 -9.912412E-01 + 3028 3.02700E+00 -9.909144E-01 + 3029 3.02800E+00 -9.905878E-01 + 3030 3.02900E+00 -9.902614E-01 + 3031 3.03000E+00 -9.899352E-01 + 3032 3.03100E+00 -9.896092E-01 + 3033 3.03200E+00 -9.892835E-01 + 3034 3.03300E+00 -9.889580E-01 + 3035 3.03400E+00 -9.886326E-01 + 3036 3.03500E+00 -9.883075E-01 + 3037 3.03600E+00 -9.879826E-01 + 3038 3.03700E+00 -9.876580E-01 + 3039 3.03800E+00 -9.873335E-01 + 3040 3.03900E+00 -9.870093E-01 + 3041 3.04000E+00 -9.866852E-01 + 3042 3.04100E+00 -9.863614E-01 + 3043 3.04200E+00 -9.860378E-01 + 3044 3.04300E+00 -9.857144E-01 + 3045 3.04400E+00 -9.853912E-01 + 3046 3.04500E+00 -9.850682E-01 + 3047 3.04600E+00 -9.847455E-01 + 3048 3.04700E+00 -9.844229E-01 + 3049 3.04800E+00 -9.841006E-01 + 3050 3.04900E+00 -9.837784E-01 + 3051 3.05000E+00 -9.834565E-01 + 3052 3.05100E+00 -9.831347E-01 + 3053 3.05200E+00 -9.828132E-01 + 3054 3.05300E+00 -9.824919E-01 + 3055 3.05400E+00 -9.821708E-01 + 3056 3.05500E+00 -9.818499E-01 + 3057 3.05600E+00 -9.815292E-01 + 3058 3.05700E+00 -9.812087E-01 + 3059 3.05800E+00 -9.808884E-01 + 3060 3.05900E+00 -9.805683E-01 + 3061 3.06000E+00 -9.802484E-01 + 3062 3.06100E+00 -9.799288E-01 + 3063 3.06200E+00 -9.796093E-01 + 3064 3.06300E+00 -9.792900E-01 + 3065 3.06400E+00 -9.789710E-01 + 3066 3.06500E+00 -9.786521E-01 + 3067 3.06600E+00 -9.783335E-01 + 3068 3.06700E+00 -9.780151E-01 + 3069 3.06800E+00 -9.776969E-01 + 3070 3.06900E+00 -9.773788E-01 + 3071 3.07000E+00 -9.770610E-01 + 3072 3.07100E+00 -9.767434E-01 + 3073 3.07200E+00 -9.764260E-01 + 3074 3.07300E+00 -9.761088E-01 + 3075 3.07400E+00 -9.757919E-01 + 3076 3.07500E+00 -9.754751E-01 + 3077 3.07600E+00 -9.751585E-01 + 3078 3.07700E+00 -9.748421E-01 + 3079 3.07800E+00 -9.745260E-01 + 3080 3.07900E+00 -9.742100E-01 + 3081 3.08000E+00 -9.738943E-01 + 3082 3.08100E+00 -9.735788E-01 + 3083 3.08200E+00 -9.732634E-01 + 3084 3.08300E+00 -9.729483E-01 + 3085 3.08400E+00 -9.726334E-01 + 3086 3.08500E+00 -9.723186E-01 + 3087 3.08600E+00 -9.720041E-01 + 3088 3.08700E+00 -9.716897E-01 + 3089 3.08800E+00 -9.713756E-01 + 3090 3.08900E+00 -9.710617E-01 + 3091 3.09000E+00 -9.707479E-01 + 3092 3.09100E+00 -9.704344E-01 + 3093 3.09200E+00 -9.701210E-01 + 3094 3.09300E+00 -9.698079E-01 + 3095 3.09400E+00 -9.694950E-01 + 3096 3.09500E+00 -9.691822E-01 + 3097 3.09600E+00 -9.688697E-01 + 3098 3.09700E+00 -9.685573E-01 + 3099 3.09800E+00 -9.682452E-01 + 3100 3.09900E+00 -9.679332E-01 + 3101 3.10000E+00 -9.676215E-01 + 3102 3.10100E+00 -9.673099E-01 + 3103 3.10200E+00 -9.669986E-01 + 3104 3.10300E+00 -9.666874E-01 + 3105 3.10400E+00 -9.663765E-01 + 3106 3.10500E+00 -9.660657E-01 + 3107 3.10600E+00 -9.657552E-01 + 3108 3.10700E+00 -9.654448E-01 + 3109 3.10800E+00 -9.651347E-01 + 3110 3.10900E+00 -9.648247E-01 + 3111 3.11000E+00 -9.645150E-01 + 3112 3.11100E+00 -9.642054E-01 + 3113 3.11200E+00 -9.638961E-01 + 3114 3.11300E+00 -9.635869E-01 + 3115 3.11400E+00 -9.632780E-01 + 3116 3.11500E+00 -9.629692E-01 + 3117 3.11600E+00 -9.626606E-01 + 3118 3.11700E+00 -9.623523E-01 + 3119 3.11800E+00 -9.620441E-01 + 3120 3.11900E+00 -9.617362E-01 + 3121 3.12000E+00 -9.614284E-01 + 3122 3.12100E+00 -9.611208E-01 + 3123 3.12200E+00 -9.608135E-01 + 3124 3.12300E+00 -9.605063E-01 + 3125 3.12400E+00 -9.601993E-01 + 3126 3.12500E+00 -9.598925E-01 + 3127 3.12600E+00 -9.595859E-01 + 3128 3.12700E+00 -9.592794E-01 + 3129 3.12800E+00 -9.589732E-01 + 3130 3.12900E+00 -9.586672E-01 + 3131 3.13000E+00 -9.583613E-01 + 3132 3.13100E+00 -9.580557E-01 + 3133 3.13200E+00 -9.577502E-01 + 3134 3.13300E+00 -9.574450E-01 + 3135 3.13400E+00 -9.571399E-01 + 3136 3.13500E+00 -9.568350E-01 + 3137 3.13600E+00 -9.565303E-01 + 3138 3.13700E+00 -9.562258E-01 + 3139 3.13800E+00 -9.559215E-01 + 3140 3.13900E+00 -9.556174E-01 + 3141 3.14000E+00 -9.553135E-01 + 3142 3.14100E+00 -9.550098E-01 + 3143 3.14200E+00 -9.547062E-01 + 3144 3.14300E+00 -9.544029E-01 + 3145 3.14400E+00 -9.540997E-01 + 3146 3.14500E+00 -9.537968E-01 + 3147 3.14600E+00 -9.534940E-01 + 3148 3.14700E+00 -9.531914E-01 + 3149 3.14800E+00 -9.528891E-01 + 3150 3.14900E+00 -9.525869E-01 + 3151 3.15000E+00 -9.522849E-01 + 3152 3.15100E+00 -9.519831E-01 + 3153 3.15200E+00 -9.516815E-01 + 3154 3.15300E+00 -9.513800E-01 + 3155 3.15400E+00 -9.510788E-01 + 3156 3.15500E+00 -9.507778E-01 + 3157 3.15600E+00 -9.504769E-01 + 3158 3.15700E+00 -9.501763E-01 + 3159 3.15800E+00 -9.498758E-01 + 3160 3.15900E+00 -9.495756E-01 + 3161 3.16000E+00 -9.492755E-01 + 3162 3.16100E+00 -9.489756E-01 + 3163 3.16200E+00 -9.486759E-01 + 3164 3.16300E+00 -9.483763E-01 + 3165 3.16400E+00 -9.480770E-01 + 3166 3.16500E+00 -9.477778E-01 + 3167 3.16600E+00 -9.474788E-01 + 3168 3.16700E+00 -9.471801E-01 + 3169 3.16800E+00 -9.468815E-01 + 3170 3.16900E+00 -9.465830E-01 + 3171 3.17000E+00 -9.462848E-01 + 3172 3.17100E+00 -9.459868E-01 + 3173 3.17200E+00 -9.456889E-01 + 3174 3.17300E+00 -9.453912E-01 + 3175 3.17400E+00 -9.450937E-01 + 3176 3.17500E+00 -9.447964E-01 + 3177 3.17600E+00 -9.444993E-01 + 3178 3.17700E+00 -9.442024E-01 + 3179 3.17800E+00 -9.439056E-01 + 3180 3.17900E+00 -9.436091E-01 + 3181 3.18000E+00 -9.433127E-01 + 3182 3.18100E+00 -9.430165E-01 + 3183 3.18200E+00 -9.427205E-01 + 3184 3.18300E+00 -9.424247E-01 + 3185 3.18400E+00 -9.421290E-01 + 3186 3.18500E+00 -9.418336E-01 + 3187 3.18600E+00 -9.415383E-01 + 3188 3.18700E+00 -9.412433E-01 + 3189 3.18800E+00 -9.409484E-01 + 3190 3.18900E+00 -9.406537E-01 + 3191 3.19000E+00 -9.403591E-01 + 3192 3.19100E+00 -9.400648E-01 + 3193 3.19200E+00 -9.397707E-01 + 3194 3.19300E+00 -9.394767E-01 + 3195 3.19400E+00 -9.391829E-01 + 3196 3.19500E+00 -9.388893E-01 + 3197 3.19600E+00 -9.385959E-01 + 3198 3.19700E+00 -9.383027E-01 + 3199 3.19800E+00 -9.380097E-01 + 3200 3.19900E+00 -9.377168E-01 + 3201 3.20000E+00 -9.374241E-01 + 3202 3.20100E+00 -9.371316E-01 + 3203 3.20200E+00 -9.368393E-01 + 3204 3.20300E+00 -9.365471E-01 + 3205 3.20400E+00 -9.362551E-01 + 3206 3.20500E+00 -9.359633E-01 + 3207 3.20600E+00 -9.356717E-01 + 3208 3.20700E+00 -9.353803E-01 + 3209 3.20800E+00 -9.350890E-01 + 3210 3.20900E+00 -9.347980E-01 + 3211 3.21000E+00 -9.345071E-01 + 3212 3.21100E+00 -9.342164E-01 + 3213 3.21200E+00 -9.339258E-01 + 3214 3.21300E+00 -9.336355E-01 + 3215 3.21400E+00 -9.333453E-01 + 3216 3.21500E+00 -9.330553E-01 + 3217 3.21600E+00 -9.327654E-01 + 3218 3.21700E+00 -9.324758E-01 + 3219 3.21800E+00 -9.321863E-01 + 3220 3.21900E+00 -9.318970E-01 + 3221 3.22000E+00 -9.316079E-01 + 3222 3.22100E+00 -9.313190E-01 + 3223 3.22200E+00 -9.310303E-01 + 3224 3.22300E+00 -9.307417E-01 + 3225 3.22400E+00 -9.304533E-01 + 3226 3.22500E+00 -9.301651E-01 + 3227 3.22600E+00 -9.298771E-01 + 3228 3.22700E+00 -9.295892E-01 + 3229 3.22800E+00 -9.293015E-01 + 3230 3.22900E+00 -9.290140E-01 + 3231 3.23000E+00 -9.287267E-01 + 3232 3.23100E+00 -9.284396E-01 + 3233 3.23200E+00 -9.281526E-01 + 3234 3.23300E+00 -9.278659E-01 + 3235 3.23400E+00 -9.275793E-01 + 3236 3.23500E+00 -9.272928E-01 + 3237 3.23600E+00 -9.270066E-01 + 3238 3.23700E+00 -9.267205E-01 + 3239 3.23800E+00 -9.264346E-01 + 3240 3.23900E+00 -9.261489E-01 + 3241 3.24000E+00 -9.258633E-01 + 3242 3.24100E+00 -9.255780E-01 + 3243 3.24200E+00 -9.252928E-01 + 3244 3.24300E+00 -9.250077E-01 + 3245 3.24400E+00 -9.247229E-01 + 3246 3.24500E+00 -9.244382E-01 + 3247 3.24600E+00 -9.241537E-01 + 3248 3.24700E+00 -9.238693E-01 + 3249 3.24800E+00 -9.235852E-01 + 3250 3.24900E+00 -9.233012E-01 + 3251 3.25000E+00 -9.230173E-01 + 3252 3.25100E+00 -9.227337E-01 + 3253 3.25200E+00 -9.224502E-01 + 3254 3.25300E+00 -9.221669E-01 + 3255 3.25400E+00 -9.218838E-01 + 3256 3.25500E+00 -9.216008E-01 + 3257 3.25600E+00 -9.213180E-01 + 3258 3.25700E+00 -9.210354E-01 + 3259 3.25800E+00 -9.207529E-01 + 3260 3.25900E+00 -9.204707E-01 + 3261 3.26000E+00 -9.201886E-01 + 3262 3.26100E+00 -9.199067E-01 + 3263 3.26200E+00 -9.196249E-01 + 3264 3.26300E+00 -9.193433E-01 + 3265 3.26400E+00 -9.190619E-01 + 3266 3.26500E+00 -9.187807E-01 + 3267 3.26600E+00 -9.184996E-01 + 3268 3.26700E+00 -9.182187E-01 + 3269 3.26800E+00 -9.179380E-01 + 3270 3.26900E+00 -9.176575E-01 + 3271 3.27000E+00 -9.173771E-01 + 3272 3.27100E+00 -9.170969E-01 + 3273 3.27200E+00 -9.168169E-01 + 3274 3.27300E+00 -9.165370E-01 + 3275 3.27400E+00 -9.162574E-01 + 3276 3.27500E+00 -9.159779E-01 + 3277 3.27600E+00 -9.156985E-01 + 3278 3.27700E+00 -9.154194E-01 + 3279 3.27800E+00 -9.151404E-01 + 3280 3.27900E+00 -9.148615E-01 + 3281 3.28000E+00 -9.145829E-01 + 3282 3.28100E+00 -9.143044E-01 + 3283 3.28200E+00 -9.140260E-01 + 3284 3.28300E+00 -9.137478E-01 + 3285 3.28400E+00 -9.134698E-01 + 3286 3.28500E+00 -9.131920E-01 + 3287 3.28600E+00 -9.129143E-01 + 3288 3.28700E+00 -9.126368E-01 + 3289 3.28800E+00 -9.123595E-01 + 3290 3.28900E+00 -9.120823E-01 + 3291 3.29000E+00 -9.118053E-01 + 3292 3.29100E+00 -9.115285E-01 + 3293 3.29200E+00 -9.112518E-01 + 3294 3.29300E+00 -9.109753E-01 + 3295 3.29400E+00 -9.106990E-01 + 3296 3.29500E+00 -9.104228E-01 + 3297 3.29600E+00 -9.101468E-01 + 3298 3.29700E+00 -9.098710E-01 + 3299 3.29800E+00 -9.095953E-01 + 3300 3.29900E+00 -9.093198E-01 + 3301 3.30000E+00 -9.090445E-01 + 3302 3.30100E+00 -9.087693E-01 + 3303 3.30200E+00 -9.084943E-01 + 3304 3.30300E+00 -9.082194E-01 + 3305 3.30400E+00 -9.079448E-01 + 3306 3.30500E+00 -9.076703E-01 + 3307 3.30600E+00 -9.073959E-01 + 3308 3.30700E+00 -9.071218E-01 + 3309 3.30800E+00 -9.068478E-01 + 3310 3.30900E+00 -9.065739E-01 + 3311 3.31000E+00 -9.063003E-01 + 3312 3.31100E+00 -9.060268E-01 + 3313 3.31200E+00 -9.057534E-01 + 3314 3.31300E+00 -9.054803E-01 + 3315 3.31400E+00 -9.052072E-01 + 3316 3.31500E+00 -9.049344E-01 + 3317 3.31600E+00 -9.046617E-01 + 3318 3.31700E+00 -9.043892E-01 + 3319 3.31800E+00 -9.041169E-01 + 3320 3.31900E+00 -9.038447E-01 + 3321 3.32000E+00 -9.035727E-01 + 3322 3.32100E+00 -9.033008E-01 + 3323 3.32200E+00 -9.030291E-01 + 3324 3.32300E+00 -9.027575E-01 + 3325 3.32400E+00 -9.024862E-01 + 3326 3.32500E+00 -9.022149E-01 + 3327 3.32600E+00 -9.019439E-01 + 3328 3.32700E+00 -9.016730E-01 + 3329 3.32800E+00 -9.014022E-01 + 3330 3.32900E+00 -9.011317E-01 + 3331 3.33000E+00 -9.008612E-01 + 3332 3.33100E+00 -9.005910E-01 + 3333 3.33200E+00 -9.003209E-01 + 3334 3.33300E+00 -9.000509E-01 + 3335 3.33400E+00 -8.997812E-01 + 3336 3.33500E+00 -8.995115E-01 + 3337 3.33600E+00 -8.992421E-01 + 3338 3.33700E+00 -8.989728E-01 + 3339 3.33800E+00 -8.987037E-01 + 3340 3.33900E+00 -8.984347E-01 + 3341 3.34000E+00 -8.981659E-01 + 3342 3.34100E+00 -8.978972E-01 + 3343 3.34200E+00 -8.976287E-01 + 3344 3.34300E+00 -8.973604E-01 + 3345 3.34400E+00 -8.970922E-01 + 3346 3.34500E+00 -8.968242E-01 + 3347 3.34600E+00 -8.965564E-01 + 3348 3.34700E+00 -8.962887E-01 + 3349 3.34800E+00 -8.960212E-01 + 3350 3.34900E+00 -8.957538E-01 + 3351 3.35000E+00 -8.954866E-01 + 3352 3.35100E+00 -8.952195E-01 + 3353 3.35200E+00 -8.949527E-01 + 3354 3.35300E+00 -8.946859E-01 + 3355 3.35400E+00 -8.944194E-01 + 3356 3.35500E+00 -8.941530E-01 + 3357 3.35600E+00 -8.938867E-01 + 3358 3.35700E+00 -8.936207E-01 + 3359 3.35800E+00 -8.933547E-01 + 3360 3.35900E+00 -8.930890E-01 + 3361 3.36000E+00 -8.928233E-01 + 3362 3.36100E+00 -8.925579E-01 + 3363 3.36200E+00 -8.922926E-01 + 3364 3.36300E+00 -8.920274E-01 + 3365 3.36400E+00 -8.917624E-01 + 3366 3.36500E+00 -8.914976E-01 + 3367 3.36600E+00 -8.912329E-01 + 3368 3.36700E+00 -8.909684E-01 + 3369 3.36800E+00 -8.907040E-01 + 3370 3.36900E+00 -8.904398E-01 + 3371 3.37000E+00 -8.901757E-01 + 3372 3.37100E+00 -8.899118E-01 + 3373 3.37200E+00 -8.896480E-01 + 3374 3.37300E+00 -8.893844E-01 + 3375 3.37400E+00 -8.891210E-01 + 3376 3.37500E+00 -8.888577E-01 + 3377 3.37600E+00 -8.885946E-01 + 3378 3.37700E+00 -8.883316E-01 + 3379 3.37800E+00 -8.880687E-01 + 3380 3.37900E+00 -8.878061E-01 + 3381 3.38000E+00 -8.875436E-01 + 3382 3.38100E+00 -8.872812E-01 + 3383 3.38200E+00 -8.870190E-01 + 3384 3.38300E+00 -8.867569E-01 + 3385 3.38400E+00 -8.864950E-01 + 3386 3.38500E+00 -8.862333E-01 + 3387 3.38600E+00 -8.859717E-01 + 3388 3.38700E+00 -8.857103E-01 + 3389 3.38800E+00 -8.854490E-01 + 3390 3.38900E+00 -8.851879E-01 + 3391 3.39000E+00 -8.849269E-01 + 3392 3.39100E+00 -8.846661E-01 + 3393 3.39200E+00 -8.844055E-01 + 3394 3.39300E+00 -8.841450E-01 + 3395 3.39400E+00 -8.838846E-01 + 3396 3.39500E+00 -8.836244E-01 + 3397 3.39600E+00 -8.833644E-01 + 3398 3.39700E+00 -8.831045E-01 + 3399 3.39800E+00 -8.828448E-01 + 3400 3.39900E+00 -8.825852E-01 + 3401 3.40000E+00 -8.823258E-01 + 3402 3.40100E+00 -8.820665E-01 + 3403 3.40200E+00 -8.818074E-01 + 3404 3.40300E+00 -8.815484E-01 + 3405 3.40400E+00 -8.812896E-01 + 3406 3.40500E+00 -8.810309E-01 + 3407 3.40600E+00 -8.807724E-01 + 3408 3.40700E+00 -8.805140E-01 + 3409 3.40800E+00 -8.802558E-01 + 3410 3.40900E+00 -8.799977E-01 + 3411 3.41000E+00 -8.797398E-01 + 3412 3.41100E+00 -8.794820E-01 + 3413 3.41200E+00 -8.792244E-01 + 3414 3.41300E+00 -8.789669E-01 + 3415 3.41400E+00 -8.787095E-01 + 3416 3.41500E+00 -8.784524E-01 + 3417 3.41600E+00 -8.781953E-01 + 3418 3.41700E+00 -8.779384E-01 + 3419 3.41800E+00 -8.776817E-01 + 3420 3.41900E+00 -8.774251E-01 + 3421 3.42000E+00 -8.771687E-01 + 3422 3.42100E+00 -8.769124E-01 + 3423 3.42200E+00 -8.766563E-01 + 3424 3.42300E+00 -8.764003E-01 + 3425 3.42400E+00 -8.761445E-01 + 3426 3.42500E+00 -8.758888E-01 + 3427 3.42600E+00 -8.756332E-01 + 3428 3.42700E+00 -8.753778E-01 + 3429 3.42800E+00 -8.751226E-01 + 3430 3.42900E+00 -8.748675E-01 + 3431 3.43000E+00 -8.746126E-01 + 3432 3.43100E+00 -8.743578E-01 + 3433 3.43200E+00 -8.741032E-01 + 3434 3.43300E+00 -8.738487E-01 + 3435 3.43400E+00 -8.735943E-01 + 3436 3.43500E+00 -8.733401E-01 + 3437 3.43600E+00 -8.730861E-01 + 3438 3.43700E+00 -8.728322E-01 + 3439 3.43800E+00 -8.725785E-01 + 3440 3.43900E+00 -8.723249E-01 + 3441 3.44000E+00 -8.720714E-01 + 3442 3.44100E+00 -8.718181E-01 + 3443 3.44200E+00 -8.715650E-01 + 3444 3.44300E+00 -8.713120E-01 + 3445 3.44400E+00 -8.710591E-01 + 3446 3.44500E+00 -8.708064E-01 + 3447 3.44600E+00 -8.705538E-01 + 3448 3.44700E+00 -8.703014E-01 + 3449 3.44800E+00 -8.700491E-01 + 3450 3.44900E+00 -8.697969E-01 + 3451 3.45000E+00 -8.695449E-01 + 3452 3.45100E+00 -8.692931E-01 + 3453 3.45200E+00 -8.690413E-01 + 3454 3.45300E+00 -8.687898E-01 + 3455 3.45400E+00 -8.685384E-01 + 3456 3.45500E+00 -8.682871E-01 + 3457 3.45600E+00 -8.680359E-01 + 3458 3.45700E+00 -8.677849E-01 + 3459 3.45800E+00 -8.675341E-01 + 3460 3.45900E+00 -8.672834E-01 + 3461 3.46000E+00 -8.670328E-01 + 3462 3.46100E+00 -8.667824E-01 + 3463 3.46200E+00 -8.665321E-01 + 3464 3.46300E+00 -8.662820E-01 + 3465 3.46400E+00 -8.660320E-01 + 3466 3.46500E+00 -8.657822E-01 + 3467 3.46600E+00 -8.655325E-01 + 3468 3.46700E+00 -8.652830E-01 + 3469 3.46800E+00 -8.650336E-01 + 3470 3.46900E+00 -8.647843E-01 + 3471 3.47000E+00 -8.645352E-01 + 3472 3.47100E+00 -8.642862E-01 + 3473 3.47200E+00 -8.640374E-01 + 3474 3.47300E+00 -8.637887E-01 + 3475 3.47400E+00 -8.635402E-01 + 3476 3.47500E+00 -8.632918E-01 + 3477 3.47600E+00 -8.630435E-01 + 3478 3.47700E+00 -8.627954E-01 + 3479 3.47800E+00 -8.625474E-01 + 3480 3.47900E+00 -8.622996E-01 + 3481 3.48000E+00 -8.620520E-01 + 3482 3.48100E+00 -8.618044E-01 + 3483 3.48200E+00 -8.615570E-01 + 3484 3.48300E+00 -8.613098E-01 + 3485 3.48400E+00 -8.610627E-01 + 3486 3.48500E+00 -8.608157E-01 + 3487 3.48600E+00 -8.605689E-01 + 3488 3.48700E+00 -8.603222E-01 + 3489 3.48800E+00 -8.600756E-01 + 3490 3.48900E+00 -8.598292E-01 + 3491 3.49000E+00 -8.595830E-01 + 3492 3.49100E+00 -8.593368E-01 + 3493 3.49200E+00 -8.590908E-01 + 3494 3.49300E+00 -8.588450E-01 + 3495 3.49400E+00 -8.585993E-01 + 3496 3.49500E+00 -8.583537E-01 + 3497 3.49600E+00 -8.581082E-01 + 3498 3.49700E+00 -8.578630E-01 + 3499 3.49800E+00 -8.576178E-01 + 3500 3.49900E+00 -8.573728E-01 + 3501 3.50000E+00 -8.571279E-01 + 3502 3.50100E+00 -8.568831E-01 + 3503 3.50200E+00 -8.566385E-01 + 3504 3.50300E+00 -8.563941E-01 + 3505 3.50400E+00 -8.561498E-01 + 3506 3.50500E+00 -8.559056E-01 + 3507 3.50600E+00 -8.556615E-01 + 3508 3.50700E+00 -8.554176E-01 + 3509 3.50800E+00 -8.551738E-01 + 3510 3.50900E+00 -8.549302E-01 + 3511 3.51000E+00 -8.546867E-01 + 3512 3.51100E+00 -8.544434E-01 + 3513 3.51200E+00 -8.542002E-01 + 3514 3.51300E+00 -8.539571E-01 + 3515 3.51400E+00 -8.537142E-01 + 3516 3.51500E+00 -8.534714E-01 + 3517 3.51600E+00 -8.532287E-01 + 3518 3.51700E+00 -8.529862E-01 + 3519 3.51800E+00 -8.527438E-01 + 3520 3.51900E+00 -8.525016E-01 + 3521 3.52000E+00 -8.522595E-01 + 3522 3.52100E+00 -8.520175E-01 + 3523 3.52200E+00 -8.517757E-01 + 3524 3.52300E+00 -8.515340E-01 + 3525 3.52400E+00 -8.512925E-01 + 3526 3.52500E+00 -8.510511E-01 + 3527 3.52600E+00 -8.508098E-01 + 3528 3.52700E+00 -8.505687E-01 + 3529 3.52800E+00 -8.503277E-01 + 3530 3.52900E+00 -8.500868E-01 + 3531 3.53000E+00 -8.498461E-01 + 3532 3.53100E+00 -8.496055E-01 + 3533 3.53200E+00 -8.493650E-01 + 3534 3.53300E+00 -8.491247E-01 + 3535 3.53400E+00 -8.488845E-01 + 3536 3.53500E+00 -8.486444E-01 + 3537 3.53600E+00 -8.484045E-01 + 3538 3.53700E+00 -8.481647E-01 + 3539 3.53800E+00 -8.479250E-01 + 3540 3.53900E+00 -8.476855E-01 + 3541 3.54000E+00 -8.474461E-01 + 3542 3.54100E+00 -8.472069E-01 + 3543 3.54200E+00 -8.469678E-01 + 3544 3.54300E+00 -8.467288E-01 + 3545 3.54400E+00 -8.464899E-01 + 3546 3.54500E+00 -8.462512E-01 + 3547 3.54600E+00 -8.460126E-01 + 3548 3.54700E+00 -8.457742E-01 + 3549 3.54800E+00 -8.455358E-01 + 3550 3.54900E+00 -8.452977E-01 + 3551 3.55000E+00 -8.450596E-01 + 3552 3.55100E+00 -8.448217E-01 + 3553 3.55200E+00 -8.445839E-01 + 3554 3.55300E+00 -8.443463E-01 + 3555 3.55400E+00 -8.441087E-01 + 3556 3.55500E+00 -8.438714E-01 + 3557 3.55600E+00 -8.436341E-01 + 3558 3.55700E+00 -8.433970E-01 + 3559 3.55800E+00 -8.431600E-01 + 3560 3.55900E+00 -8.429232E-01 + 3561 3.56000E+00 -8.426865E-01 + 3562 3.56100E+00 -8.424499E-01 + 3563 3.56200E+00 -8.422135E-01 + 3564 3.56300E+00 -8.419772E-01 + 3565 3.56400E+00 -8.417410E-01 + 3566 3.56500E+00 -8.415050E-01 + 3567 3.56600E+00 -8.412691E-01 + 3568 3.56700E+00 -8.410333E-01 + 3569 3.56800E+00 -8.407977E-01 + 3570 3.56900E+00 -8.405622E-01 + 3571 3.57000E+00 -8.403268E-01 + 3572 3.57100E+00 -8.400916E-01 + 3573 3.57200E+00 -8.398564E-01 + 3574 3.57300E+00 -8.396215E-01 + 3575 3.57400E+00 -8.393866E-01 + 3576 3.57500E+00 -8.391519E-01 + 3577 3.57600E+00 -8.389173E-01 + 3578 3.57700E+00 -8.386828E-01 + 3579 3.57800E+00 -8.384485E-01 + 3580 3.57900E+00 -8.382143E-01 + 3581 3.58000E+00 -8.379802E-01 + 3582 3.58100E+00 -8.377462E-01 + 3583 3.58200E+00 -8.375124E-01 + 3584 3.58300E+00 -8.372787E-01 + 3585 3.58400E+00 -8.370451E-01 + 3586 3.58500E+00 -8.368117E-01 + 3587 3.58600E+00 -8.365784E-01 + 3588 3.58700E+00 -8.363452E-01 + 3589 3.58800E+00 -8.361122E-01 + 3590 3.58900E+00 -8.358793E-01 + 3591 3.59000E+00 -8.356465E-01 + 3592 3.59100E+00 -8.354138E-01 + 3593 3.59200E+00 -8.351813E-01 + 3594 3.59300E+00 -8.349489E-01 + 3595 3.59400E+00 -8.347166E-01 + 3596 3.59500E+00 -8.344845E-01 + 3597 3.59600E+00 -8.342525E-01 + 3598 3.59700E+00 -8.340206E-01 + 3599 3.59800E+00 -8.337889E-01 + 3600 3.59900E+00 -8.335572E-01 + 3601 3.60000E+00 -8.333257E-01 + 3602 3.60100E+00 -8.330944E-01 + 3603 3.60200E+00 -8.328632E-01 + 3604 3.60300E+00 -8.326321E-01 + 3605 3.60400E+00 -8.324011E-01 + 3606 3.60500E+00 -8.321702E-01 + 3607 3.60600E+00 -8.319395E-01 + 3608 3.60700E+00 -8.317089E-01 + 3609 3.60800E+00 -8.314785E-01 + 3610 3.60900E+00 -8.312481E-01 + 3611 3.61000E+00 -8.310180E-01 + 3612 3.61100E+00 -8.307879E-01 + 3613 3.61200E+00 -8.305579E-01 + 3614 3.61300E+00 -8.303281E-01 + 3615 3.61400E+00 -8.300984E-01 + 3616 3.61500E+00 -8.298689E-01 + 3617 3.61600E+00 -8.296394E-01 + 3618 3.61700E+00 -8.294101E-01 + 3619 3.61800E+00 -8.291809E-01 + 3620 3.61900E+00 -8.289519E-01 + 3621 3.62000E+00 -8.287229E-01 + 3622 3.62100E+00 -8.284941E-01 + 3623 3.62200E+00 -8.282654E-01 + 3624 3.62300E+00 -8.280369E-01 + 3625 3.62400E+00 -8.278084E-01 + 3626 3.62500E+00 -8.275801E-01 + 3627 3.62600E+00 -8.273519E-01 + 3628 3.62700E+00 -8.271238E-01 + 3629 3.62800E+00 -8.268959E-01 + 3630 3.62900E+00 -8.266681E-01 + 3631 3.63000E+00 -8.264404E-01 + 3632 3.63100E+00 -8.262128E-01 + 3633 3.63200E+00 -8.259854E-01 + 3634 3.63300E+00 -8.257581E-01 + 3635 3.63400E+00 -8.255309E-01 + 3636 3.63500E+00 -8.253038E-01 + 3637 3.63600E+00 -8.250768E-01 + 3638 3.63700E+00 -8.248500E-01 + 3639 3.63800E+00 -8.246233E-01 + 3640 3.63900E+00 -8.243968E-01 + 3641 3.64000E+00 -8.241703E-01 + 3642 3.64100E+00 -8.239440E-01 + 3643 3.64200E+00 -8.237178E-01 + 3644 3.64300E+00 -8.234917E-01 + 3645 3.64400E+00 -8.232658E-01 + 3646 3.64500E+00 -8.230400E-01 + 3647 3.64600E+00 -8.228143E-01 + 3648 3.64700E+00 -8.225887E-01 + 3649 3.64800E+00 -8.223633E-01 + 3650 3.64900E+00 -8.221379E-01 + 3651 3.65000E+00 -8.219127E-01 + 3652 3.65100E+00 -8.216877E-01 + 3653 3.65200E+00 -8.214627E-01 + 3654 3.65300E+00 -8.212379E-01 + 3655 3.65400E+00 -8.210132E-01 + 3656 3.65500E+00 -8.207886E-01 + 3657 3.65600E+00 -8.205642E-01 + 3658 3.65700E+00 -8.203399E-01 + 3659 3.65800E+00 -8.201156E-01 + 3660 3.65900E+00 -8.198916E-01 + 3661 3.66000E+00 -8.196676E-01 + 3662 3.66100E+00 -8.194438E-01 + 3663 3.66200E+00 -8.192200E-01 + 3664 3.66300E+00 -8.189964E-01 + 3665 3.66400E+00 -8.187729E-01 + 3666 3.66500E+00 -8.185496E-01 + 3667 3.66600E+00 -8.183263E-01 + 3668 3.66700E+00 -8.181032E-01 + 3669 3.66800E+00 -8.178802E-01 + 3670 3.66900E+00 -8.176573E-01 + 3671 3.67000E+00 -8.174346E-01 + 3672 3.67100E+00 -8.172119E-01 + 3673 3.67200E+00 -8.169894E-01 + 3674 3.67300E+00 -8.167670E-01 + 3675 3.67400E+00 -8.165447E-01 + 3676 3.67500E+00 -8.163226E-01 + 3677 3.67600E+00 -8.161005E-01 + 3678 3.67700E+00 -8.158786E-01 + 3679 3.67800E+00 -8.156568E-01 + 3680 3.67900E+00 -8.154351E-01 + 3681 3.68000E+00 -8.152136E-01 + 3682 3.68100E+00 -8.149921E-01 + 3683 3.68200E+00 -8.147708E-01 + 3684 3.68300E+00 -8.145496E-01 + 3685 3.68400E+00 -8.143285E-01 + 3686 3.68500E+00 -8.141076E-01 + 3687 3.68600E+00 -8.138868E-01 + 3688 3.68700E+00 -8.136660E-01 + 3689 3.68800E+00 -8.134454E-01 + 3690 3.68900E+00 -8.132250E-01 + 3691 3.69000E+00 -8.130046E-01 + 3692 3.69100E+00 -8.127844E-01 + 3693 3.69200E+00 -8.125643E-01 + 3694 3.69300E+00 -8.123443E-01 + 3695 3.69400E+00 -8.121244E-01 + 3696 3.69500E+00 -8.119046E-01 + 3697 3.69600E+00 -8.116850E-01 + 3698 3.69700E+00 -8.114655E-01 + 3699 3.69800E+00 -8.112461E-01 + 3700 3.69900E+00 -8.110268E-01 + 3701 3.70000E+00 -8.108077E-01 + 3702 3.70100E+00 -8.105887E-01 + 3703 3.70200E+00 -8.103697E-01 + 3704 3.70300E+00 -8.101509E-01 + 3705 3.70400E+00 -8.099323E-01 + 3706 3.70500E+00 -8.097137E-01 + 3707 3.70600E+00 -8.094953E-01 + 3708 3.70700E+00 -8.092769E-01 + 3709 3.70800E+00 -8.090587E-01 + 3710 3.70900E+00 -8.088406E-01 + 3711 3.71000E+00 -8.086226E-01 + 3712 3.71100E+00 -8.084047E-01 + 3713 3.71200E+00 -8.081870E-01 + 3714 3.71300E+00 -8.079694E-01 + 3715 3.71400E+00 -8.077518E-01 + 3716 3.71500E+00 -8.075344E-01 + 3717 3.71600E+00 -8.073171E-01 + 3718 3.71700E+00 -8.071000E-01 + 3719 3.71800E+00 -8.068829E-01 + 3720 3.71900E+00 -8.066660E-01 + 3721 3.72000E+00 -8.064492E-01 + 3722 3.72100E+00 -8.062324E-01 + 3723 3.72200E+00 -8.060158E-01 + 3724 3.72300E+00 -8.057994E-01 + 3725 3.72400E+00 -8.055830E-01 + 3726 3.72500E+00 -8.053668E-01 + 3727 3.72600E+00 -8.051506E-01 + 3728 3.72700E+00 -8.049346E-01 + 3729 3.72800E+00 -8.047187E-01 + 3730 3.72900E+00 -8.045030E-01 + 3731 3.73000E+00 -8.042873E-01 + 3732 3.73100E+00 -8.040717E-01 + 3733 3.73200E+00 -8.038563E-01 + 3734 3.73300E+00 -8.036410E-01 + 3735 3.73400E+00 -8.034258E-01 + 3736 3.73500E+00 -8.032107E-01 + 3737 3.73600E+00 -8.029957E-01 + 3738 3.73700E+00 -8.027809E-01 + 3739 3.73800E+00 -8.025662E-01 + 3740 3.73900E+00 -8.023515E-01 + 3741 3.74000E+00 -8.021370E-01 + 3742 3.74100E+00 -8.019226E-01 + 3743 3.74200E+00 -8.017084E-01 + 3744 3.74300E+00 -8.014942E-01 + 3745 3.74400E+00 -8.012802E-01 + 3746 3.74500E+00 -8.010663E-01 + 3747 3.74600E+00 -8.008524E-01 + 3748 3.74700E+00 -8.006388E-01 + 3749 3.74800E+00 -8.004252E-01 + 3750 3.74900E+00 -8.002117E-01 + 3751 3.75000E+00 -7.999984E-01 + 3752 3.75100E+00 -7.997851E-01 + 3753 3.75200E+00 -7.995720E-01 + 3754 3.75300E+00 -7.993590E-01 + 3755 3.75400E+00 -7.991460E-01 + 3756 3.75500E+00 -7.989332E-01 + 3757 3.75600E+00 -7.987206E-01 + 3758 3.75700E+00 -7.985080E-01 + 3759 3.75800E+00 -7.982955E-01 + 3760 3.75900E+00 -7.980832E-01 + 3761 3.76000E+00 -7.978709E-01 + 3762 3.76100E+00 -7.976588E-01 + 3763 3.76200E+00 -7.974468E-01 + 3764 3.76300E+00 -7.972349E-01 + 3765 3.76400E+00 -7.970231E-01 + 3766 3.76500E+00 -7.968114E-01 + 3767 3.76600E+00 -7.965999E-01 + 3768 3.76700E+00 -7.963884E-01 + 3769 3.76800E+00 -7.961771E-01 + 3770 3.76900E+00 -7.959658E-01 + 3771 3.77000E+00 -7.957547E-01 + 3772 3.77100E+00 -7.955437E-01 + 3773 3.77200E+00 -7.953328E-01 + 3774 3.77300E+00 -7.951220E-01 + 3775 3.77400E+00 -7.949114E-01 + 3776 3.77500E+00 -7.947008E-01 + 3777 3.77600E+00 -7.944904E-01 + 3778 3.77700E+00 -7.942800E-01 + 3779 3.77800E+00 -7.940698E-01 + 3780 3.77900E+00 -7.938597E-01 + 3781 3.78000E+00 -7.936497E-01 + 3782 3.78100E+00 -7.934398E-01 + 3783 3.78200E+00 -7.932300E-01 + 3784 3.78300E+00 -7.930204E-01 + 3785 3.78400E+00 -7.928108E-01 + 3786 3.78500E+00 -7.926014E-01 + 3787 3.78600E+00 -7.923920E-01 + 3788 3.78700E+00 -7.921828E-01 + 3789 3.78800E+00 -7.919737E-01 + 3790 3.78900E+00 -7.917647E-01 + 3791 3.79000E+00 -7.915559E-01 + 3792 3.79100E+00 -7.913471E-01 + 3793 3.79200E+00 -7.911384E-01 + 3794 3.79300E+00 -7.909299E-01 + 3795 3.79400E+00 -7.907214E-01 + 3796 3.79500E+00 -7.905131E-01 + 3797 3.79600E+00 -7.903049E-01 + 3798 3.79700E+00 -7.900968E-01 + 3799 3.79800E+00 -7.898888E-01 + 3800 3.79900E+00 -7.896809E-01 + 3801 3.80000E+00 -7.894731E-01 + 3802 3.80100E+00 -7.892654E-01 + 3803 3.80200E+00 -7.890578E-01 + 3804 3.80300E+00 -7.888504E-01 + 3805 3.80400E+00 -7.886430E-01 + 3806 3.80500E+00 -7.884358E-01 + 3807 3.80600E+00 -7.882286E-01 + 3808 3.80700E+00 -7.880216E-01 + 3809 3.80800E+00 -7.878147E-01 + 3810 3.80900E+00 -7.876078E-01 + 3811 3.81000E+00 -7.874011E-01 + 3812 3.81100E+00 -7.871945E-01 + 3813 3.81200E+00 -7.869880E-01 + 3814 3.81300E+00 -7.867816E-01 + 3815 3.81400E+00 -7.865754E-01 + 3816 3.81500E+00 -7.863692E-01 + 3817 3.81600E+00 -7.861631E-01 + 3818 3.81700E+00 -7.859572E-01 + 3819 3.81800E+00 -7.857513E-01 + 3820 3.81900E+00 -7.855456E-01 + 3821 3.82000E+00 -7.853399E-01 + 3822 3.82100E+00 -7.851344E-01 + 3823 3.82200E+00 -7.849290E-01 + 3824 3.82300E+00 -7.847237E-01 + 3825 3.82400E+00 -7.845185E-01 + 3826 3.82500E+00 -7.843134E-01 + 3827 3.82600E+00 -7.841084E-01 + 3828 3.82700E+00 -7.839035E-01 + 3829 3.82800E+00 -7.836988E-01 + 3830 3.82900E+00 -7.834941E-01 + 3831 3.83000E+00 -7.832896E-01 + 3832 3.83100E+00 -7.830851E-01 + 3833 3.83200E+00 -7.828808E-01 + 3834 3.83300E+00 -7.826765E-01 + 3835 3.83400E+00 -7.824724E-01 + 3836 3.83500E+00 -7.822684E-01 + 3837 3.83600E+00 -7.820645E-01 + 3838 3.83700E+00 -7.818607E-01 + 3839 3.83800E+00 -7.816570E-01 + 3840 3.83900E+00 -7.814534E-01 + 3841 3.84000E+00 -7.812500E-01 + 3842 3.84100E+00 -7.810466E-01 + 3843 3.84200E+00 -7.808433E-01 + 3844 3.84300E+00 -7.806402E-01 + 3845 3.84400E+00 -7.804371E-01 + 3846 3.84500E+00 -7.802341E-01 + 3847 3.84600E+00 -7.800313E-01 + 3848 3.84700E+00 -7.798285E-01 + 3849 3.84800E+00 -7.796259E-01 + 3850 3.84900E+00 -7.794234E-01 + 3851 3.85000E+00 -7.792209E-01 + 3852 3.85100E+00 -7.790186E-01 + 3853 3.85200E+00 -7.788164E-01 + 3854 3.85300E+00 -7.786142E-01 + 3855 3.85400E+00 -7.784122E-01 + 3856 3.85500E+00 -7.782103E-01 + 3857 3.85600E+00 -7.780085E-01 + 3858 3.85700E+00 -7.778068E-01 + 3859 3.85800E+00 -7.776052E-01 + 3860 3.85900E+00 -7.774037E-01 + 3861 3.86000E+00 -7.772023E-01 + 3862 3.86100E+00 -7.770010E-01 + 3863 3.86200E+00 -7.767998E-01 + 3864 3.86300E+00 -7.765987E-01 + 3865 3.86400E+00 -7.763977E-01 + 3866 3.86500E+00 -7.761969E-01 + 3867 3.86600E+00 -7.759961E-01 + 3868 3.86700E+00 -7.757954E-01 + 3869 3.86800E+00 -7.755949E-01 + 3870 3.86900E+00 -7.753944E-01 + 3871 3.87000E+00 -7.751941E-01 + 3872 3.87100E+00 -7.749938E-01 + 3873 3.87200E+00 -7.747937E-01 + 3874 3.87300E+00 -7.745936E-01 + 3875 3.87400E+00 -7.743937E-01 + 3876 3.87500E+00 -7.741938E-01 + 3877 3.87600E+00 -7.739941E-01 + 3878 3.87700E+00 -7.737945E-01 + 3879 3.87800E+00 -7.735950E-01 + 3880 3.87900E+00 -7.733955E-01 + 3881 3.88000E+00 -7.731962E-01 + 3882 3.88100E+00 -7.729970E-01 + 3883 3.88200E+00 -7.727979E-01 + 3884 3.88300E+00 -7.725989E-01 + 3885 3.88400E+00 -7.724000E-01 + 3886 3.88500E+00 -7.722012E-01 + 3887 3.88600E+00 -7.720025E-01 + 3888 3.88700E+00 -7.718039E-01 + 3889 3.88800E+00 -7.716054E-01 + 3890 3.88900E+00 -7.714071E-01 + 3891 3.89000E+00 -7.712088E-01 + 3892 3.89100E+00 -7.710106E-01 + 3893 3.89200E+00 -7.708125E-01 + 3894 3.89300E+00 -7.706145E-01 + 3895 3.89400E+00 -7.704166E-01 + 3896 3.89500E+00 -7.702188E-01 + 3897 3.89600E+00 -7.700211E-01 + 3898 3.89700E+00 -7.698236E-01 + 3899 3.89800E+00 -7.696261E-01 + 3900 3.89900E+00 -7.694287E-01 + 3901 3.90000E+00 -7.692314E-01 + 3902 3.90100E+00 -7.690342E-01 + 3903 3.90200E+00 -7.688371E-01 + 3904 3.90300E+00 -7.686402E-01 + 3905 3.90400E+00 -7.684433E-01 + 3906 3.90500E+00 -7.682465E-01 + 3907 3.90600E+00 -7.680498E-01 + 3908 3.90700E+00 -7.678532E-01 + 3909 3.90800E+00 -7.676567E-01 + 3910 3.90900E+00 -7.674604E-01 + 3911 3.91000E+00 -7.672641E-01 + 3912 3.91100E+00 -7.670679E-01 + 3913 3.91200E+00 -7.668718E-01 + 3914 3.91300E+00 -7.666758E-01 + 3915 3.91400E+00 -7.664800E-01 + 3916 3.91500E+00 -7.662842E-01 + 3917 3.91600E+00 -7.660885E-01 + 3918 3.91700E+00 -7.658929E-01 + 3919 3.91800E+00 -7.656974E-01 + 3920 3.91900E+00 -7.655021E-01 + 3921 3.92000E+00 -7.653068E-01 + 3922 3.92100E+00 -7.651116E-01 + 3923 3.92200E+00 -7.649165E-01 + 3924 3.92300E+00 -7.647216E-01 + 3925 3.92400E+00 -7.645267E-01 + 3926 3.92500E+00 -7.643319E-01 + 3927 3.92600E+00 -7.641372E-01 + 3928 3.92700E+00 -7.639427E-01 + 3929 3.92800E+00 -7.637482E-01 + 3930 3.92900E+00 -7.635538E-01 + 3931 3.93000E+00 -7.633595E-01 + 3932 3.93100E+00 -7.631653E-01 + 3933 3.93200E+00 -7.629713E-01 + 3934 3.93300E+00 -7.627773E-01 + 3935 3.93400E+00 -7.625834E-01 + 3936 3.93500E+00 -7.623897E-01 + 3937 3.93600E+00 -7.621960E-01 + 3938 3.93700E+00 -7.620024E-01 + 3939 3.93800E+00 -7.618089E-01 + 3940 3.93900E+00 -7.616155E-01 + 3941 3.94000E+00 -7.614222E-01 + 3942 3.94100E+00 -7.612290E-01 + 3943 3.94200E+00 -7.610359E-01 + 3944 3.94300E+00 -7.608429E-01 + 3945 3.94400E+00 -7.606500E-01 + 3946 3.94500E+00 -7.604572E-01 + 3947 3.94600E+00 -7.602645E-01 + 3948 3.94700E+00 -7.600719E-01 + 3949 3.94800E+00 -7.598794E-01 + 3950 3.94900E+00 -7.596870E-01 + 3951 3.95000E+00 -7.594946E-01 + 3952 3.95100E+00 -7.593024E-01 + 3953 3.95200E+00 -7.591103E-01 + 3954 3.95300E+00 -7.589182E-01 + 3955 3.95400E+00 -7.587263E-01 + 3956 3.95500E+00 -7.585345E-01 + 3957 3.95600E+00 -7.583427E-01 + 3958 3.95700E+00 -7.581511E-01 + 3959 3.95800E+00 -7.579595E-01 + 3960 3.95900E+00 -7.577681E-01 + 3961 3.96000E+00 -7.575767E-01 + 3962 3.96100E+00 -7.573854E-01 + 3963 3.96200E+00 -7.571943E-01 + 3964 3.96300E+00 -7.570032E-01 + 3965 3.96400E+00 -7.568122E-01 + 3966 3.96500E+00 -7.566214E-01 + 3967 3.96600E+00 -7.564306E-01 + 3968 3.96700E+00 -7.562399E-01 + 3969 3.96800E+00 -7.560493E-01 + 3970 3.96900E+00 -7.558588E-01 + 3971 3.97000E+00 -7.556684E-01 + 3972 3.97100E+00 -7.554782E-01 + 3973 3.97200E+00 -7.552880E-01 + 3974 3.97300E+00 -7.550979E-01 + 3975 3.97400E+00 -7.549079E-01 + 3976 3.97500E+00 -7.547179E-01 + 3977 3.97600E+00 -7.545281E-01 + 3978 3.97700E+00 -7.543384E-01 + 3979 3.97800E+00 -7.541488E-01 + 3980 3.97900E+00 -7.539593E-01 + 3981 3.98000E+00 -7.537699E-01 + 3982 3.98100E+00 -7.535805E-01 + 3983 3.98200E+00 -7.533913E-01 + 3984 3.98300E+00 -7.532022E-01 + 3985 3.98400E+00 -7.530131E-01 + 3986 3.98500E+00 -7.528242E-01 + 3987 3.98600E+00 -7.526353E-01 + 3988 3.98700E+00 -7.524466E-01 + 3989 3.98800E+00 -7.522579E-01 + 3990 3.98900E+00 -7.520693E-01 + 3991 3.99000E+00 -7.518808E-01 + 3992 3.99100E+00 -7.516925E-01 + 3993 3.99200E+00 -7.515042E-01 + 3994 3.99300E+00 -7.513160E-01 + 3995 3.99400E+00 -7.511278E-01 + 3996 3.99500E+00 -7.509398E-01 + 3997 3.99600E+00 -7.507519E-01 + 3998 3.99700E+00 -7.505641E-01 + 3999 3.99800E+00 -7.503763E-01 + 4000 3.99900E+00 -7.501887E-01 + 4001 4.00000E+00 -7.500012E-01 + 4002 4.00100E+00 -7.498137E-01 + 4003 4.00200E+00 -7.496263E-01 + 4004 4.00300E+00 -7.494391E-01 + 4005 4.00400E+00 -7.492519E-01 + 4006 4.00500E+00 -7.490648E-01 + 4007 4.00600E+00 -7.488778E-01 + 4008 4.00700E+00 -7.486909E-01 + 4009 4.00800E+00 -7.485041E-01 + 4010 4.00900E+00 -7.483174E-01 + 4011 4.01000E+00 -7.481308E-01 + 4012 4.01100E+00 -7.479443E-01 + 4013 4.01200E+00 -7.477578E-01 + 4014 4.01300E+00 -7.475715E-01 + 4015 4.01400E+00 -7.473853E-01 + 4016 4.01500E+00 -7.471991E-01 + 4017 4.01600E+00 -7.470130E-01 + 4018 4.01700E+00 -7.468271E-01 + 4019 4.01800E+00 -7.466412E-01 + 4020 4.01900E+00 -7.464554E-01 + 4021 4.02000E+00 -7.462697E-01 + 4022 4.02100E+00 -7.460842E-01 + 4023 4.02200E+00 -7.458987E-01 + 4024 4.02300E+00 -7.457133E-01 + 4025 4.02400E+00 -7.455279E-01 + 4026 4.02500E+00 -7.453427E-01 + 4027 4.02600E+00 -7.451576E-01 + 4028 4.02700E+00 -7.449726E-01 + 4029 4.02800E+00 -7.447876E-01 + 4030 4.02900E+00 -7.446028E-01 + 4031 4.03000E+00 -7.444180E-01 + 4032 4.03100E+00 -7.442334E-01 + 4033 4.03200E+00 -7.440488E-01 + 4034 4.03300E+00 -7.438643E-01 + 4035 4.03400E+00 -7.436799E-01 + 4036 4.03500E+00 -7.434956E-01 + 4037 4.03600E+00 -7.433114E-01 + 4038 4.03700E+00 -7.431273E-01 + 4039 4.03800E+00 -7.429433E-01 + 4040 4.03900E+00 -7.427594E-01 + 4041 4.04000E+00 -7.425755E-01 + 4042 4.04100E+00 -7.423918E-01 + 4043 4.04200E+00 -7.422081E-01 + 4044 4.04300E+00 -7.420245E-01 + 4045 4.04400E+00 -7.418410E-01 + 4046 4.04500E+00 -7.416576E-01 + 4047 4.04600E+00 -7.414743E-01 + 4048 4.04700E+00 -7.412911E-01 + 4049 4.04800E+00 -7.411080E-01 + 4050 4.04900E+00 -7.409249E-01 + 4051 4.05000E+00 -7.407420E-01 + 4052 4.05100E+00 -7.405591E-01 + 4053 4.05200E+00 -7.403764E-01 + 4054 4.05300E+00 -7.401937E-01 + 4055 4.05400E+00 -7.400111E-01 + 4056 4.05500E+00 -7.398286E-01 + 4057 4.05600E+00 -7.396462E-01 + 4058 4.05700E+00 -7.394639E-01 + 4059 4.05800E+00 -7.392816E-01 + 4060 4.05900E+00 -7.390995E-01 + 4061 4.06000E+00 -7.389174E-01 + 4062 4.06100E+00 -7.387355E-01 + 4063 4.06200E+00 -7.385536E-01 + 4064 4.06300E+00 -7.383718E-01 + 4065 4.06400E+00 -7.381901E-01 + 4066 4.06500E+00 -7.380085E-01 + 4067 4.06600E+00 -7.378270E-01 + 4068 4.06700E+00 -7.376456E-01 + 4069 4.06800E+00 -7.374643E-01 + 4070 4.06900E+00 -7.372830E-01 + 4071 4.07000E+00 -7.371019E-01 + 4072 4.07100E+00 -7.369208E-01 + 4073 4.07200E+00 -7.367399E-01 + 4074 4.07300E+00 -7.365590E-01 + 4075 4.07400E+00 -7.363782E-01 + 4076 4.07500E+00 -7.361975E-01 + 4077 4.07600E+00 -7.360169E-01 + 4078 4.07700E+00 -7.358364E-01 + 4079 4.07800E+00 -7.356559E-01 + 4080 4.07900E+00 -7.354756E-01 + 4081 4.08000E+00 -7.352953E-01 + 4082 4.08100E+00 -7.351152E-01 + 4083 4.08200E+00 -7.349351E-01 + 4084 4.08300E+00 -7.347551E-01 + 4085 4.08400E+00 -7.345752E-01 + 4086 4.08500E+00 -7.343954E-01 + 4087 4.08600E+00 -7.342157E-01 + 4088 4.08700E+00 -7.340360E-01 + 4089 4.08800E+00 -7.338565E-01 + 4090 4.08900E+00 -7.336770E-01 + 4091 4.09000E+00 -7.334976E-01 + 4092 4.09100E+00 -7.333183E-01 + 4093 4.09200E+00 -7.331391E-01 + 4094 4.09300E+00 -7.329600E-01 + 4095 4.09400E+00 -7.327810E-01 + 4096 4.09500E+00 -7.326020E-01 + 4097 4.09600E+00 -7.324232E-01 + 4098 4.09700E+00 -7.322444E-01 + 4099 4.09800E+00 -7.320657E-01 + 4100 4.09900E+00 -7.318871E-01 + 4101 4.10000E+00 -7.317086E-01 + 4102 4.10100E+00 -7.315302E-01 + 4103 4.10200E+00 -7.313518E-01 + 4104 4.10300E+00 -7.311736E-01 + 4105 4.10400E+00 -7.309954E-01 + 4106 4.10500E+00 -7.308173E-01 + 4107 4.10600E+00 -7.306393E-01 + 4108 4.10700E+00 -7.304614E-01 + 4109 4.10800E+00 -7.302836E-01 + 4110 4.10900E+00 -7.301059E-01 + 4111 4.11000E+00 -7.299282E-01 + 4112 4.11100E+00 -7.297507E-01 + 4113 4.11200E+00 -7.295732E-01 + 4114 4.11300E+00 -7.293958E-01 + 4115 4.11400E+00 -7.292185E-01 + 4116 4.11500E+00 -7.290413E-01 + 4117 4.11600E+00 -7.288642E-01 + 4118 4.11700E+00 -7.286871E-01 + 4119 4.11800E+00 -7.285102E-01 + 4120 4.11900E+00 -7.283333E-01 + 4121 4.12000E+00 -7.281565E-01 + 4122 4.12100E+00 -7.279798E-01 + 4123 4.12200E+00 -7.278032E-01 + 4124 4.12300E+00 -7.276267E-01 + 4125 4.12400E+00 -7.274502E-01 + 4126 4.12500E+00 -7.272739E-01 + 4127 4.12600E+00 -7.270976E-01 + 4128 4.12700E+00 -7.269215E-01 + 4129 4.12800E+00 -7.267454E-01 + 4130 4.12900E+00 -7.265694E-01 + 4131 4.13000E+00 -7.263935E-01 + 4132 4.13100E+00 -7.262176E-01 + 4133 4.13200E+00 -7.260419E-01 + 4134 4.13300E+00 -7.258662E-01 + 4135 4.13400E+00 -7.256907E-01 + 4136 4.13500E+00 -7.255152E-01 + 4137 4.13600E+00 -7.253398E-01 + 4138 4.13700E+00 -7.251644E-01 + 4139 4.13800E+00 -7.249892E-01 + 4140 4.13900E+00 -7.248140E-01 + 4141 4.14000E+00 -7.246390E-01 + 4142 4.14100E+00 -7.244640E-01 + 4143 4.14200E+00 -7.242891E-01 + 4144 4.14300E+00 -7.241142E-01 + 4145 4.14400E+00 -7.239395E-01 + 4146 4.14500E+00 -7.237649E-01 + 4147 4.14600E+00 -7.235903E-01 + 4148 4.14700E+00 -7.234158E-01 + 4149 4.14800E+00 -7.232414E-01 + 4150 4.14900E+00 -7.230671E-01 + 4151 4.15000E+00 -7.228928E-01 + 4152 4.15100E+00 -7.227187E-01 + 4153 4.15200E+00 -7.225446E-01 + 4154 4.15300E+00 -7.223706E-01 + 4155 4.15400E+00 -7.221967E-01 + 4156 4.15500E+00 -7.220229E-01 + 4157 4.15600E+00 -7.218491E-01 + 4158 4.15700E+00 -7.216755E-01 + 4159 4.15800E+00 -7.215019E-01 + 4160 4.15900E+00 -7.213284E-01 + 4161 4.16000E+00 -7.211550E-01 + 4162 4.16100E+00 -7.209817E-01 + 4163 4.16200E+00 -7.208085E-01 + 4164 4.16300E+00 -7.206353E-01 + 4165 4.16400E+00 -7.204623E-01 + 4166 4.16500E+00 -7.202893E-01 + 4167 4.16600E+00 -7.201164E-01 + 4168 4.16700E+00 -7.199436E-01 + 4169 4.16800E+00 -7.197708E-01 + 4170 4.16900E+00 -7.195982E-01 + 4171 4.17000E+00 -7.194256E-01 + 4172 4.17100E+00 -7.192531E-01 + 4173 4.17200E+00 -7.190807E-01 + 4174 4.17300E+00 -7.189084E-01 + 4175 4.17400E+00 -7.187362E-01 + 4176 4.17500E+00 -7.185640E-01 + 4177 4.17600E+00 -7.183919E-01 + 4178 4.17700E+00 -7.182200E-01 + 4179 4.17800E+00 -7.180481E-01 + 4180 4.17900E+00 -7.178762E-01 + 4181 4.18000E+00 -7.177045E-01 + 4182 4.18100E+00 -7.175329E-01 + 4183 4.18200E+00 -7.173613E-01 + 4184 4.18300E+00 -7.171898E-01 + 4185 4.18400E+00 -7.170184E-01 + 4186 4.18500E+00 -7.168471E-01 + 4187 4.18600E+00 -7.166759E-01 + 4188 4.18700E+00 -7.165047E-01 + 4189 4.18800E+00 -7.163336E-01 + 4190 4.18900E+00 -7.161626E-01 + 4191 4.19000E+00 -7.159917E-01 + 4192 4.19100E+00 -7.158209E-01 + 4193 4.19200E+00 -7.156501E-01 + 4194 4.19300E+00 -7.154794E-01 + 4195 4.19400E+00 -7.153088E-01 + 4196 4.19500E+00 -7.151383E-01 + 4197 4.19600E+00 -7.149679E-01 + 4198 4.19700E+00 -7.147975E-01 + 4199 4.19800E+00 -7.146272E-01 + 4200 4.19900E+00 -7.144570E-01 + 4201 4.20000E+00 -7.142869E-01 + 4202 4.20100E+00 -7.141169E-01 + 4203 4.20200E+00 -7.139469E-01 + 4204 4.20300E+00 -7.137771E-01 + 4205 4.20400E+00 -7.136073E-01 + 4206 4.20500E+00 -7.134376E-01 + 4207 4.20600E+00 -7.132679E-01 + 4208 4.20700E+00 -7.130984E-01 + 4209 4.20800E+00 -7.129289E-01 + 4210 4.20900E+00 -7.127595E-01 + 4211 4.21000E+00 -7.125902E-01 + 4212 4.21100E+00 -7.124210E-01 + 4213 4.21200E+00 -7.122518E-01 + 4214 4.21300E+00 -7.120828E-01 + 4215 4.21400E+00 -7.119138E-01 + 4216 4.21500E+00 -7.117449E-01 + 4217 4.21600E+00 -7.115761E-01 + 4218 4.21700E+00 -7.114073E-01 + 4219 4.21800E+00 -7.112386E-01 + 4220 4.21900E+00 -7.110701E-01 + 4221 4.22000E+00 -7.109016E-01 + 4222 4.22100E+00 -7.107331E-01 + 4223 4.22200E+00 -7.105648E-01 + 4224 4.22300E+00 -7.103965E-01 + 4225 4.22400E+00 -7.102283E-01 + 4226 4.22500E+00 -7.100602E-01 + 4227 4.22600E+00 -7.098922E-01 + 4228 4.22700E+00 -7.097243E-01 + 4229 4.22800E+00 -7.095564E-01 + 4230 4.22900E+00 -7.093886E-01 + 4231 4.23000E+00 -7.092209E-01 + 4232 4.23100E+00 -7.090533E-01 + 4233 4.23200E+00 -7.088858E-01 + 4234 4.23300E+00 -7.087183E-01 + 4235 4.23400E+00 -7.085510E-01 + 4236 4.23500E+00 -7.083837E-01 + 4237 4.23600E+00 -7.082164E-01 + 4238 4.23700E+00 -7.080493E-01 + 4239 4.23800E+00 -7.078822E-01 + 4240 4.23900E+00 -7.077152E-01 + 4241 4.24000E+00 -7.075483E-01 + 4242 4.24100E+00 -7.073815E-01 + 4243 4.24200E+00 -7.072147E-01 + 4244 4.24300E+00 -7.070481E-01 + 4245 4.24400E+00 -7.068815E-01 + 4246 4.24500E+00 -7.067149E-01 + 4247 4.24600E+00 -7.065485E-01 + 4248 4.24700E+00 -7.063821E-01 + 4249 4.24800E+00 -7.062158E-01 + 4250 4.24900E+00 -7.060496E-01 + 4251 4.25000E+00 -7.058835E-01 + 4252 4.25100E+00 -7.057174E-01 + 4253 4.25200E+00 -7.055515E-01 + 4254 4.25300E+00 -7.053856E-01 + 4255 4.25400E+00 -7.052197E-01 + 4256 4.25500E+00 -7.050540E-01 + 4257 4.25600E+00 -7.048883E-01 + 4258 4.25700E+00 -7.047227E-01 + 4259 4.25800E+00 -7.045572E-01 + 4260 4.25900E+00 -7.043918E-01 + 4261 4.26000E+00 -7.042264E-01 + 4262 4.26100E+00 -7.040611E-01 + 4263 4.26200E+00 -7.038959E-01 + 4264 4.26300E+00 -7.037308E-01 + 4265 4.26400E+00 -7.035658E-01 + 4266 4.26500E+00 -7.034008E-01 + 4267 4.26600E+00 -7.032359E-01 + 4268 4.26700E+00 -7.030711E-01 + 4269 4.26800E+00 -7.029064E-01 + 4270 4.26900E+00 -7.027417E-01 + 4271 4.27000E+00 -7.025771E-01 + 4272 4.27100E+00 -7.024126E-01 + 4273 4.27200E+00 -7.022482E-01 + 4274 4.27300E+00 -7.020838E-01 + 4275 4.27400E+00 -7.019196E-01 + 4276 4.27500E+00 -7.017554E-01 + 4277 4.27600E+00 -7.015913E-01 + 4278 4.27700E+00 -7.014272E-01 + 4279 4.27800E+00 -7.012633E-01 + 4280 4.27900E+00 -7.010994E-01 + 4281 4.28000E+00 -7.009356E-01 + 4282 4.28100E+00 -7.007718E-01 + 4283 4.28200E+00 -7.006082E-01 + 4284 4.28300E+00 -7.004446E-01 + 4285 4.28400E+00 -7.002811E-01 + 4286 4.28500E+00 -7.001177E-01 + 4287 4.28600E+00 -6.999544E-01 + 4288 4.28700E+00 -6.997911E-01 + 4289 4.28800E+00 -6.996279E-01 + 4290 4.28900E+00 -6.994648E-01 + 4291 4.29000E+00 -6.993018E-01 + 4292 4.29100E+00 -6.991388E-01 + 4293 4.29200E+00 -6.989759E-01 + 4294 4.29300E+00 -6.988131E-01 + 4295 4.29400E+00 -6.986503E-01 + 4296 4.29500E+00 -6.984877E-01 + 4297 4.29600E+00 -6.983251E-01 + 4298 4.29700E+00 -6.981626E-01 + 4299 4.29800E+00 -6.980001E-01 + 4300 4.29900E+00 -6.978378E-01 + 4301 4.30000E+00 -6.976755E-01 + 4302 4.30100E+00 -6.975133E-01 + 4303 4.30200E+00 -6.973511E-01 + 4304 4.30300E+00 -6.971890E-01 + 4305 4.30400E+00 -6.970271E-01 + 4306 4.30500E+00 -6.968651E-01 + 4307 4.30600E+00 -6.967033E-01 + 4308 4.30700E+00 -6.965415E-01 + 4309 4.30800E+00 -6.963798E-01 + 4310 4.30900E+00 -6.962182E-01 + 4311 4.31000E+00 -6.960567E-01 + 4312 4.31100E+00 -6.958952E-01 + 4313 4.31200E+00 -6.957338E-01 + 4314 4.31300E+00 -6.955725E-01 + 4315 4.31400E+00 -6.954113E-01 + 4316 4.31500E+00 -6.952501E-01 + 4317 4.31600E+00 -6.950890E-01 + 4318 4.31700E+00 -6.949280E-01 + 4319 4.31800E+00 -6.947670E-01 + 4320 4.31900E+00 -6.946062E-01 + 4321 4.32000E+00 -6.944454E-01 + 4322 4.32100E+00 -6.942846E-01 + 4323 4.32200E+00 -6.941240E-01 + 4324 4.32300E+00 -6.939634E-01 + 4325 4.32400E+00 -6.938029E-01 + 4326 4.32500E+00 -6.936425E-01 + 4327 4.32600E+00 -6.934822E-01 + 4328 4.32700E+00 -6.933219E-01 + 4329 4.32800E+00 -6.931617E-01 + 4330 4.32900E+00 -6.930016E-01 + 4331 4.33000E+00 -6.928415E-01 + 4332 4.33100E+00 -6.926816E-01 + 4333 4.33200E+00 -6.925217E-01 + 4334 4.33300E+00 -6.923618E-01 + 4335 4.33400E+00 -6.922021E-01 + 4336 4.33500E+00 -6.920424E-01 + 4337 4.33600E+00 -6.918828E-01 + 4338 4.33700E+00 -6.917233E-01 + 4339 4.33800E+00 -6.915639E-01 + 4340 4.33900E+00 -6.914045E-01 + 4341 4.34000E+00 -6.912452E-01 + 4342 4.34100E+00 -6.910860E-01 + 4343 4.34200E+00 -6.909268E-01 + 4344 4.34300E+00 -6.907677E-01 + 4345 4.34400E+00 -6.906087E-01 + 4346 4.34500E+00 -6.904498E-01 + 4347 4.34600E+00 -6.902909E-01 + 4348 4.34700E+00 -6.901321E-01 + 4349 4.34800E+00 -6.899734E-01 + 4350 4.34900E+00 -6.898147E-01 + 4351 4.35000E+00 -6.896561E-01 + 4352 4.35100E+00 -6.894976E-01 + 4353 4.35200E+00 -6.893392E-01 + 4354 4.35300E+00 -6.891808E-01 + 4355 4.35400E+00 -6.890225E-01 + 4356 4.35500E+00 -6.888643E-01 + 4357 4.35600E+00 -6.887062E-01 + 4358 4.35700E+00 -6.885481E-01 + 4359 4.35800E+00 -6.883901E-01 + 4360 4.35900E+00 -6.882322E-01 + 4361 4.36000E+00 -6.880743E-01 + 4362 4.36100E+00 -6.879165E-01 + 4363 4.36200E+00 -6.877588E-01 + 4364 4.36300E+00 -6.876012E-01 + 4365 4.36400E+00 -6.874436E-01 + 4366 4.36500E+00 -6.872861E-01 + 4367 4.36600E+00 -6.871287E-01 + 4368 4.36700E+00 -6.869713E-01 + 4369 4.36800E+00 -6.868140E-01 + 4370 4.36900E+00 -6.866568E-01 + 4371 4.37000E+00 -6.864997E-01 + 4372 4.37100E+00 -6.863426E-01 + 4373 4.37200E+00 -6.861856E-01 + 4374 4.37300E+00 -6.860287E-01 + 4375 4.37400E+00 -6.858719E-01 + 4376 4.37500E+00 -6.857151E-01 + 4377 4.37600E+00 -6.855584E-01 + 4378 4.37700E+00 -6.854018E-01 + 4379 4.37800E+00 -6.852452E-01 + 4380 4.37900E+00 -6.850887E-01 + 4381 4.38000E+00 -6.849323E-01 + 4382 4.38100E+00 -6.847759E-01 + 4383 4.38200E+00 -6.846197E-01 + 4384 4.38300E+00 -6.844635E-01 + 4385 4.38400E+00 -6.843074E-01 + 4386 4.38500E+00 -6.841513E-01 + 4387 4.38600E+00 -6.839953E-01 + 4388 4.38700E+00 -6.838394E-01 + 4389 4.38800E+00 -6.836836E-01 + 4390 4.38900E+00 -6.835278E-01 + 4391 4.39000E+00 -6.833721E-01 + 4392 4.39100E+00 -6.832165E-01 + 4393 4.39200E+00 -6.830609E-01 + 4394 4.39300E+00 -6.829055E-01 + 4395 4.39400E+00 -6.827500E-01 + 4396 4.39500E+00 -6.825947E-01 + 4397 4.39600E+00 -6.824394E-01 + 4398 4.39700E+00 -6.822842E-01 + 4399 4.39800E+00 -6.821291E-01 + 4400 4.39900E+00 -6.819740E-01 + 4401 4.40000E+00 -6.818190E-01 + 4402 4.40100E+00 -6.816641E-01 + 4403 4.40200E+00 -6.815093E-01 + 4404 4.40300E+00 -6.813545E-01 + 4405 4.40400E+00 -6.811998E-01 + 4406 4.40500E+00 -6.810451E-01 + 4407 4.40600E+00 -6.808906E-01 + 4408 4.40700E+00 -6.807360E-01 + 4409 4.40800E+00 -6.805816E-01 + 4410 4.40900E+00 -6.804272E-01 + 4411 4.41000E+00 -6.802729E-01 + 4412 4.41100E+00 -6.801187E-01 + 4413 4.41200E+00 -6.799646E-01 + 4414 4.41300E+00 -6.798105E-01 + 4415 4.41400E+00 -6.796565E-01 + 4416 4.41500E+00 -6.795025E-01 + 4417 4.41600E+00 -6.793486E-01 + 4418 4.41700E+00 -6.791948E-01 + 4419 4.41800E+00 -6.790411E-01 + 4420 4.41900E+00 -6.788874E-01 + 4421 4.42000E+00 -6.787338E-01 + 4422 4.42100E+00 -6.785803E-01 + 4423 4.42200E+00 -6.784268E-01 + 4424 4.42300E+00 -6.782734E-01 + 4425 4.42400E+00 -6.781201E-01 + 4426 4.42500E+00 -6.779668E-01 + 4427 4.42600E+00 -6.778136E-01 + 4428 4.42700E+00 -6.776605E-01 + 4429 4.42800E+00 -6.775075E-01 + 4430 4.42900E+00 -6.773545E-01 + 4431 4.43000E+00 -6.772016E-01 + 4432 4.43100E+00 -6.770488E-01 + 4433 4.43200E+00 -6.768960E-01 + 4434 4.43300E+00 -6.767433E-01 + 4435 4.43400E+00 -6.765907E-01 + 4436 4.43500E+00 -6.764381E-01 + 4437 4.43600E+00 -6.762856E-01 + 4438 4.43700E+00 -6.761332E-01 + 4439 4.43800E+00 -6.759809E-01 + 4440 4.43900E+00 -6.758286E-01 + 4441 4.44000E+00 -6.756764E-01 + 4442 4.44100E+00 -6.755242E-01 + 4443 4.44200E+00 -6.753722E-01 + 4444 4.44300E+00 -6.752202E-01 + 4445 4.44400E+00 -6.750682E-01 + 4446 4.44500E+00 -6.749164E-01 + 4447 4.44600E+00 -6.747646E-01 + 4448 4.44700E+00 -6.746128E-01 + 4449 4.44800E+00 -6.744612E-01 + 4450 4.44900E+00 -6.743096E-01 + 4451 4.45000E+00 -6.741581E-01 + 4452 4.45100E+00 -6.740066E-01 + 4453 4.45200E+00 -6.738552E-01 + 4454 4.45300E+00 -6.737039E-01 + 4455 4.45400E+00 -6.735526E-01 + 4456 4.45500E+00 -6.734014E-01 + 4457 4.45600E+00 -6.732503E-01 + 4458 4.45700E+00 -6.730993E-01 + 4459 4.45800E+00 -6.729483E-01 + 4460 4.45900E+00 -6.727974E-01 + 4461 4.46000E+00 -6.726465E-01 + 4462 4.46100E+00 -6.724957E-01 + 4463 4.46200E+00 -6.723450E-01 + 4464 4.46300E+00 -6.721943E-01 + 4465 4.46400E+00 -6.720438E-01 + 4466 4.46500E+00 -6.718932E-01 + 4467 4.46600E+00 -6.717428E-01 + 4468 4.46700E+00 -6.715924E-01 + 4469 4.46800E+00 -6.714421E-01 + 4470 4.46900E+00 -6.712918E-01 + 4471 4.47000E+00 -6.711416E-01 + 4472 4.47100E+00 -6.709915E-01 + 4473 4.47200E+00 -6.708415E-01 + 4474 4.47300E+00 -6.706915E-01 + 4475 4.47400E+00 -6.705416E-01 + 4476 4.47500E+00 -6.703917E-01 + 4477 4.47600E+00 -6.702419E-01 + 4478 4.47700E+00 -6.700922E-01 + 4479 4.47800E+00 -6.699426E-01 + 4480 4.47900E+00 -6.697930E-01 + 4481 4.48000E+00 -6.696435E-01 + 4482 4.48100E+00 -6.694940E-01 + 4483 4.48200E+00 -6.693447E-01 + 4484 4.48300E+00 -6.691953E-01 + 4485 4.48400E+00 -6.690461E-01 + 4486 4.48500E+00 -6.688969E-01 + 4487 4.48600E+00 -6.687478E-01 + 4488 4.48700E+00 -6.685988E-01 + 4489 4.48800E+00 -6.684498E-01 + 4490 4.48900E+00 -6.683009E-01 + 4491 4.49000E+00 -6.681520E-01 + 4492 4.49100E+00 -6.680033E-01 + 4493 4.49200E+00 -6.678546E-01 + 4494 4.49300E+00 -6.677059E-01 + 4495 4.49400E+00 -6.675573E-01 + 4496 4.49500E+00 -6.674088E-01 + 4497 4.49600E+00 -6.672604E-01 + 4498 4.49700E+00 -6.671120E-01 + 4499 4.49800E+00 -6.669637E-01 + 4500 4.49900E+00 -6.668155E-01 + 4501 4.50000E+00 -6.666673E-01 + 4502 4.50100E+00 -6.665192E-01 + 4503 4.50200E+00 -6.663711E-01 + 4504 4.50300E+00 -6.662232E-01 + 4505 4.50400E+00 -6.660753E-01 + 4506 4.50500E+00 -6.659274E-01 + 4507 4.50600E+00 -6.657796E-01 + 4508 4.50700E+00 -6.656319E-01 + 4509 4.50800E+00 -6.654843E-01 + 4510 4.50900E+00 -6.653367E-01 + 4511 4.51000E+00 -6.651891E-01 + 4512 4.51100E+00 -6.650417E-01 + 4513 4.51200E+00 -6.648943E-01 + 4514 4.51300E+00 -6.647470E-01 + 4515 4.51400E+00 -6.645997E-01 + 4516 4.51500E+00 -6.644525E-01 + 4517 4.51600E+00 -6.643054E-01 + 4518 4.51700E+00 -6.641583E-01 + 4519 4.51800E+00 -6.640113E-01 + 4520 4.51900E+00 -6.638643E-01 + 4521 4.52000E+00 -6.637175E-01 + 4522 4.52100E+00 -6.635706E-01 + 4523 4.52200E+00 -6.634239E-01 + 4524 4.52300E+00 -6.632772E-01 + 4525 4.52400E+00 -6.631306E-01 + 4526 4.52500E+00 -6.629840E-01 + 4527 4.52600E+00 -6.628375E-01 + 4528 4.52700E+00 -6.626911E-01 + 4529 4.52800E+00 -6.625448E-01 + 4530 4.52900E+00 -6.623985E-01 + 4531 4.53000E+00 -6.622522E-01 + 4532 4.53100E+00 -6.621061E-01 + 4533 4.53200E+00 -6.619600E-01 + 4534 4.53300E+00 -6.618139E-01 + 4535 4.53400E+00 -6.616679E-01 + 4536 4.53500E+00 -6.615220E-01 + 4537 4.53600E+00 -6.613762E-01 + 4538 4.53700E+00 -6.612304E-01 + 4539 4.53800E+00 -6.610847E-01 + 4540 4.53900E+00 -6.609391E-01 + 4541 4.54000E+00 -6.607935E-01 + 4542 4.54100E+00 -6.606479E-01 + 4543 4.54200E+00 -6.605025E-01 + 4544 4.54300E+00 -6.603571E-01 + 4545 4.54400E+00 -6.602118E-01 + 4546 4.54500E+00 -6.600665E-01 + 4547 4.54600E+00 -6.599213E-01 + 4548 4.54700E+00 -6.597762E-01 + 4549 4.54800E+00 -6.596311E-01 + 4550 4.54900E+00 -6.594861E-01 + 4551 4.55000E+00 -6.593412E-01 + 4552 4.55100E+00 -6.591963E-01 + 4553 4.55200E+00 -6.590515E-01 + 4554 4.55300E+00 -6.589067E-01 + 4555 4.55400E+00 -6.587621E-01 + 4556 4.55500E+00 -6.586174E-01 + 4557 4.55600E+00 -6.584729E-01 + 4558 4.55700E+00 -6.583284E-01 + 4559 4.55800E+00 -6.581840E-01 + 4560 4.55900E+00 -6.580396E-01 + 4561 4.56000E+00 -6.578953E-01 + 4562 4.56100E+00 -6.577511E-01 + 4563 4.56200E+00 -6.576069E-01 + 4564 4.56300E+00 -6.574628E-01 + 4565 4.56400E+00 -6.573187E-01 + 4566 4.56500E+00 -6.571747E-01 + 4567 4.56600E+00 -6.570308E-01 + 4568 4.56700E+00 -6.568869E-01 + 4569 4.56800E+00 -6.567431E-01 + 4570 4.56900E+00 -6.565994E-01 + 4571 4.57000E+00 -6.564557E-01 + 4572 4.57100E+00 -6.563121E-01 + 4573 4.57200E+00 -6.561686E-01 + 4574 4.57300E+00 -6.560251E-01 + 4575 4.57400E+00 -6.558816E-01 + 4576 4.57500E+00 -6.557383E-01 + 4577 4.57600E+00 -6.555950E-01 + 4578 4.57700E+00 -6.554517E-01 + 4579 4.57800E+00 -6.553085E-01 + 4580 4.57900E+00 -6.551654E-01 + 4581 4.58000E+00 -6.550224E-01 + 4582 4.58100E+00 -6.548794E-01 + 4583 4.58200E+00 -6.547364E-01 + 4584 4.58300E+00 -6.545936E-01 + 4585 4.58400E+00 -6.544508E-01 + 4586 4.58500E+00 -6.543080E-01 + 4587 4.58600E+00 -6.541653E-01 + 4588 4.58700E+00 -6.540227E-01 + 4589 4.58800E+00 -6.538802E-01 + 4590 4.58900E+00 -6.537377E-01 + 4591 4.59000E+00 -6.535952E-01 + 4592 4.59100E+00 -6.534529E-01 + 4593 4.59200E+00 -6.533106E-01 + 4594 4.59300E+00 -6.531683E-01 + 4595 4.59400E+00 -6.530261E-01 + 4596 4.59500E+00 -6.528840E-01 + 4597 4.59600E+00 -6.527419E-01 + 4598 4.59700E+00 -6.525999E-01 + 4599 4.59800E+00 -6.524580E-01 + 4600 4.59900E+00 -6.523161E-01 + 4601 4.60000E+00 -6.521743E-01 + 4602 4.60100E+00 -6.520326E-01 + 4603 4.60200E+00 -6.518909E-01 + 4604 4.60300E+00 -6.517493E-01 + 4605 4.60400E+00 -6.516077E-01 + 4606 4.60500E+00 -6.514662E-01 + 4607 4.60600E+00 -6.513248E-01 + 4608 4.60700E+00 -6.511834E-01 + 4609 4.60800E+00 -6.510421E-01 + 4610 4.60900E+00 -6.509009E-01 + 4611 4.61000E+00 -6.507597E-01 + 4612 4.61100E+00 -6.506185E-01 + 4613 4.61200E+00 -6.504775E-01 + 4614 4.61300E+00 -6.503365E-01 + 4615 4.61400E+00 -6.501955E-01 + 4616 4.61500E+00 -6.500547E-01 + 4617 4.61600E+00 -6.499138E-01 + 4618 4.61700E+00 -6.497731E-01 + 4619 4.61800E+00 -6.496324E-01 + 4620 4.61900E+00 -6.494917E-01 + 4621 4.62000E+00 -6.493512E-01 + 4622 4.62100E+00 -6.492106E-01 + 4623 4.62200E+00 -6.490702E-01 + 4624 4.62300E+00 -6.489298E-01 + 4625 4.62400E+00 -6.487894E-01 + 4626 4.62500E+00 -6.486491E-01 + 4627 4.62600E+00 -6.485089E-01 + 4628 4.62700E+00 -6.483688E-01 + 4629 4.62800E+00 -6.482287E-01 + 4630 4.62900E+00 -6.480886E-01 + 4631 4.63000E+00 -6.479486E-01 + 4632 4.63100E+00 -6.478087E-01 + 4633 4.63200E+00 -6.476689E-01 + 4634 4.63300E+00 -6.475291E-01 + 4635 4.63400E+00 -6.473893E-01 + 4636 4.63500E+00 -6.472496E-01 + 4637 4.63600E+00 -6.471100E-01 + 4638 4.63700E+00 -6.469705E-01 + 4639 4.63800E+00 -6.468310E-01 + 4640 4.63900E+00 -6.466915E-01 + 4641 4.64000E+00 -6.465522E-01 + 4642 4.64100E+00 -6.464128E-01 + 4643 4.64200E+00 -6.462736E-01 + 4644 4.64300E+00 -6.461344E-01 + 4645 4.64400E+00 -6.459952E-01 + 4646 4.64500E+00 -6.458562E-01 + 4647 4.64600E+00 -6.457171E-01 + 4648 4.64700E+00 -6.455782E-01 + 4649 4.64800E+00 -6.454393E-01 + 4650 4.64900E+00 -6.453004E-01 + 4651 4.65000E+00 -6.451617E-01 + 4652 4.65100E+00 -6.450229E-01 + 4653 4.65200E+00 -6.448843E-01 + 4654 4.65300E+00 -6.447457E-01 + 4655 4.65400E+00 -6.446071E-01 + 4656 4.65500E+00 -6.444687E-01 + 4657 4.65600E+00 -6.443302E-01 + 4658 4.65700E+00 -6.441919E-01 + 4659 4.65800E+00 -6.440536E-01 + 4660 4.65900E+00 -6.439154E-01 + 4661 4.66000E+00 -6.437772E-01 + 4662 4.66100E+00 -6.436391E-01 + 4663 4.66200E+00 -6.435010E-01 + 4664 4.66300E+00 -6.433630E-01 + 4665 4.66400E+00 -6.432251E-01 + 4666 4.66500E+00 -6.430872E-01 + 4667 4.66600E+00 -6.429494E-01 + 4668 4.66700E+00 -6.428116E-01 + 4669 4.66800E+00 -6.426739E-01 + 4670 4.66900E+00 -6.425363E-01 + 4671 4.67000E+00 -6.423987E-01 + 4672 4.67100E+00 -6.422612E-01 + 4673 4.67200E+00 -6.421237E-01 + 4674 4.67300E+00 -6.419863E-01 + 4675 4.67400E+00 -6.418489E-01 + 4676 4.67500E+00 -6.417117E-01 + 4677 4.67600E+00 -6.415744E-01 + 4678 4.67700E+00 -6.414372E-01 + 4679 4.67800E+00 -6.413001E-01 + 4680 4.67900E+00 -6.411631E-01 + 4681 4.68000E+00 -6.410261E-01 + 4682 4.68100E+00 -6.408891E-01 + 4683 4.68200E+00 -6.407522E-01 + 4684 4.68300E+00 -6.406154E-01 + 4685 4.68400E+00 -6.404786E-01 + 4686 4.68500E+00 -6.403419E-01 + 4687 4.68600E+00 -6.402053E-01 + 4688 4.68700E+00 -6.400687E-01 + 4689 4.68800E+00 -6.399321E-01 + 4690 4.68900E+00 -6.397957E-01 + 4691 4.69000E+00 -6.396592E-01 + 4692 4.69100E+00 -6.395229E-01 + 4693 4.69200E+00 -6.393866E-01 + 4694 4.69300E+00 -6.392503E-01 + 4695 4.69400E+00 -6.391141E-01 + 4696 4.69500E+00 -6.389780E-01 + 4697 4.69600E+00 -6.388419E-01 + 4698 4.69700E+00 -6.387059E-01 + 4699 4.69800E+00 -6.385700E-01 + 4700 4.69900E+00 -6.384341E-01 + 4701 4.70000E+00 -6.382982E-01 + 4702 4.70100E+00 -6.381624E-01 + 4703 4.70200E+00 -6.380267E-01 + 4704 4.70300E+00 -6.378910E-01 + 4705 4.70400E+00 -6.377554E-01 + 4706 4.70500E+00 -6.376199E-01 + 4707 4.70600E+00 -6.374844E-01 + 4708 4.70700E+00 -6.373489E-01 + 4709 4.70800E+00 -6.372135E-01 + 4710 4.70900E+00 -6.370782E-01 + 4711 4.71000E+00 -6.369430E-01 + 4712 4.71100E+00 -6.368078E-01 + 4713 4.71200E+00 -6.366726E-01 + 4714 4.71300E+00 -6.365375E-01 + 4715 4.71400E+00 -6.364025E-01 + 4716 4.71500E+00 -6.362675E-01 + 4717 4.71600E+00 -6.361326E-01 + 4718 4.71700E+00 -6.359977E-01 + 4719 4.71800E+00 -6.358629E-01 + 4720 4.71900E+00 -6.357282E-01 + 4721 4.72000E+00 -6.355935E-01 + 4722 4.72100E+00 -6.354589E-01 + 4723 4.72200E+00 -6.353243E-01 + 4724 4.72300E+00 -6.351898E-01 + 4725 4.72400E+00 -6.350553E-01 + 4726 4.72500E+00 -6.349209E-01 + 4727 4.72600E+00 -6.347866E-01 + 4728 4.72700E+00 -6.346523E-01 + 4729 4.72800E+00 -6.345181E-01 + 4730 4.72900E+00 -6.343839E-01 + 4731 4.73000E+00 -6.342498E-01 + 4732 4.73100E+00 -6.341158E-01 + 4733 4.73200E+00 -6.339818E-01 + 4734 4.73300E+00 -6.338478E-01 + 4735 4.73400E+00 -6.337139E-01 + 4736 4.73500E+00 -6.335801E-01 + 4737 4.73600E+00 -6.334463E-01 + 4738 4.73700E+00 -6.333126E-01 + 4739 4.73800E+00 -6.331789E-01 + 4740 4.73900E+00 -6.330453E-01 + 4741 4.74000E+00 -6.329118E-01 + 4742 4.74100E+00 -6.327783E-01 + 4743 4.74200E+00 -6.326448E-01 + 4744 4.74300E+00 -6.325114E-01 + 4745 4.74400E+00 -6.323781E-01 + 4746 4.74500E+00 -6.322448E-01 + 4747 4.74600E+00 -6.321116E-01 + 4748 4.74700E+00 -6.319784E-01 + 4749 4.74800E+00 -6.318453E-01 + 4750 4.74900E+00 -6.317123E-01 + 4751 4.75000E+00 -6.315793E-01 + 4752 4.75100E+00 -6.314463E-01 + 4753 4.75200E+00 -6.313134E-01 + 4754 4.75300E+00 -6.311806E-01 + 4755 4.75400E+00 -6.310478E-01 + 4756 4.75500E+00 -6.309151E-01 + 4757 4.75600E+00 -6.307825E-01 + 4758 4.75700E+00 -6.306498E-01 + 4759 4.75800E+00 -6.305173E-01 + 4760 4.75900E+00 -6.303848E-01 + 4761 4.76000E+00 -6.302524E-01 + 4762 4.76100E+00 -6.301200E-01 + 4763 4.76200E+00 -6.299877E-01 + 4764 4.76300E+00 -6.298554E-01 + 4765 4.76400E+00 -6.297232E-01 + 4766 4.76500E+00 -6.295910E-01 + 4767 4.76600E+00 -6.294589E-01 + 4768 4.76700E+00 -6.293269E-01 + 4769 4.76800E+00 -6.291949E-01 + 4770 4.76900E+00 -6.290629E-01 + 4771 4.77000E+00 -6.289310E-01 + 4772 4.77100E+00 -6.287992E-01 + 4773 4.77200E+00 -6.286674E-01 + 4774 4.77300E+00 -6.285357E-01 + 4775 4.77400E+00 -6.284041E-01 + 4776 4.77500E+00 -6.282725E-01 + 4777 4.77600E+00 -6.281409E-01 + 4778 4.77700E+00 -6.280094E-01 + 4779 4.77800E+00 -6.278780E-01 + 4780 4.77900E+00 -6.277466E-01 + 4781 4.78000E+00 -6.276153E-01 + 4782 4.78100E+00 -6.274840E-01 + 4783 4.78200E+00 -6.273528E-01 + 4784 4.78300E+00 -6.272217E-01 + 4785 4.78400E+00 -6.270906E-01 + 4786 4.78500E+00 -6.269595E-01 + 4787 4.78600E+00 -6.268285E-01 + 4788 4.78700E+00 -6.266976E-01 + 4789 4.78800E+00 -6.265667E-01 + 4790 4.78900E+00 -6.264359E-01 + 4791 4.79000E+00 -6.263051E-01 + 4792 4.79100E+00 -6.261744E-01 + 4793 4.79200E+00 -6.260437E-01 + 4794 4.79300E+00 -6.259131E-01 + 4795 4.79400E+00 -6.257825E-01 + 4796 4.79500E+00 -6.256520E-01 + 4797 4.79600E+00 -6.255216E-01 + 4798 4.79700E+00 -6.253912E-01 + 4799 4.79800E+00 -6.252608E-01 + 4800 4.79900E+00 -6.251305E-01 + 4801 4.80000E+00 -6.250003E-01 + 4802 4.80100E+00 -6.248701E-01 + 4803 4.80200E+00 -6.247400E-01 + 4804 4.80300E+00 -6.246099E-01 + 4805 4.80400E+00 -6.244799E-01 + 4806 4.80500E+00 -6.243499E-01 + 4807 4.80600E+00 -6.242200E-01 + 4808 4.80700E+00 -6.240901E-01 + 4809 4.80800E+00 -6.239603E-01 + 4810 4.80900E+00 -6.238306E-01 + 4811 4.81000E+00 -6.237009E-01 + 4812 4.81100E+00 -6.235712E-01 + 4813 4.81200E+00 -6.234416E-01 + 4814 4.81300E+00 -6.233121E-01 + 4815 4.81400E+00 -6.231826E-01 + 4816 4.81500E+00 -6.230532E-01 + 4817 4.81600E+00 -6.229238E-01 + 4818 4.81700E+00 -6.227945E-01 + 4819 4.81800E+00 -6.226652E-01 + 4820 4.81900E+00 -6.225360E-01 + 4821 4.82000E+00 -6.224068E-01 + 4822 4.82100E+00 -6.222777E-01 + 4823 4.82200E+00 -6.221487E-01 + 4824 4.82300E+00 -6.220197E-01 + 4825 4.82400E+00 -6.218907E-01 + 4826 4.82500E+00 -6.217618E-01 + 4827 4.82600E+00 -6.216330E-01 + 4828 4.82700E+00 -6.215042E-01 + 4829 4.82800E+00 -6.213755E-01 + 4830 4.82900E+00 -6.212468E-01 + 4831 4.83000E+00 -6.211182E-01 + 4832 4.83100E+00 -6.209896E-01 + 4833 4.83200E+00 -6.208611E-01 + 4834 4.83300E+00 -6.207326E-01 + 4835 4.83400E+00 -6.206042E-01 + 4836 4.83500E+00 -6.204759E-01 + 4837 4.83600E+00 -6.203476E-01 + 4838 4.83700E+00 -6.202193E-01 + 4839 4.83800E+00 -6.200911E-01 + 4840 4.83900E+00 -6.199630E-01 + 4841 4.84000E+00 -6.198349E-01 + 4842 4.84100E+00 -6.197069E-01 + 4843 4.84200E+00 -6.195789E-01 + 4844 4.84300E+00 -6.194510E-01 + 4845 4.84400E+00 -6.193231E-01 + 4846 4.84500E+00 -6.191953E-01 + 4847 4.84600E+00 -6.190675E-01 + 4848 4.84700E+00 -6.189398E-01 + 4849 4.84800E+00 -6.188121E-01 + 4850 4.84900E+00 -6.186845E-01 + 4851 4.85000E+00 -6.185570E-01 + 4852 4.85100E+00 -6.184294E-01 + 4853 4.85200E+00 -6.183020E-01 + 4854 4.85300E+00 -6.181746E-01 + 4855 4.85400E+00 -6.180472E-01 + 4856 4.85500E+00 -6.179199E-01 + 4857 4.85600E+00 -6.177927E-01 + 4858 4.85700E+00 -6.176655E-01 + 4859 4.85800E+00 -6.175383E-01 + 4860 4.85900E+00 -6.174112E-01 + 4861 4.86000E+00 -6.172842E-01 + 4862 4.86100E+00 -6.171572E-01 + 4863 4.86200E+00 -6.170303E-01 + 4864 4.86300E+00 -6.169034E-01 + 4865 4.86400E+00 -6.167766E-01 + 4866 4.86500E+00 -6.166498E-01 + 4867 4.86600E+00 -6.165230E-01 + 4868 4.86700E+00 -6.163964E-01 + 4869 4.86800E+00 -6.162697E-01 + 4870 4.86900E+00 -6.161432E-01 + 4871 4.87000E+00 -6.160166E-01 + 4872 4.87100E+00 -6.158902E-01 + 4873 4.87200E+00 -6.157637E-01 + 4874 4.87300E+00 -6.156374E-01 + 4875 4.87400E+00 -6.155111E-01 + 4876 4.87500E+00 -6.153848E-01 + 4877 4.87600E+00 -6.152586E-01 + 4878 4.87700E+00 -6.151324E-01 + 4879 4.87800E+00 -6.150063E-01 + 4880 4.87900E+00 -6.148803E-01 + 4881 4.88000E+00 -6.147543E-01 + 4882 4.88100E+00 -6.146283E-01 + 4883 4.88200E+00 -6.145024E-01 + 4884 4.88300E+00 -6.143766E-01 + 4885 4.88400E+00 -6.142508E-01 + 4886 4.88500E+00 -6.141250E-01 + 4887 4.88600E+00 -6.139993E-01 + 4888 4.88700E+00 -6.138737E-01 + 4889 4.88800E+00 -6.137481E-01 + 4890 4.88900E+00 -6.136225E-01 + 4891 4.89000E+00 -6.134971E-01 + 4892 4.89100E+00 -6.133716E-01 + 4893 4.89200E+00 -6.132462E-01 + 4894 4.89300E+00 -6.131209E-01 + 4895 4.89400E+00 -6.129956E-01 + 4896 4.89500E+00 -6.128704E-01 + 4897 4.89600E+00 -6.127452E-01 + 4898 4.89700E+00 -6.126201E-01 + 4899 4.89800E+00 -6.124950E-01 + 4900 4.89900E+00 -6.123700E-01 + 4901 4.90000E+00 -6.122451E-01 + 4902 4.90100E+00 -6.121201E-01 + 4903 4.90200E+00 -6.119953E-01 + 4904 4.90300E+00 -6.118705E-01 + 4905 4.90400E+00 -6.117457E-01 + 4906 4.90500E+00 -6.116210E-01 + 4907 4.90600E+00 -6.114963E-01 + 4908 4.90700E+00 -6.113717E-01 + 4909 4.90800E+00 -6.112472E-01 + 4910 4.90900E+00 -6.111226E-01 + 4911 4.91000E+00 -6.109982E-01 + 4912 4.91100E+00 -6.108738E-01 + 4913 4.91200E+00 -6.107494E-01 + 4914 4.91300E+00 -6.106251E-01 + 4915 4.91400E+00 -6.105008E-01 + 4916 4.91500E+00 -6.103766E-01 + 4917 4.91600E+00 -6.102525E-01 + 4918 4.91700E+00 -6.101283E-01 + 4919 4.91800E+00 -6.100043E-01 + 4920 4.91900E+00 -6.098803E-01 + 4921 4.92000E+00 -6.097563E-01 + 4922 4.92100E+00 -6.096324E-01 + 4923 4.92200E+00 -6.095085E-01 + 4924 4.92300E+00 -6.093847E-01 + 4925 4.92400E+00 -6.092610E-01 + 4926 4.92500E+00 -6.091373E-01 + 4927 4.92600E+00 -6.090136E-01 + 4928 4.92700E+00 -6.088900E-01 + 4929 4.92800E+00 -6.087664E-01 + 4930 4.92900E+00 -6.086429E-01 + 4931 4.93000E+00 -6.085194E-01 + 4932 4.93100E+00 -6.083960E-01 + 4933 4.93200E+00 -6.082727E-01 + 4934 4.93300E+00 -6.081494E-01 + 4935 4.93400E+00 -6.080261E-01 + 4936 4.93500E+00 -6.079029E-01 + 4937 4.93600E+00 -6.077797E-01 + 4938 4.93700E+00 -6.076566E-01 + 4939 4.93800E+00 -6.075335E-01 + 4940 4.93900E+00 -6.074105E-01 + 4941 4.94000E+00 -6.072876E-01 + 4942 4.94100E+00 -6.071647E-01 + 4943 4.94200E+00 -6.070418E-01 + 4944 4.94300E+00 -6.069190E-01 + 4945 4.94400E+00 -6.067962E-01 + 4946 4.94500E+00 -6.066735E-01 + 4947 4.94600E+00 -6.065508E-01 + 4948 4.94700E+00 -6.064282E-01 + 4949 4.94800E+00 -6.063057E-01 + 4950 4.94900E+00 -6.061832E-01 + 4951 4.95000E+00 -6.060607E-01 + 4952 4.95100E+00 -6.059383E-01 + 4953 4.95200E+00 -6.058159E-01 + 4954 4.95300E+00 -6.056936E-01 + 4955 4.95400E+00 -6.055713E-01 + 4956 4.95500E+00 -6.054491E-01 + 4957 4.95600E+00 -6.053270E-01 + 4958 4.95700E+00 -6.052049E-01 + 4959 4.95800E+00 -6.050828E-01 + 4960 4.95900E+00 -6.049608E-01 + 4961 4.96000E+00 -6.048388E-01 + 4962 4.96100E+00 -6.047169E-01 + 4963 4.96200E+00 -6.045951E-01 + 4964 4.96300E+00 -6.044732E-01 + 4965 4.96400E+00 -6.043515E-01 + 4966 4.96500E+00 -6.042298E-01 + 4967 4.96600E+00 -6.041081E-01 + 4968 4.96700E+00 -6.039865E-01 + 4969 4.96800E+00 -6.038649E-01 + 4970 4.96900E+00 -6.037434E-01 + 4971 4.97000E+00 -6.036219E-01 + 4972 4.97100E+00 -6.035005E-01 + 4973 4.97200E+00 -6.033791E-01 + 4974 4.97300E+00 -6.032578E-01 + 4975 4.97400E+00 -6.031365E-01 + 4976 4.97500E+00 -6.030153E-01 + 4977 4.97600E+00 -6.028941E-01 + 4978 4.97700E+00 -6.027729E-01 + 4979 4.97800E+00 -6.026518E-01 + 4980 4.97900E+00 -6.025308E-01 + 4981 4.98000E+00 -6.024098E-01 + 4982 4.98100E+00 -6.022889E-01 + 4983 4.98200E+00 -6.021680E-01 + 4984 4.98300E+00 -6.020471E-01 + 4985 4.98400E+00 -6.019263E-01 + 4986 4.98500E+00 -6.018056E-01 + 4987 4.98600E+00 -6.016849E-01 + 4988 4.98700E+00 -6.015642E-01 + 4989 4.98800E+00 -6.014436E-01 + 4990 4.98900E+00 -6.013230E-01 + 4991 4.99000E+00 -6.012025E-01 + 4992 4.99100E+00 -6.010821E-01 + 4993 4.99200E+00 -6.009617E-01 + 4994 4.99300E+00 -6.008413E-01 + 4995 4.99400E+00 -6.007210E-01 + 4996 4.99500E+00 -6.006007E-01 + 4997 4.99600E+00 -6.004805E-01 + 4998 4.99700E+00 -6.003603E-01 + 4999 4.99800E+00 -6.002402E-01 + 5000 4.99900E+00 -6.001201E-01 + 5001 5.00000E+00 -6.000001E-01 + 5002 5.00100E+00 -5.998801E-01 + 5003 5.00200E+00 -5.997602E-01 + 5004 5.00300E+00 -5.996403E-01 + 5005 5.00400E+00 -5.995205E-01 + 5006 5.00500E+00 -5.994007E-01 + 5007 5.00600E+00 -5.992809E-01 + 5008 5.00700E+00 -5.991612E-01 + 5009 5.00800E+00 -5.990416E-01 + 5010 5.00900E+00 -5.989220E-01 + 5011 5.01000E+00 -5.988025E-01 + 5012 5.01100E+00 -5.986830E-01 + 5013 5.01200E+00 -5.985635E-01 + 5014 5.01300E+00 -5.984441E-01 + 5015 5.01400E+00 -5.983247E-01 + 5016 5.01500E+00 -5.982054E-01 + 5017 5.01600E+00 -5.980862E-01 + 5018 5.01700E+00 -5.979670E-01 + 5019 5.01800E+00 -5.978478E-01 + 5020 5.01900E+00 -5.977287E-01 + 5021 5.02000E+00 -5.976096E-01 + 5022 5.02100E+00 -5.974906E-01 + 5023 5.02200E+00 -5.973717E-01 + 5024 5.02300E+00 -5.972527E-01 + 5025 5.02400E+00 -5.971339E-01 + 5026 5.02500E+00 -5.970150E-01 + 5027 5.02600E+00 -5.968963E-01 + 5028 5.02700E+00 -5.967775E-01 + 5029 5.02800E+00 -5.966588E-01 + 5030 5.02900E+00 -5.965402E-01 + 5031 5.03000E+00 -5.964216E-01 + 5032 5.03100E+00 -5.963031E-01 + 5033 5.03200E+00 -5.961846E-01 + 5034 5.03300E+00 -5.960661E-01 + 5035 5.03400E+00 -5.959477E-01 + 5036 5.03500E+00 -5.958293E-01 + 5037 5.03600E+00 -5.957110E-01 + 5038 5.03700E+00 -5.955928E-01 + 5039 5.03800E+00 -5.954745E-01 + 5040 5.03900E+00 -5.953564E-01 + 5041 5.04000E+00 -5.952382E-01 + 5042 5.04100E+00 -5.951202E-01 + 5043 5.04200E+00 -5.950021E-01 + 5044 5.04300E+00 -5.948841E-01 + 5045 5.04400E+00 -5.947662E-01 + 5046 5.04500E+00 -5.946483E-01 + 5047 5.04600E+00 -5.945304E-01 + 5048 5.04700E+00 -5.944126E-01 + 5049 5.04800E+00 -5.942949E-01 + 5050 5.04900E+00 -5.941772E-01 + 5051 5.05000E+00 -5.940595E-01 + 5052 5.05100E+00 -5.939419E-01 + 5053 5.05200E+00 -5.938243E-01 + 5054 5.05300E+00 -5.937068E-01 + 5055 5.05400E+00 -5.935893E-01 + 5056 5.05500E+00 -5.934719E-01 + 5057 5.05600E+00 -5.933545E-01 + 5058 5.05700E+00 -5.932372E-01 + 5059 5.05800E+00 -5.931199E-01 + 5060 5.05900E+00 -5.930026E-01 + 5061 5.06000E+00 -5.928854E-01 + 5062 5.06100E+00 -5.927683E-01 + 5063 5.06200E+00 -5.926512E-01 + 5064 5.06300E+00 -5.925341E-01 + 5065 5.06400E+00 -5.924171E-01 + 5066 5.06500E+00 -5.923001E-01 + 5067 5.06600E+00 -5.921832E-01 + 5068 5.06700E+00 -5.920664E-01 + 5069 5.06800E+00 -5.919495E-01 + 5070 5.06900E+00 -5.918327E-01 + 5071 5.07000E+00 -5.917160E-01 + 5072 5.07100E+00 -5.915993E-01 + 5073 5.07200E+00 -5.914827E-01 + 5074 5.07300E+00 -5.913661E-01 + 5075 5.07400E+00 -5.912495E-01 + 5076 5.07500E+00 -5.911330E-01 + 5077 5.07600E+00 -5.910166E-01 + 5078 5.07700E+00 -5.909002E-01 + 5079 5.07800E+00 -5.907838E-01 + 5080 5.07900E+00 -5.906675E-01 + 5081 5.08000E+00 -5.905512E-01 + 5082 5.08100E+00 -5.904350E-01 + 5083 5.08200E+00 -5.903188E-01 + 5084 5.08300E+00 -5.902027E-01 + 5085 5.08400E+00 -5.900866E-01 + 5086 5.08500E+00 -5.899706E-01 + 5087 5.08600E+00 -5.898546E-01 + 5088 5.08700E+00 -5.897386E-01 + 5089 5.08800E+00 -5.896227E-01 + 5090 5.08900E+00 -5.895069E-01 + 5091 5.09000E+00 -5.893911E-01 + 5092 5.09100E+00 -5.892753E-01 + 5093 5.09200E+00 -5.891596E-01 + 5094 5.09300E+00 -5.890439E-01 + 5095 5.09400E+00 -5.889283E-01 + 5096 5.09500E+00 -5.888127E-01 + 5097 5.09600E+00 -5.886971E-01 + 5098 5.09700E+00 -5.885816E-01 + 5099 5.09800E+00 -5.884662E-01 + 5100 5.09900E+00 -5.883508E-01 + 5101 5.10000E+00 -5.882354E-01 + 5102 5.10100E+00 -5.881201E-01 + 5103 5.10200E+00 -5.880048E-01 + 5104 5.10300E+00 -5.878896E-01 + 5105 5.10400E+00 -5.877744E-01 + 5106 5.10500E+00 -5.876593E-01 + 5107 5.10600E+00 -5.875442E-01 + 5108 5.10700E+00 -5.874291E-01 + 5109 5.10800E+00 -5.873141E-01 + 5110 5.10900E+00 -5.871992E-01 + 5111 5.11000E+00 -5.870842E-01 + 5112 5.11100E+00 -5.869694E-01 + 5113 5.11200E+00 -5.868545E-01 + 5114 5.11300E+00 -5.867398E-01 + 5115 5.11400E+00 -5.866250E-01 + 5116 5.11500E+00 -5.865103E-01 + 5117 5.11600E+00 -5.863957E-01 + 5118 5.11700E+00 -5.862811E-01 + 5119 5.11800E+00 -5.861665E-01 + 5120 5.11900E+00 -5.860520E-01 + 5121 5.12000E+00 -5.859376E-01 + 5122 5.12100E+00 -5.858231E-01 + 5123 5.12200E+00 -5.857088E-01 + 5124 5.12300E+00 -5.855944E-01 + 5125 5.12400E+00 -5.854801E-01 + 5126 5.12500E+00 -5.853659E-01 + 5127 5.12600E+00 -5.852517E-01 + 5128 5.12700E+00 -5.851375E-01 + 5129 5.12800E+00 -5.850234E-01 + 5130 5.12900E+00 -5.849094E-01 + 5131 5.13000E+00 -5.847953E-01 + 5132 5.13100E+00 -5.846814E-01 + 5133 5.13200E+00 -5.845674E-01 + 5134 5.13300E+00 -5.844535E-01 + 5135 5.13400E+00 -5.843397E-01 + 5136 5.13500E+00 -5.842259E-01 + 5137 5.13600E+00 -5.841122E-01 + 5138 5.13700E+00 -5.839985E-01 + 5139 5.13800E+00 -5.838848E-01 + 5140 5.13900E+00 -5.837712E-01 + 5141 5.14000E+00 -5.836576E-01 + 5142 5.14100E+00 -5.835441E-01 + 5143 5.14200E+00 -5.834306E-01 + 5144 5.14300E+00 -5.833172E-01 + 5145 5.14400E+00 -5.832038E-01 + 5146 5.14500E+00 -5.830904E-01 + 5147 5.14600E+00 -5.829771E-01 + 5148 5.14700E+00 -5.828639E-01 + 5149 5.14800E+00 -5.827506E-01 + 5150 5.14900E+00 -5.826375E-01 + 5151 5.15000E+00 -5.825243E-01 + 5152 5.15100E+00 -5.824113E-01 + 5153 5.15200E+00 -5.822982E-01 + 5154 5.15300E+00 -5.821852E-01 + 5155 5.15400E+00 -5.820723E-01 + 5156 5.15500E+00 -5.819594E-01 + 5157 5.15600E+00 -5.818465E-01 + 5158 5.15700E+00 -5.817337E-01 + 5159 5.15800E+00 -5.816209E-01 + 5160 5.15900E+00 -5.815081E-01 + 5161 5.16000E+00 -5.813955E-01 + 5162 5.16100E+00 -5.812828E-01 + 5163 5.16200E+00 -5.811702E-01 + 5164 5.16300E+00 -5.810576E-01 + 5165 5.16400E+00 -5.809451E-01 + 5166 5.16500E+00 -5.808326E-01 + 5167 5.16600E+00 -5.807202E-01 + 5168 5.16700E+00 -5.806078E-01 + 5169 5.16800E+00 -5.804954E-01 + 5170 5.16900E+00 -5.803831E-01 + 5171 5.17000E+00 -5.802709E-01 + 5172 5.17100E+00 -5.801587E-01 + 5173 5.17200E+00 -5.800465E-01 + 5174 5.17300E+00 -5.799343E-01 + 5175 5.17400E+00 -5.798223E-01 + 5176 5.17500E+00 -5.797102E-01 + 5177 5.17600E+00 -5.795982E-01 + 5178 5.17700E+00 -5.794862E-01 + 5179 5.17800E+00 -5.793743E-01 + 5180 5.17900E+00 -5.792625E-01 + 5181 5.18000E+00 -5.791506E-01 + 5182 5.18100E+00 -5.790388E-01 + 5183 5.18200E+00 -5.789271E-01 + 5184 5.18300E+00 -5.788154E-01 + 5185 5.18400E+00 -5.787037E-01 + 5186 5.18500E+00 -5.785921E-01 + 5187 5.18600E+00 -5.784805E-01 + 5188 5.18700E+00 -5.783690E-01 + 5189 5.18800E+00 -5.782575E-01 + 5190 5.18900E+00 -5.781461E-01 + 5191 5.19000E+00 -5.780347E-01 + 5192 5.19100E+00 -5.779233E-01 + 5193 5.19200E+00 -5.778120E-01 + 5194 5.19300E+00 -5.777007E-01 + 5195 5.19400E+00 -5.775895E-01 + 5196 5.19500E+00 -5.774783E-01 + 5197 5.19600E+00 -5.773672E-01 + 5198 5.19700E+00 -5.772561E-01 + 5199 5.19800E+00 -5.771450E-01 + 5200 5.19900E+00 -5.770340E-01 + 5201 5.20000E+00 -5.769231E-01 + 5202 5.20100E+00 -5.768121E-01 + 5203 5.20200E+00 -5.767013E-01 + 5204 5.20300E+00 -5.765904E-01 + 5205 5.20400E+00 -5.764796E-01 + 5206 5.20500E+00 -5.763689E-01 + 5207 5.20600E+00 -5.762582E-01 + 5208 5.20700E+00 -5.761475E-01 + 5209 5.20800E+00 -5.760369E-01 + 5210 5.20900E+00 -5.759263E-01 + 5211 5.21000E+00 -5.758158E-01 + 5212 5.21100E+00 -5.757053E-01 + 5213 5.21200E+00 -5.755948E-01 + 5214 5.21300E+00 -5.754844E-01 + 5215 5.21400E+00 -5.753741E-01 + 5216 5.21500E+00 -5.752637E-01 + 5217 5.21600E+00 -5.751534E-01 + 5218 5.21700E+00 -5.750432E-01 + 5219 5.21800E+00 -5.749330E-01 + 5220 5.21900E+00 -5.748228E-01 + 5221 5.22000E+00 -5.747127E-01 + 5222 5.22100E+00 -5.746027E-01 + 5223 5.22200E+00 -5.744926E-01 + 5224 5.22300E+00 -5.743826E-01 + 5225 5.22400E+00 -5.742727E-01 + 5226 5.22500E+00 -5.741628E-01 + 5227 5.22600E+00 -5.740529E-01 + 5228 5.22700E+00 -5.739431E-01 + 5229 5.22800E+00 -5.738333E-01 + 5230 5.22900E+00 -5.737235E-01 + 5231 5.23000E+00 -5.736138E-01 + 5232 5.23100E+00 -5.735042E-01 + 5233 5.23200E+00 -5.733946E-01 + 5234 5.23300E+00 -5.732850E-01 + 5235 5.23400E+00 -5.731755E-01 + 5236 5.23500E+00 -5.730660E-01 + 5237 5.23600E+00 -5.729565E-01 + 5238 5.23700E+00 -5.728471E-01 + 5239 5.23800E+00 -5.727377E-01 + 5240 5.23900E+00 -5.726284E-01 + 5241 5.24000E+00 -5.725191E-01 + 5242 5.24100E+00 -5.724099E-01 + 5243 5.24200E+00 -5.723007E-01 + 5244 5.24300E+00 -5.721915E-01 + 5245 5.24400E+00 -5.720824E-01 + 5246 5.24500E+00 -5.719733E-01 + 5247 5.24600E+00 -5.718643E-01 + 5248 5.24700E+00 -5.717553E-01 + 5249 5.24800E+00 -5.716464E-01 + 5250 5.24900E+00 -5.715374E-01 + 5251 5.25000E+00 -5.714286E-01 + 5252 5.25100E+00 -5.713198E-01 + 5253 5.25200E+00 -5.712110E-01 + 5254 5.25300E+00 -5.711022E-01 + 5255 5.25400E+00 -5.709935E-01 + 5256 5.25500E+00 -5.708849E-01 + 5257 5.25600E+00 -5.707762E-01 + 5258 5.25700E+00 -5.706677E-01 + 5259 5.25800E+00 -5.705591E-01 + 5260 5.25900E+00 -5.704506E-01 + 5261 5.26000E+00 -5.703422E-01 + 5262 5.26100E+00 -5.702338E-01 + 5263 5.26200E+00 -5.701254E-01 + 5264 5.26300E+00 -5.700171E-01 + 5265 5.26400E+00 -5.699088E-01 + 5266 5.26500E+00 -5.698006E-01 + 5267 5.26600E+00 -5.696924E-01 + 5268 5.26700E+00 -5.695842E-01 + 5269 5.26800E+00 -5.694761E-01 + 5270 5.26900E+00 -5.693680E-01 + 5271 5.27000E+00 -5.692600E-01 + 5272 5.27100E+00 -5.691520E-01 + 5273 5.27200E+00 -5.690440E-01 + 5274 5.27300E+00 -5.689361E-01 + 5275 5.27400E+00 -5.688282E-01 + 5276 5.27500E+00 -5.687204E-01 + 5277 5.27600E+00 -5.686126E-01 + 5278 5.27700E+00 -5.685049E-01 + 5279 5.27800E+00 -5.683972E-01 + 5280 5.27900E+00 -5.682895E-01 + 5281 5.28000E+00 -5.681819E-01 + 5282 5.28100E+00 -5.680743E-01 + 5283 5.28200E+00 -5.679667E-01 + 5284 5.28300E+00 -5.678592E-01 + 5285 5.28400E+00 -5.677518E-01 + 5286 5.28500E+00 -5.676444E-01 + 5287 5.28600E+00 -5.675370E-01 + 5288 5.28700E+00 -5.674296E-01 + 5289 5.28800E+00 -5.673223E-01 + 5290 5.28900E+00 -5.672151E-01 + 5291 5.29000E+00 -5.671078E-01 + 5292 5.29100E+00 -5.670006E-01 + 5293 5.29200E+00 -5.668935E-01 + 5294 5.29300E+00 -5.667864E-01 + 5295 5.29400E+00 -5.666793E-01 + 5296 5.29500E+00 -5.665723E-01 + 5297 5.29600E+00 -5.664653E-01 + 5298 5.29700E+00 -5.663584E-01 + 5299 5.29800E+00 -5.662515E-01 + 5300 5.29900E+00 -5.661446E-01 + 5301 5.30000E+00 -5.660378E-01 + 5302 5.30100E+00 -5.659310E-01 + 5303 5.30200E+00 -5.658243E-01 + 5304 5.30300E+00 -5.657176E-01 + 5305 5.30400E+00 -5.656109E-01 + 5306 5.30500E+00 -5.655043E-01 + 5307 5.30600E+00 -5.653977E-01 + 5308 5.30700E+00 -5.652912E-01 + 5309 5.30800E+00 -5.651847E-01 + 5310 5.30900E+00 -5.650782E-01 + 5311 5.31000E+00 -5.649718E-01 + 5312 5.31100E+00 -5.648654E-01 + 5313 5.31200E+00 -5.647590E-01 + 5314 5.31300E+00 -5.646527E-01 + 5315 5.31400E+00 -5.645465E-01 + 5316 5.31500E+00 -5.644403E-01 + 5317 5.31600E+00 -5.643341E-01 + 5318 5.31700E+00 -5.642279E-01 + 5319 5.31800E+00 -5.641218E-01 + 5320 5.31900E+00 -5.640158E-01 + 5321 5.32000E+00 -5.639098E-01 + 5322 5.32100E+00 -5.638038E-01 + 5323 5.32200E+00 -5.636978E-01 + 5324 5.32300E+00 -5.635919E-01 + 5325 5.32400E+00 -5.634861E-01 + 5326 5.32500E+00 -5.633803E-01 + 5327 5.32600E+00 -5.632745E-01 + 5328 5.32700E+00 -5.631687E-01 + 5329 5.32800E+00 -5.630630E-01 + 5330 5.32900E+00 -5.629574E-01 + 5331 5.33000E+00 -5.628518E-01 + 5332 5.33100E+00 -5.627462E-01 + 5333 5.33200E+00 -5.626406E-01 + 5334 5.33300E+00 -5.625351E-01 + 5335 5.33400E+00 -5.624297E-01 + 5336 5.33500E+00 -5.623243E-01 + 5337 5.33600E+00 -5.622189E-01 + 5338 5.33700E+00 -5.621135E-01 + 5339 5.33800E+00 -5.620082E-01 + 5340 5.33900E+00 -5.619030E-01 + 5341 5.34000E+00 -5.617978E-01 + 5342 5.34100E+00 -5.616926E-01 + 5343 5.34200E+00 -5.615874E-01 + 5344 5.34300E+00 -5.614823E-01 + 5345 5.34400E+00 -5.613773E-01 + 5346 5.34500E+00 -5.612723E-01 + 5347 5.34600E+00 -5.611673E-01 + 5348 5.34700E+00 -5.610623E-01 + 5349 5.34800E+00 -5.609574E-01 + 5350 5.34900E+00 -5.608526E-01 + 5351 5.35000E+00 -5.607477E-01 + 5352 5.35100E+00 -5.606429E-01 + 5353 5.35200E+00 -5.605382E-01 + 5354 5.35300E+00 -5.604335E-01 + 5355 5.35400E+00 -5.603288E-01 + 5356 5.35500E+00 -5.602242E-01 + 5357 5.35600E+00 -5.601196E-01 + 5358 5.35700E+00 -5.600150E-01 + 5359 5.35800E+00 -5.599105E-01 + 5360 5.35900E+00 -5.598060E-01 + 5361 5.36000E+00 -5.597015E-01 + 5362 5.36100E+00 -5.595971E-01 + 5363 5.36200E+00 -5.594928E-01 + 5364 5.36300E+00 -5.593884E-01 + 5365 5.36400E+00 -5.592842E-01 + 5366 5.36500E+00 -5.591799E-01 + 5367 5.36600E+00 -5.590757E-01 + 5368 5.36700E+00 -5.589715E-01 + 5369 5.36800E+00 -5.588674E-01 + 5370 5.36900E+00 -5.587633E-01 + 5371 5.37000E+00 -5.586592E-01 + 5372 5.37100E+00 -5.585552E-01 + 5373 5.37200E+00 -5.584512E-01 + 5374 5.37300E+00 -5.583473E-01 + 5375 5.37400E+00 -5.582434E-01 + 5376 5.37500E+00 -5.581395E-01 + 5377 5.37600E+00 -5.580357E-01 + 5378 5.37700E+00 -5.579319E-01 + 5379 5.37800E+00 -5.578282E-01 + 5380 5.37900E+00 -5.577245E-01 + 5381 5.38000E+00 -5.576208E-01 + 5382 5.38100E+00 -5.575172E-01 + 5383 5.38200E+00 -5.574136E-01 + 5384 5.38300E+00 -5.573100E-01 + 5385 5.38400E+00 -5.572065E-01 + 5386 5.38500E+00 -5.571030E-01 + 5387 5.38600E+00 -5.569996E-01 + 5388 5.38700E+00 -5.568962E-01 + 5389 5.38800E+00 -5.567928E-01 + 5390 5.38900E+00 -5.566895E-01 + 5391 5.39000E+00 -5.565862E-01 + 5392 5.39100E+00 -5.564830E-01 + 5393 5.39200E+00 -5.563798E-01 + 5394 5.39300E+00 -5.562766E-01 + 5395 5.39400E+00 -5.561735E-01 + 5396 5.39500E+00 -5.560704E-01 + 5397 5.39600E+00 -5.559673E-01 + 5398 5.39700E+00 -5.558643E-01 + 5399 5.39800E+00 -5.557614E-01 + 5400 5.39900E+00 -5.556584E-01 + 5401 5.40000E+00 -5.555555E-01 + 5402 5.40100E+00 -5.554527E-01 + 5403 5.40200E+00 -5.553498E-01 + 5404 5.40300E+00 -5.552471E-01 + 5405 5.40400E+00 -5.551443E-01 + 5406 5.40500E+00 -5.550416E-01 + 5407 5.40600E+00 -5.549390E-01 + 5408 5.40700E+00 -5.548363E-01 + 5409 5.40800E+00 -5.547337E-01 + 5410 5.40900E+00 -5.546312E-01 + 5411 5.41000E+00 -5.545287E-01 + 5412 5.41100E+00 -5.544262E-01 + 5413 5.41200E+00 -5.543238E-01 + 5414 5.41300E+00 -5.542214E-01 + 5415 5.41400E+00 -5.541190E-01 + 5416 5.41500E+00 -5.540167E-01 + 5417 5.41600E+00 -5.539144E-01 + 5418 5.41700E+00 -5.538121E-01 + 5419 5.41800E+00 -5.537099E-01 + 5420 5.41900E+00 -5.536077E-01 + 5421 5.42000E+00 -5.535056E-01 + 5422 5.42100E+00 -5.534035E-01 + 5423 5.42200E+00 -5.533014E-01 + 5424 5.42300E+00 -5.531994E-01 + 5425 5.42400E+00 -5.530974E-01 + 5426 5.42500E+00 -5.529954E-01 + 5427 5.42600E+00 -5.528935E-01 + 5428 5.42700E+00 -5.527916E-01 + 5429 5.42800E+00 -5.526898E-01 + 5430 5.42900E+00 -5.525880E-01 + 5431 5.43000E+00 -5.524862E-01 + 5432 5.43100E+00 -5.523845E-01 + 5433 5.43200E+00 -5.522828E-01 + 5434 5.43300E+00 -5.521811E-01 + 5435 5.43400E+00 -5.520795E-01 + 5436 5.43500E+00 -5.519779E-01 + 5437 5.43600E+00 -5.518764E-01 + 5438 5.43700E+00 -5.517749E-01 + 5439 5.43800E+00 -5.516734E-01 + 5440 5.43900E+00 -5.515720E-01 + 5441 5.44000E+00 -5.514706E-01 + 5442 5.44100E+00 -5.513692E-01 + 5443 5.44200E+00 -5.512679E-01 + 5444 5.44300E+00 -5.511666E-01 + 5445 5.44400E+00 -5.510654E-01 + 5446 5.44500E+00 -5.509642E-01 + 5447 5.44600E+00 -5.508630E-01 + 5448 5.44700E+00 -5.507619E-01 + 5449 5.44800E+00 -5.506608E-01 + 5450 5.44900E+00 -5.505597E-01 + 5451 5.45000E+00 -5.504587E-01 + 5452 5.45100E+00 -5.503577E-01 + 5453 5.45200E+00 -5.502567E-01 + 5454 5.45300E+00 -5.501558E-01 + 5455 5.45400E+00 -5.500550E-01 + 5456 5.45500E+00 -5.499541E-01 + 5457 5.45600E+00 -5.498533E-01 + 5458 5.45700E+00 -5.497526E-01 + 5459 5.45800E+00 -5.496518E-01 + 5460 5.45900E+00 -5.495511E-01 + 5461 5.46000E+00 -5.494505E-01 + 5462 5.46100E+00 -5.493499E-01 + 5463 5.46200E+00 -5.492493E-01 + 5464 5.46300E+00 -5.491488E-01 + 5465 5.46400E+00 -5.490483E-01 + 5466 5.46500E+00 -5.489478E-01 + 5467 5.46600E+00 -5.488474E-01 + 5468 5.46700E+00 -5.487470E-01 + 5469 5.46800E+00 -5.486466E-01 + 5470 5.46900E+00 -5.485463E-01 + 5471 5.47000E+00 -5.484460E-01 + 5472 5.47100E+00 -5.483458E-01 + 5473 5.47200E+00 -5.482456E-01 + 5474 5.47300E+00 -5.481454E-01 + 5475 5.47400E+00 -5.480453E-01 + 5476 5.47500E+00 -5.479452E-01 + 5477 5.47600E+00 -5.478452E-01 + 5478 5.47700E+00 -5.477451E-01 + 5479 5.47800E+00 -5.476452E-01 + 5480 5.47900E+00 -5.475452E-01 + 5481 5.48000E+00 -5.474453E-01 + 5482 5.48100E+00 -5.473454E-01 + 5483 5.48200E+00 -5.472456E-01 + 5484 5.48300E+00 -5.471458E-01 + 5485 5.48400E+00 -5.470460E-01 + 5486 5.48500E+00 -5.469463E-01 + 5487 5.48600E+00 -5.468466E-01 + 5488 5.48700E+00 -5.467469E-01 + 5489 5.48800E+00 -5.466473E-01 + 5490 5.48900E+00 -5.465477E-01 + 5491 5.49000E+00 -5.464481E-01 + 5492 5.49100E+00 -5.463486E-01 + 5493 5.49200E+00 -5.462491E-01 + 5494 5.49300E+00 -5.461497E-01 + 5495 5.49400E+00 -5.460503E-01 + 5496 5.49500E+00 -5.459509E-01 + 5497 5.49600E+00 -5.458516E-01 + 5498 5.49700E+00 -5.457523E-01 + 5499 5.49800E+00 -5.456530E-01 + 5500 5.49900E+00 -5.455538E-01 + 5501 5.50000E+00 -5.454546E-01 + 5502 5.50100E+00 -5.453554E-01 + 5503 5.50200E+00 -5.452563E-01 + 5504 5.50300E+00 -5.451572E-01 + 5505 5.50400E+00 -5.450581E-01 + 5506 5.50500E+00 -5.449591E-01 + 5507 5.50600E+00 -5.448601E-01 + 5508 5.50700E+00 -5.447612E-01 + 5509 5.50800E+00 -5.446623E-01 + 5510 5.50900E+00 -5.445634E-01 + 5511 5.51000E+00 -5.444646E-01 + 5512 5.51100E+00 -5.443658E-01 + 5513 5.51200E+00 -5.442670E-01 + 5514 5.51300E+00 -5.441683E-01 + 5515 5.51400E+00 -5.440696E-01 + 5516 5.51500E+00 -5.439710E-01 + 5517 5.51600E+00 -5.438723E-01 + 5518 5.51700E+00 -5.437737E-01 + 5519 5.51800E+00 -5.436752E-01 + 5520 5.51900E+00 -5.435767E-01 + 5521 5.52000E+00 -5.434782E-01 + 5522 5.52100E+00 -5.433798E-01 + 5523 5.52200E+00 -5.432814E-01 + 5524 5.52300E+00 -5.431830E-01 + 5525 5.52400E+00 -5.430847E-01 + 5526 5.52500E+00 -5.429864E-01 + 5527 5.52600E+00 -5.428881E-01 + 5528 5.52700E+00 -5.427899E-01 + 5529 5.52800E+00 -5.426917E-01 + 5530 5.52900E+00 -5.425935E-01 + 5531 5.53000E+00 -5.424954E-01 + 5532 5.53100E+00 -5.423973E-01 + 5533 5.53200E+00 -5.422993E-01 + 5534 5.53300E+00 -5.422013E-01 + 5535 5.53400E+00 -5.421033E-01 + 5536 5.53500E+00 -5.420054E-01 + 5537 5.53600E+00 -5.419075E-01 + 5538 5.53700E+00 -5.418096E-01 + 5539 5.53800E+00 -5.417118E-01 + 5540 5.53900E+00 -5.416140E-01 + 5541 5.54000E+00 -5.415162E-01 + 5542 5.54100E+00 -5.414185E-01 + 5543 5.54200E+00 -5.413208E-01 + 5544 5.54300E+00 -5.412232E-01 + 5545 5.54400E+00 -5.411256E-01 + 5546 5.54500E+00 -5.410280E-01 + 5547 5.54600E+00 -5.409304E-01 + 5548 5.54700E+00 -5.408329E-01 + 5549 5.54800E+00 -5.407354E-01 + 5550 5.54900E+00 -5.406380E-01 + 5551 5.55000E+00 -5.405406E-01 + 5552 5.55100E+00 -5.404432E-01 + 5553 5.55200E+00 -5.403459E-01 + 5554 5.55300E+00 -5.402486E-01 + 5555 5.55400E+00 -5.401513E-01 + 5556 5.55500E+00 -5.400540E-01 + 5557 5.55600E+00 -5.399568E-01 + 5558 5.55700E+00 -5.398597E-01 + 5559 5.55800E+00 -5.397625E-01 + 5560 5.55900E+00 -5.396654E-01 + 5561 5.56000E+00 -5.395684E-01 + 5562 5.56100E+00 -5.394713E-01 + 5563 5.56200E+00 -5.393744E-01 + 5564 5.56300E+00 -5.392774E-01 + 5565 5.56400E+00 -5.391805E-01 + 5566 5.56500E+00 -5.390836E-01 + 5567 5.56600E+00 -5.389867E-01 + 5568 5.56700E+00 -5.388899E-01 + 5569 5.56800E+00 -5.387931E-01 + 5570 5.56900E+00 -5.386964E-01 + 5571 5.57000E+00 -5.385996E-01 + 5572 5.57100E+00 -5.385030E-01 + 5573 5.57200E+00 -5.384063E-01 + 5574 5.57300E+00 -5.383097E-01 + 5575 5.57400E+00 -5.382131E-01 + 5576 5.57500E+00 -5.381166E-01 + 5577 5.57600E+00 -5.380201E-01 + 5578 5.57700E+00 -5.379236E-01 + 5579 5.57800E+00 -5.378272E-01 + 5580 5.57900E+00 -5.377307E-01 + 5581 5.58000E+00 -5.376344E-01 + 5582 5.58100E+00 -5.375380E-01 + 5583 5.58200E+00 -5.374417E-01 + 5584 5.58300E+00 -5.373455E-01 + 5585 5.58400E+00 -5.372492E-01 + 5586 5.58500E+00 -5.371530E-01 + 5587 5.58600E+00 -5.370569E-01 + 5588 5.58700E+00 -5.369608E-01 + 5589 5.58800E+00 -5.368647E-01 + 5590 5.58900E+00 -5.367686E-01 + 5591 5.59000E+00 -5.366726E-01 + 5592 5.59100E+00 -5.365766E-01 + 5593 5.59200E+00 -5.364806E-01 + 5594 5.59300E+00 -5.363847E-01 + 5595 5.59400E+00 -5.362888E-01 + 5596 5.59500E+00 -5.361930E-01 + 5597 5.59600E+00 -5.360972E-01 + 5598 5.59700E+00 -5.360014E-01 + 5599 5.59800E+00 -5.359056E-01 + 5600 5.59900E+00 -5.358099E-01 + 5601 5.60000E+00 -5.357142E-01 + 5602 5.60100E+00 -5.356186E-01 + 5603 5.60200E+00 -5.355230E-01 + 5604 5.60300E+00 -5.354274E-01 + 5605 5.60400E+00 -5.353319E-01 + 5606 5.60500E+00 -5.352364E-01 + 5607 5.60600E+00 -5.351409E-01 + 5608 5.60700E+00 -5.350455E-01 + 5609 5.60800E+00 -5.349501E-01 + 5610 5.60900E+00 -5.348547E-01 + 5611 5.61000E+00 -5.347594E-01 + 5612 5.61100E+00 -5.346641E-01 + 5613 5.61200E+00 -5.345688E-01 + 5614 5.61300E+00 -5.344736E-01 + 5615 5.61400E+00 -5.343784E-01 + 5616 5.61500E+00 -5.342832E-01 + 5617 5.61600E+00 -5.341881E-01 + 5618 5.61700E+00 -5.340930E-01 + 5619 5.61800E+00 -5.339979E-01 + 5620 5.61900E+00 -5.339029E-01 + 5621 5.62000E+00 -5.338079E-01 + 5622 5.62100E+00 -5.337129E-01 + 5623 5.62200E+00 -5.336180E-01 + 5624 5.62300E+00 -5.335231E-01 + 5625 5.62400E+00 -5.334282E-01 + 5626 5.62500E+00 -5.333334E-01 + 5627 5.62600E+00 -5.332386E-01 + 5628 5.62700E+00 -5.331438E-01 + 5629 5.62800E+00 -5.330491E-01 + 5630 5.62900E+00 -5.329544E-01 + 5631 5.63000E+00 -5.328597E-01 + 5632 5.63100E+00 -5.327651E-01 + 5633 5.63200E+00 -5.326705E-01 + 5634 5.63300E+00 -5.325759E-01 + 5635 5.63400E+00 -5.324814E-01 + 5636 5.63500E+00 -5.323869E-01 + 5637 5.63600E+00 -5.322924E-01 + 5638 5.63700E+00 -5.321980E-01 + 5639 5.63800E+00 -5.321036E-01 + 5640 5.63900E+00 -5.320092E-01 + 5641 5.64000E+00 -5.319149E-01 + 5642 5.64100E+00 -5.318206E-01 + 5643 5.64200E+00 -5.317263E-01 + 5644 5.64300E+00 -5.316321E-01 + 5645 5.64400E+00 -5.315379E-01 + 5646 5.64500E+00 -5.314437E-01 + 5647 5.64600E+00 -5.313496E-01 + 5648 5.64700E+00 -5.312555E-01 + 5649 5.64800E+00 -5.311614E-01 + 5650 5.64900E+00 -5.310674E-01 + 5651 5.65000E+00 -5.309734E-01 + 5652 5.65100E+00 -5.308794E-01 + 5653 5.65200E+00 -5.307855E-01 + 5654 5.65300E+00 -5.306916E-01 + 5655 5.65400E+00 -5.305978E-01 + 5656 5.65500E+00 -5.305039E-01 + 5657 5.65600E+00 -5.304101E-01 + 5658 5.65700E+00 -5.303164E-01 + 5659 5.65800E+00 -5.302226E-01 + 5660 5.65900E+00 -5.301289E-01 + 5661 5.66000E+00 -5.300353E-01 + 5662 5.66100E+00 -5.299416E-01 + 5663 5.66200E+00 -5.298480E-01 + 5664 5.66300E+00 -5.297545E-01 + 5665 5.66400E+00 -5.296610E-01 + 5666 5.66500E+00 -5.295675E-01 + 5667 5.66600E+00 -5.294740E-01 + 5668 5.66700E+00 -5.293806E-01 + 5669 5.66800E+00 -5.292872E-01 + 5670 5.66900E+00 -5.291938E-01 + 5671 5.67000E+00 -5.291005E-01 + 5672 5.67100E+00 -5.290072E-01 + 5673 5.67200E+00 -5.289139E-01 + 5674 5.67300E+00 -5.288207E-01 + 5675 5.67400E+00 -5.287275E-01 + 5676 5.67500E+00 -5.286343E-01 + 5677 5.67600E+00 -5.285412E-01 + 5678 5.67700E+00 -5.284481E-01 + 5679 5.67800E+00 -5.283550E-01 + 5680 5.67900E+00 -5.282620E-01 + 5681 5.68000E+00 -5.281690E-01 + 5682 5.68100E+00 -5.280760E-01 + 5683 5.68200E+00 -5.279831E-01 + 5684 5.68300E+00 -5.278902E-01 + 5685 5.68400E+00 -5.277973E-01 + 5686 5.68500E+00 -5.277045E-01 + 5687 5.68600E+00 -5.276117E-01 + 5688 5.68700E+00 -5.275189E-01 + 5689 5.68800E+00 -5.274262E-01 + 5690 5.68900E+00 -5.273335E-01 + 5691 5.69000E+00 -5.272408E-01 + 5692 5.69100E+00 -5.271482E-01 + 5693 5.69200E+00 -5.270555E-01 + 5694 5.69300E+00 -5.269630E-01 + 5695 5.69400E+00 -5.268704E-01 + 5696 5.69500E+00 -5.267779E-01 + 5697 5.69600E+00 -5.266854E-01 + 5698 5.69700E+00 -5.265930E-01 + 5699 5.69800E+00 -5.265005E-01 + 5700 5.69900E+00 -5.264082E-01 + 5701 5.70000E+00 -5.263158E-01 + 5702 5.70100E+00 -5.262235E-01 + 5703 5.70200E+00 -5.261312E-01 + 5704 5.70300E+00 -5.260389E-01 + 5705 5.70400E+00 -5.259467E-01 + 5706 5.70500E+00 -5.258545E-01 + 5707 5.70600E+00 -5.257624E-01 + 5708 5.70700E+00 -5.256702E-01 + 5709 5.70800E+00 -5.255781E-01 + 5710 5.70900E+00 -5.254861E-01 + 5711 5.71000E+00 -5.253940E-01 + 5712 5.71100E+00 -5.253020E-01 + 5713 5.71200E+00 -5.252101E-01 + 5714 5.71300E+00 -5.251181E-01 + 5715 5.71400E+00 -5.250262E-01 + 5716 5.71500E+00 -5.249344E-01 + 5717 5.71600E+00 -5.248425E-01 + 5718 5.71700E+00 -5.247507E-01 + 5719 5.71800E+00 -5.246589E-01 + 5720 5.71900E+00 -5.245672E-01 + 5721 5.72000E+00 -5.244755E-01 + 5722 5.72100E+00 -5.243838E-01 + 5723 5.72200E+00 -5.242922E-01 + 5724 5.72300E+00 -5.242005E-01 + 5725 5.72400E+00 -5.241090E-01 + 5726 5.72500E+00 -5.240174E-01 + 5727 5.72600E+00 -5.239259E-01 + 5728 5.72700E+00 -5.238344E-01 + 5729 5.72800E+00 -5.237430E-01 + 5730 5.72900E+00 -5.236515E-01 + 5731 5.73000E+00 -5.235601E-01 + 5732 5.73100E+00 -5.234688E-01 + 5733 5.73200E+00 -5.233775E-01 + 5734 5.73300E+00 -5.232862E-01 + 5735 5.73400E+00 -5.231949E-01 + 5736 5.73500E+00 -5.231037E-01 + 5737 5.73600E+00 -5.230125E-01 + 5738 5.73700E+00 -5.229213E-01 + 5739 5.73800E+00 -5.228302E-01 + 5740 5.73900E+00 -5.227391E-01 + 5741 5.74000E+00 -5.226480E-01 + 5742 5.74100E+00 -5.225570E-01 + 5743 5.74200E+00 -5.224660E-01 + 5744 5.74300E+00 -5.223750E-01 + 5745 5.74400E+00 -5.222841E-01 + 5746 5.74500E+00 -5.221932E-01 + 5747 5.74600E+00 -5.221023E-01 + 5748 5.74700E+00 -5.220115E-01 + 5749 5.74800E+00 -5.219207E-01 + 5750 5.74900E+00 -5.218299E-01 + 5751 5.75000E+00 -5.217391E-01 + 5752 5.75100E+00 -5.216484E-01 + 5753 5.75200E+00 -5.215577E-01 + 5754 5.75300E+00 -5.214671E-01 + 5755 5.75400E+00 -5.213764E-01 + 5756 5.75500E+00 -5.212859E-01 + 5757 5.75600E+00 -5.211953E-01 + 5758 5.75700E+00 -5.211048E-01 + 5759 5.75800E+00 -5.210143E-01 + 5760 5.75900E+00 -5.209238E-01 + 5761 5.76000E+00 -5.208334E-01 + 5762 5.76100E+00 -5.207430E-01 + 5763 5.76200E+00 -5.206526E-01 + 5764 5.76300E+00 -5.205622E-01 + 5765 5.76400E+00 -5.204719E-01 + 5766 5.76500E+00 -5.203816E-01 + 5767 5.76600E+00 -5.202914E-01 + 5768 5.76700E+00 -5.202012E-01 + 5769 5.76800E+00 -5.201110E-01 + 5770 5.76900E+00 -5.200208E-01 + 5771 5.77000E+00 -5.199307E-01 + 5772 5.77100E+00 -5.198406E-01 + 5773 5.77200E+00 -5.197505E-01 + 5774 5.77300E+00 -5.196605E-01 + 5775 5.77400E+00 -5.195705E-01 + 5776 5.77500E+00 -5.194805E-01 + 5777 5.77600E+00 -5.193906E-01 + 5778 5.77700E+00 -5.193007E-01 + 5779 5.77800E+00 -5.192108E-01 + 5780 5.77900E+00 -5.191209E-01 + 5781 5.78000E+00 -5.190311E-01 + 5782 5.78100E+00 -5.189413E-01 + 5783 5.78200E+00 -5.188516E-01 + 5784 5.78300E+00 -5.187619E-01 + 5785 5.78400E+00 -5.186722E-01 + 5786 5.78500E+00 -5.185825E-01 + 5787 5.78600E+00 -5.184929E-01 + 5788 5.78700E+00 -5.184033E-01 + 5789 5.78800E+00 -5.183137E-01 + 5790 5.78900E+00 -5.182242E-01 + 5791 5.79000E+00 -5.181347E-01 + 5792 5.79100E+00 -5.180452E-01 + 5793 5.79200E+00 -5.179558E-01 + 5794 5.79300E+00 -5.178663E-01 + 5795 5.79400E+00 -5.177770E-01 + 5796 5.79500E+00 -5.176876E-01 + 5797 5.79600E+00 -5.175983E-01 + 5798 5.79700E+00 -5.175090E-01 + 5799 5.79800E+00 -5.174197E-01 + 5800 5.79900E+00 -5.173305E-01 + 5801 5.80000E+00 -5.172413E-01 + 5802 5.80100E+00 -5.171522E-01 + 5803 5.80200E+00 -5.170630E-01 + 5804 5.80300E+00 -5.169739E-01 + 5805 5.80400E+00 -5.168848E-01 + 5806 5.80500E+00 -5.167958E-01 + 5807 5.80600E+00 -5.167068E-01 + 5808 5.80700E+00 -5.166178E-01 + 5809 5.80800E+00 -5.165289E-01 + 5810 5.80900E+00 -5.164400E-01 + 5811 5.81000E+00 -5.163511E-01 + 5812 5.81100E+00 -5.162622E-01 + 5813 5.81200E+00 -5.161734E-01 + 5814 5.81300E+00 -5.160846E-01 + 5815 5.81400E+00 -5.159958E-01 + 5816 5.81500E+00 -5.159071E-01 + 5817 5.81600E+00 -5.158184E-01 + 5818 5.81700E+00 -5.157297E-01 + 5819 5.81800E+00 -5.156411E-01 + 5820 5.81900E+00 -5.155525E-01 + 5821 5.82000E+00 -5.154639E-01 + 5822 5.82100E+00 -5.153754E-01 + 5823 5.82200E+00 -5.152868E-01 + 5824 5.82300E+00 -5.151984E-01 + 5825 5.82400E+00 -5.151099E-01 + 5826 5.82500E+00 -5.150215E-01 + 5827 5.82600E+00 -5.149331E-01 + 5828 5.82700E+00 -5.148447E-01 + 5829 5.82800E+00 -5.147564E-01 + 5830 5.82900E+00 -5.146681E-01 + 5831 5.83000E+00 -5.145798E-01 + 5832 5.83100E+00 -5.144915E-01 + 5833 5.83200E+00 -5.144033E-01 + 5834 5.83300E+00 -5.143151E-01 + 5835 5.83400E+00 -5.142270E-01 + 5836 5.83500E+00 -5.141388E-01 + 5837 5.83600E+00 -5.140507E-01 + 5838 5.83700E+00 -5.139627E-01 + 5839 5.83800E+00 -5.138746E-01 + 5840 5.83900E+00 -5.137866E-01 + 5841 5.84000E+00 -5.136987E-01 + 5842 5.84100E+00 -5.136107E-01 + 5843 5.84200E+00 -5.135228E-01 + 5844 5.84300E+00 -5.134349E-01 + 5845 5.84400E+00 -5.133470E-01 + 5846 5.84500E+00 -5.132592E-01 + 5847 5.84600E+00 -5.131714E-01 + 5848 5.84700E+00 -5.130836E-01 + 5849 5.84800E+00 -5.129959E-01 + 5850 5.84900E+00 -5.129082E-01 + 5851 5.85000E+00 -5.128205E-01 + 5852 5.85100E+00 -5.127329E-01 + 5853 5.85200E+00 -5.126452E-01 + 5854 5.85300E+00 -5.125576E-01 + 5855 5.85400E+00 -5.124701E-01 + 5856 5.85500E+00 -5.123826E-01 + 5857 5.85600E+00 -5.122951E-01 + 5858 5.85700E+00 -5.122076E-01 + 5859 5.85800E+00 -5.121201E-01 + 5860 5.85900E+00 -5.120327E-01 + 5861 5.86000E+00 -5.119454E-01 + 5862 5.86100E+00 -5.118580E-01 + 5863 5.86200E+00 -5.117707E-01 + 5864 5.86300E+00 -5.116834E-01 + 5865 5.86400E+00 -5.115961E-01 + 5866 5.86500E+00 -5.115089E-01 + 5867 5.86600E+00 -5.114217E-01 + 5868 5.86700E+00 -5.113345E-01 + 5869 5.86800E+00 -5.112474E-01 + 5870 5.86900E+00 -5.111603E-01 + 5871 5.87000E+00 -5.110732E-01 + 5872 5.87100E+00 -5.109861E-01 + 5873 5.87200E+00 -5.108991E-01 + 5874 5.87300E+00 -5.108121E-01 + 5875 5.87400E+00 -5.107252E-01 + 5876 5.87500E+00 -5.106382E-01 + 5877 5.87600E+00 -5.105513E-01 + 5878 5.87700E+00 -5.104645E-01 + 5879 5.87800E+00 -5.103776E-01 + 5880 5.87900E+00 -5.102908E-01 + 5881 5.88000E+00 -5.102040E-01 + 5882 5.88100E+00 -5.101173E-01 + 5883 5.88200E+00 -5.100306E-01 + 5884 5.88300E+00 -5.099439E-01 + 5885 5.88400E+00 -5.098572E-01 + 5886 5.88500E+00 -5.097706E-01 + 5887 5.88600E+00 -5.096840E-01 + 5888 5.88700E+00 -5.095974E-01 + 5889 5.88800E+00 -5.095108E-01 + 5890 5.88900E+00 -5.094243E-01 + 5891 5.89000E+00 -5.093379E-01 + 5892 5.89100E+00 -5.092514E-01 + 5893 5.89200E+00 -5.091650E-01 + 5894 5.89300E+00 -5.090786E-01 + 5895 5.89400E+00 -5.089922E-01 + 5896 5.89500E+00 -5.089059E-01 + 5897 5.89600E+00 -5.088196E-01 + 5898 5.89700E+00 -5.087333E-01 + 5899 5.89800E+00 -5.086470E-01 + 5900 5.89900E+00 -5.085608E-01 + 5901 5.90000E+00 -5.084746E-01 + 5902 5.90100E+00 -5.083884E-01 + 5903 5.90200E+00 -5.083023E-01 + 5904 5.90300E+00 -5.082162E-01 + 5905 5.90400E+00 -5.081301E-01 + 5906 5.90500E+00 -5.080441E-01 + 5907 5.90600E+00 -5.079580E-01 + 5908 5.90700E+00 -5.078720E-01 + 5909 5.90800E+00 -5.077861E-01 + 5910 5.90900E+00 -5.077001E-01 + 5911 5.91000E+00 -5.076142E-01 + 5912 5.91100E+00 -5.075284E-01 + 5913 5.91200E+00 -5.074425E-01 + 5914 5.91300E+00 -5.073567E-01 + 5915 5.91400E+00 -5.072709E-01 + 5916 5.91500E+00 -5.071851E-01 + 5917 5.91600E+00 -5.070994E-01 + 5918 5.91700E+00 -5.070137E-01 + 5919 5.91800E+00 -5.069280E-01 + 5920 5.91900E+00 -5.068424E-01 + 5921 5.92000E+00 -5.067568E-01 + 5922 5.92100E+00 -5.066712E-01 + 5923 5.92200E+00 -5.065856E-01 + 5924 5.92300E+00 -5.065001E-01 + 5925 5.92400E+00 -5.064146E-01 + 5926 5.92500E+00 -5.063291E-01 + 5927 5.92600E+00 -5.062437E-01 + 5928 5.92700E+00 -5.061582E-01 + 5929 5.92800E+00 -5.060729E-01 + 5930 5.92900E+00 -5.059875E-01 + 5931 5.93000E+00 -5.059022E-01 + 5932 5.93100E+00 -5.058169E-01 + 5933 5.93200E+00 -5.057316E-01 + 5934 5.93300E+00 -5.056463E-01 + 5935 5.93400E+00 -5.055611E-01 + 5936 5.93500E+00 -5.054759E-01 + 5937 5.93600E+00 -5.053908E-01 + 5938 5.93700E+00 -5.053057E-01 + 5939 5.93800E+00 -5.052206E-01 + 5940 5.93900E+00 -5.051355E-01 + 5941 5.94000E+00 -5.050504E-01 + 5942 5.94100E+00 -5.049654E-01 + 5943 5.94200E+00 -5.048805E-01 + 5944 5.94300E+00 -5.047955E-01 + 5945 5.94400E+00 -5.047106E-01 + 5946 5.94500E+00 -5.046257E-01 + 5947 5.94600E+00 -5.045408E-01 + 5948 5.94700E+00 -5.044560E-01 + 5949 5.94800E+00 -5.043712E-01 + 5950 5.94900E+00 -5.042864E-01 + 5951 5.95000E+00 -5.042016E-01 + 5952 5.95100E+00 -5.041169E-01 + 5953 5.95200E+00 -5.040322E-01 + 5954 5.95300E+00 -5.039475E-01 + 5955 5.95400E+00 -5.038629E-01 + 5956 5.95500E+00 -5.037783E-01 + 5957 5.95600E+00 -5.036937E-01 + 5958 5.95700E+00 -5.036092E-01 + 5959 5.95800E+00 -5.035246E-01 + 5960 5.95900E+00 -5.034401E-01 + 5961 5.96000E+00 -5.033557E-01 + 5962 5.96100E+00 -5.032712E-01 + 5963 5.96200E+00 -5.031868E-01 + 5964 5.96300E+00 -5.031025E-01 + 5965 5.96400E+00 -5.030181E-01 + 5966 5.96500E+00 -5.029338E-01 + 5967 5.96600E+00 -5.028495E-01 + 5968 5.96700E+00 -5.027652E-01 + 5969 5.96800E+00 -5.026810E-01 + 5970 5.96900E+00 -5.025968E-01 + 5971 5.97000E+00 -5.025126E-01 + 5972 5.97100E+00 -5.024284E-01 + 5973 5.97200E+00 -5.023443E-01 + 5974 5.97300E+00 -5.022602E-01 + 5975 5.97400E+00 -5.021761E-01 + 5976 5.97500E+00 -5.020921E-01 + 5977 5.97600E+00 -5.020081E-01 + 5978 5.97700E+00 -5.019241E-01 + 5979 5.97800E+00 -5.018401E-01 + 5980 5.97900E+00 -5.017562E-01 + 5981 5.98000E+00 -5.016723E-01 + 5982 5.98100E+00 -5.015884E-01 + 5983 5.98200E+00 -5.015045E-01 + 5984 5.98300E+00 -5.014207E-01 + 5985 5.98400E+00 -5.013369E-01 + 5986 5.98500E+00 -5.012532E-01 + 5987 5.98600E+00 -5.011694E-01 + 5988 5.98700E+00 -5.010857E-01 + 5989 5.98800E+00 -5.010020E-01 + 5990 5.98900E+00 -5.009184E-01 + 5991 5.99000E+00 -5.008347E-01 + 5992 5.99100E+00 -5.007511E-01 + 5993 5.99200E+00 -5.006676E-01 + 5994 5.99300E+00 -5.005840E-01 + 5995 5.99400E+00 -5.005005E-01 + 5996 5.99500E+00 -5.004170E-01 + 5997 5.99600E+00 -5.003335E-01 + 5998 5.99700E+00 -5.002501E-01 + 5999 5.99800E+00 -5.001667E-01 + 6000 5.99900E+00 -5.000833E-01 + 6001 6.00000E+00 -5.000000E-01 + 6002 6.00100E+00 -4.999167E-01 + 6003 6.00200E+00 -4.998334E-01 + 6004 6.00300E+00 -4.997501E-01 + 6005 6.00400E+00 -4.996669E-01 + 6006 6.00500E+00 -4.995836E-01 + 6007 6.00600E+00 -4.995005E-01 + 6008 6.00700E+00 -4.994173E-01 + 6009 6.00800E+00 -4.993342E-01 + 6010 6.00900E+00 -4.992511E-01 + 6011 6.01000E+00 -4.991680E-01 + 6012 6.01100E+00 -4.990850E-01 + 6013 6.01200E+00 -4.990019E-01 + 6014 6.01300E+00 -4.989190E-01 + 6015 6.01400E+00 -4.988360E-01 + 6016 6.01500E+00 -4.987531E-01 + 6017 6.01600E+00 -4.986702E-01 + 6018 6.01700E+00 -4.985873E-01 + 6019 6.01800E+00 -4.985044E-01 + 6020 6.01900E+00 -4.984216E-01 + 6021 6.02000E+00 -4.983388E-01 + 6022 6.02100E+00 -4.982560E-01 + 6023 6.02200E+00 -4.981733E-01 + 6024 6.02300E+00 -4.980906E-01 + 6025 6.02400E+00 -4.980079E-01 + 6026 6.02500E+00 -4.979253E-01 + 6027 6.02600E+00 -4.978426E-01 + 6028 6.02700E+00 -4.977600E-01 + 6029 6.02800E+00 -4.976775E-01 + 6030 6.02900E+00 -4.975949E-01 + 6031 6.03000E+00 -4.975124E-01 + 6032 6.03100E+00 -4.974299E-01 + 6033 6.03200E+00 -4.973474E-01 + 6034 6.03300E+00 -4.972650E-01 + 6035 6.03400E+00 -4.971826E-01 + 6036 6.03500E+00 -4.971002E-01 + 6037 6.03600E+00 -4.970179E-01 + 6038 6.03700E+00 -4.969356E-01 + 6039 6.03800E+00 -4.968533E-01 + 6040 6.03900E+00 -4.967710E-01 + 6041 6.04000E+00 -4.966888E-01 + 6042 6.04100E+00 -4.966065E-01 + 6043 6.04200E+00 -4.965243E-01 + 6044 6.04300E+00 -4.964422E-01 + 6045 6.04400E+00 -4.963600E-01 + 6046 6.04500E+00 -4.962779E-01 + 6047 6.04600E+00 -4.961959E-01 + 6048 6.04700E+00 -4.961138E-01 + 6049 6.04800E+00 -4.960318E-01 + 6050 6.04900E+00 -4.959498E-01 + 6051 6.05000E+00 -4.958678E-01 + 6052 6.05100E+00 -4.957858E-01 + 6053 6.05200E+00 -4.957039E-01 + 6054 6.05300E+00 -4.956220E-01 + 6055 6.05400E+00 -4.955402E-01 + 6056 6.05500E+00 -4.954583E-01 + 6057 6.05600E+00 -4.953765E-01 + 6058 6.05700E+00 -4.952947E-01 + 6059 6.05800E+00 -4.952130E-01 + 6060 6.05900E+00 -4.951312E-01 + 6061 6.06000E+00 -4.950495E-01 + 6062 6.06100E+00 -4.949678E-01 + 6063 6.06200E+00 -4.948862E-01 + 6064 6.06300E+00 -4.948046E-01 + 6065 6.06400E+00 -4.947230E-01 + 6066 6.06500E+00 -4.946414E-01 + 6067 6.06600E+00 -4.945598E-01 + 6068 6.06700E+00 -4.944783E-01 + 6069 6.06800E+00 -4.943968E-01 + 6070 6.06900E+00 -4.943154E-01 + 6071 6.07000E+00 -4.942339E-01 + 6072 6.07100E+00 -4.941525E-01 + 6073 6.07200E+00 -4.940711E-01 + 6074 6.07300E+00 -4.939898E-01 + 6075 6.07400E+00 -4.939084E-01 + 6076 6.07500E+00 -4.938271E-01 + 6077 6.07600E+00 -4.937459E-01 + 6078 6.07700E+00 -4.936646E-01 + 6079 6.07800E+00 -4.935834E-01 + 6080 6.07900E+00 -4.935022E-01 + 6081 6.08000E+00 -4.934210E-01 + 6082 6.08100E+00 -4.933399E-01 + 6083 6.08200E+00 -4.932588E-01 + 6084 6.08300E+00 -4.931777E-01 + 6085 6.08400E+00 -4.930966E-01 + 6086 6.08500E+00 -4.930156E-01 + 6087 6.08600E+00 -4.929345E-01 + 6088 6.08700E+00 -4.928536E-01 + 6089 6.08800E+00 -4.927726E-01 + 6090 6.08900E+00 -4.926917E-01 + 6091 6.09000E+00 -4.926108E-01 + 6092 6.09100E+00 -4.925299E-01 + 6093 6.09200E+00 -4.924491E-01 + 6094 6.09300E+00 -4.923682E-01 + 6095 6.09400E+00 -4.922874E-01 + 6096 6.09500E+00 -4.922067E-01 + 6097 6.09600E+00 -4.921259E-01 + 6098 6.09700E+00 -4.920452E-01 + 6099 6.09800E+00 -4.919645E-01 + 6100 6.09900E+00 -4.918839E-01 + 6101 6.10000E+00 -4.918032E-01 + 6102 6.10100E+00 -4.917226E-01 + 6103 6.10200E+00 -4.916420E-01 + 6104 6.10300E+00 -4.915615E-01 + 6105 6.10400E+00 -4.914810E-01 + 6106 6.10500E+00 -4.914005E-01 + 6107 6.10600E+00 -4.913200E-01 + 6108 6.10700E+00 -4.912395E-01 + 6109 6.10800E+00 -4.911591E-01 + 6110 6.10900E+00 -4.910787E-01 + 6111 6.11000E+00 -4.909983E-01 + 6112 6.11100E+00 -4.909180E-01 + 6113 6.11200E+00 -4.908377E-01 + 6114 6.11300E+00 -4.907574E-01 + 6115 6.11400E+00 -4.906771E-01 + 6116 6.11500E+00 -4.905969E-01 + 6117 6.11600E+00 -4.905167E-01 + 6118 6.11700E+00 -4.904365E-01 + 6119 6.11800E+00 -4.903563E-01 + 6120 6.11900E+00 -4.902762E-01 + 6121 6.12000E+00 -4.901961E-01 + 6122 6.12100E+00 -4.901160E-01 + 6123 6.12200E+00 -4.900360E-01 + 6124 6.12300E+00 -4.899559E-01 + 6125 6.12400E+00 -4.898759E-01 + 6126 6.12500E+00 -4.897959E-01 + 6127 6.12600E+00 -4.897160E-01 + 6128 6.12700E+00 -4.896361E-01 + 6129 6.12800E+00 -4.895562E-01 + 6130 6.12900E+00 -4.894763E-01 + 6131 6.13000E+00 -4.893964E-01 + 6132 6.13100E+00 -4.893166E-01 + 6133 6.13200E+00 -4.892368E-01 + 6134 6.13300E+00 -4.891570E-01 + 6135 6.13400E+00 -4.890773E-01 + 6136 6.13500E+00 -4.889976E-01 + 6137 6.13600E+00 -4.889179E-01 + 6138 6.13700E+00 -4.888382E-01 + 6139 6.13800E+00 -4.887586E-01 + 6140 6.13900E+00 -4.886789E-01 + 6141 6.14000E+00 -4.885993E-01 + 6142 6.14100E+00 -4.885198E-01 + 6143 6.14200E+00 -4.884402E-01 + 6144 6.14300E+00 -4.883607E-01 + 6145 6.14400E+00 -4.882812E-01 + 6146 6.14500E+00 -4.882018E-01 + 6147 6.14600E+00 -4.881223E-01 + 6148 6.14700E+00 -4.880429E-01 + 6149 6.14800E+00 -4.879635E-01 + 6150 6.14900E+00 -4.878842E-01 + 6151 6.15000E+00 -4.878048E-01 + 6152 6.15100E+00 -4.877255E-01 + 6153 6.15200E+00 -4.876463E-01 + 6154 6.15300E+00 -4.875670E-01 + 6155 6.15400E+00 -4.874878E-01 + 6156 6.15500E+00 -4.874086E-01 + 6157 6.15600E+00 -4.873294E-01 + 6158 6.15700E+00 -4.872502E-01 + 6159 6.15800E+00 -4.871711E-01 + 6160 6.15900E+00 -4.870920E-01 + 6161 6.16000E+00 -4.870129E-01 + 6162 6.16100E+00 -4.869339E-01 + 6163 6.16200E+00 -4.868549E-01 + 6164 6.16300E+00 -4.867759E-01 + 6165 6.16400E+00 -4.866969E-01 + 6166 6.16500E+00 -4.866179E-01 + 6167 6.16600E+00 -4.865390E-01 + 6168 6.16700E+00 -4.864601E-01 + 6169 6.16800E+00 -4.863813E-01 + 6170 6.16900E+00 -4.863024E-01 + 6171 6.17000E+00 -4.862236E-01 + 6172 6.17100E+00 -4.861448E-01 + 6173 6.17200E+00 -4.860660E-01 + 6174 6.17300E+00 -4.859873E-01 + 6175 6.17400E+00 -4.859086E-01 + 6176 6.17500E+00 -4.858299E-01 + 6177 6.17600E+00 -4.857512E-01 + 6178 6.17700E+00 -4.856726E-01 + 6179 6.17800E+00 -4.855940E-01 + 6180 6.17900E+00 -4.855154E-01 + 6181 6.18000E+00 -4.854368E-01 + 6182 6.18100E+00 -4.853583E-01 + 6183 6.18200E+00 -4.852798E-01 + 6184 6.18300E+00 -4.852013E-01 + 6185 6.18400E+00 -4.851229E-01 + 6186 6.18500E+00 -4.850444E-01 + 6187 6.18600E+00 -4.849660E-01 + 6188 6.18700E+00 -4.848877E-01 + 6189 6.18800E+00 -4.848093E-01 + 6190 6.18900E+00 -4.847310E-01 + 6191 6.19000E+00 -4.846527E-01 + 6192 6.19100E+00 -4.845744E-01 + 6193 6.19200E+00 -4.844961E-01 + 6194 6.19300E+00 -4.844179E-01 + 6195 6.19400E+00 -4.843397E-01 + 6196 6.19500E+00 -4.842615E-01 + 6197 6.19600E+00 -4.841834E-01 + 6198 6.19700E+00 -4.841052E-01 + 6199 6.19800E+00 -4.840271E-01 + 6200 6.19900E+00 -4.839490E-01 + 6201 6.20000E+00 -4.838710E-01 + 6202 6.20100E+00 -4.837930E-01 + 6203 6.20200E+00 -4.837149E-01 + 6204 6.20300E+00 -4.836370E-01 + 6205 6.20400E+00 -4.835590E-01 + 6206 6.20500E+00 -4.834811E-01 + 6207 6.20600E+00 -4.834032E-01 + 6208 6.20700E+00 -4.833253E-01 + 6209 6.20800E+00 -4.832474E-01 + 6210 6.20900E+00 -4.831696E-01 + 6211 6.21000E+00 -4.830918E-01 + 6212 6.21100E+00 -4.830140E-01 + 6213 6.21200E+00 -4.829363E-01 + 6214 6.21300E+00 -4.828585E-01 + 6215 6.21400E+00 -4.827808E-01 + 6216 6.21500E+00 -4.827031E-01 + 6217 6.21600E+00 -4.826255E-01 + 6218 6.21700E+00 -4.825478E-01 + 6219 6.21800E+00 -4.824702E-01 + 6220 6.21900E+00 -4.823927E-01 + 6221 6.22000E+00 -4.823151E-01 + 6222 6.22100E+00 -4.822376E-01 + 6223 6.22200E+00 -4.821601E-01 + 6224 6.22300E+00 -4.820826E-01 + 6225 6.22400E+00 -4.820051E-01 + 6226 6.22500E+00 -4.819277E-01 + 6227 6.22600E+00 -4.818503E-01 + 6228 6.22700E+00 -4.817729E-01 + 6229 6.22800E+00 -4.816955E-01 + 6230 6.22900E+00 -4.816182E-01 + 6231 6.23000E+00 -4.815409E-01 + 6232 6.23100E+00 -4.814636E-01 + 6233 6.23200E+00 -4.813863E-01 + 6234 6.23300E+00 -4.813091E-01 + 6235 6.23400E+00 -4.812319E-01 + 6236 6.23500E+00 -4.811547E-01 + 6237 6.23600E+00 -4.810776E-01 + 6238 6.23700E+00 -4.810004E-01 + 6239 6.23800E+00 -4.809233E-01 + 6240 6.23900E+00 -4.808462E-01 + 6241 6.24000E+00 -4.807692E-01 + 6242 6.24100E+00 -4.806921E-01 + 6243 6.24200E+00 -4.806151E-01 + 6244 6.24300E+00 -4.805381E-01 + 6245 6.24400E+00 -4.804612E-01 + 6246 6.24500E+00 -4.803842E-01 + 6247 6.24600E+00 -4.803073E-01 + 6248 6.24700E+00 -4.802305E-01 + 6249 6.24800E+00 -4.801536E-01 + 6250 6.24900E+00 -4.800768E-01 + 6251 6.25000E+00 -4.799999E-01 + 6252 6.25100E+00 -4.799232E-01 + 6253 6.25200E+00 -4.798464E-01 + 6254 6.25300E+00 -4.797697E-01 + 6255 6.25400E+00 -4.796929E-01 + 6256 6.25500E+00 -4.796163E-01 + 6257 6.25600E+00 -4.795396E-01 + 6258 6.25700E+00 -4.794630E-01 + 6259 6.25800E+00 -4.793864E-01 + 6260 6.25900E+00 -4.793098E-01 + 6261 6.26000E+00 -4.792332E-01 + 6262 6.26100E+00 -4.791567E-01 + 6263 6.26200E+00 -4.790802E-01 + 6264 6.26300E+00 -4.790037E-01 + 6265 6.26400E+00 -4.789272E-01 + 6266 6.26500E+00 -4.788508E-01 + 6267 6.26600E+00 -4.787743E-01 + 6268 6.26700E+00 -4.786980E-01 + 6269 6.26800E+00 -4.786216E-01 + 6270 6.26900E+00 -4.785452E-01 + 6271 6.27000E+00 -4.784689E-01 + 6272 6.27100E+00 -4.783926E-01 + 6273 6.27200E+00 -4.783163E-01 + 6274 6.27300E+00 -4.782401E-01 + 6275 6.27400E+00 -4.781639E-01 + 6276 6.27500E+00 -4.780877E-01 + 6277 6.27600E+00 -4.780115E-01 + 6278 6.27700E+00 -4.779353E-01 + 6279 6.27800E+00 -4.778592E-01 + 6280 6.27900E+00 -4.777831E-01 + 6281 6.28000E+00 -4.777070E-01 + 6282 6.28100E+00 -4.776310E-01 + 6283 6.28200E+00 -4.775549E-01 + 6284 6.28300E+00 -4.774789E-01 + 6285 6.28400E+00 -4.774029E-01 + 6286 6.28500E+00 -4.773270E-01 + 6287 6.28600E+00 -4.772510E-01 + 6288 6.28700E+00 -4.771751E-01 + 6289 6.28800E+00 -4.770992E-01 + 6290 6.28900E+00 -4.770234E-01 + 6291 6.29000E+00 -4.769475E-01 + 6292 6.29100E+00 -4.768717E-01 + 6293 6.29200E+00 -4.767959E-01 + 6294 6.29300E+00 -4.767202E-01 + 6295 6.29400E+00 -4.766444E-01 + 6296 6.29500E+00 -4.765687E-01 + 6297 6.29600E+00 -4.764930E-01 + 6298 6.29700E+00 -4.764173E-01 + 6299 6.29800E+00 -4.763417E-01 + 6300 6.29900E+00 -4.762661E-01 + 6301 6.30000E+00 -4.761905E-01 + 6302 6.30100E+00 -4.761149E-01 + 6303 6.30200E+00 -4.760393E-01 + 6304 6.30300E+00 -4.759638E-01 + 6305 6.30400E+00 -4.758883E-01 + 6306 6.30500E+00 -4.758128E-01 + 6307 6.30600E+00 -4.757374E-01 + 6308 6.30700E+00 -4.756619E-01 + 6309 6.30800E+00 -4.755865E-01 + 6310 6.30900E+00 -4.755111E-01 + 6311 6.31000E+00 -4.754358E-01 + 6312 6.31100E+00 -4.753604E-01 + 6313 6.31200E+00 -4.752851E-01 + 6314 6.31300E+00 -4.752098E-01 + 6315 6.31400E+00 -4.751346E-01 + 6316 6.31500E+00 -4.750593E-01 + 6317 6.31600E+00 -4.749841E-01 + 6318 6.31700E+00 -4.749089E-01 + 6319 6.31800E+00 -4.748337E-01 + 6320 6.31900E+00 -4.747586E-01 + 6321 6.32000E+00 -4.746835E-01 + 6322 6.32100E+00 -4.746084E-01 + 6323 6.32200E+00 -4.745333E-01 + 6324 6.32300E+00 -4.744583E-01 + 6325 6.32400E+00 -4.743832E-01 + 6326 6.32500E+00 -4.743082E-01 + 6327 6.32600E+00 -4.742333E-01 + 6328 6.32700E+00 -4.741583E-01 + 6329 6.32800E+00 -4.740834E-01 + 6330 6.32900E+00 -4.740085E-01 + 6331 6.33000E+00 -4.739336E-01 + 6332 6.33100E+00 -4.738587E-01 + 6333 6.33200E+00 -4.737839E-01 + 6334 6.33300E+00 -4.737091E-01 + 6335 6.33400E+00 -4.736343E-01 + 6336 6.33500E+00 -4.735596E-01 + 6337 6.33600E+00 -4.734848E-01 + 6338 6.33700E+00 -4.734101E-01 + 6339 6.33800E+00 -4.733354E-01 + 6340 6.33900E+00 -4.732608E-01 + 6341 6.34000E+00 -4.731861E-01 + 6342 6.34100E+00 -4.731115E-01 + 6343 6.34200E+00 -4.730369E-01 + 6344 6.34300E+00 -4.729623E-01 + 6345 6.34400E+00 -4.728878E-01 + 6346 6.34500E+00 -4.728132E-01 + 6347 6.34600E+00 -4.727387E-01 + 6348 6.34700E+00 -4.726643E-01 + 6349 6.34800E+00 -4.725898E-01 + 6350 6.34900E+00 -4.725154E-01 + 6351 6.35000E+00 -4.724410E-01 + 6352 6.35100E+00 -4.723666E-01 + 6353 6.35200E+00 -4.722922E-01 + 6354 6.35300E+00 -4.722179E-01 + 6355 6.35400E+00 -4.721436E-01 + 6356 6.35500E+00 -4.720693E-01 + 6357 6.35600E+00 -4.719950E-01 + 6358 6.35700E+00 -4.719207E-01 + 6359 6.35800E+00 -4.718465E-01 + 6360 6.35900E+00 -4.717723E-01 + 6361 6.36000E+00 -4.716981E-01 + 6362 6.36100E+00 -4.716240E-01 + 6363 6.36200E+00 -4.715498E-01 + 6364 6.36300E+00 -4.714757E-01 + 6365 6.36400E+00 -4.714016E-01 + 6366 6.36500E+00 -4.713276E-01 + 6367 6.36600E+00 -4.712535E-01 + 6368 6.36700E+00 -4.711795E-01 + 6369 6.36800E+00 -4.711055E-01 + 6370 6.36900E+00 -4.710316E-01 + 6371 6.37000E+00 -4.709576E-01 + 6372 6.37100E+00 -4.708837E-01 + 6373 6.37200E+00 -4.708098E-01 + 6374 6.37300E+00 -4.707359E-01 + 6375 6.37400E+00 -4.706620E-01 + 6376 6.37500E+00 -4.705882E-01 + 6377 6.37600E+00 -4.705144E-01 + 6378 6.37700E+00 -4.704406E-01 + 6379 6.37800E+00 -4.703669E-01 + 6380 6.37900E+00 -4.702931E-01 + 6381 6.38000E+00 -4.702194E-01 + 6382 6.38100E+00 -4.701457E-01 + 6383 6.38200E+00 -4.700720E-01 + 6384 6.38300E+00 -4.699984E-01 + 6385 6.38400E+00 -4.699248E-01 + 6386 6.38500E+00 -4.698512E-01 + 6387 6.38600E+00 -4.697776E-01 + 6388 6.38700E+00 -4.697040E-01 + 6389 6.38800E+00 -4.696305E-01 + 6390 6.38900E+00 -4.695570E-01 + 6391 6.39000E+00 -4.694835E-01 + 6392 6.39100E+00 -4.694100E-01 + 6393 6.39200E+00 -4.693366E-01 + 6394 6.39300E+00 -4.692632E-01 + 6395 6.39400E+00 -4.691898E-01 + 6396 6.39500E+00 -4.691164E-01 + 6397 6.39600E+00 -4.690431E-01 + 6398 6.39700E+00 -4.689698E-01 + 6399 6.39800E+00 -4.688965E-01 + 6400 6.39900E+00 -4.688232E-01 + 6401 6.40000E+00 -4.687499E-01 + 6402 6.40100E+00 -4.686767E-01 + 6403 6.40200E+00 -4.686035E-01 + 6404 6.40300E+00 -4.685303E-01 + 6405 6.40400E+00 -4.684572E-01 + 6406 6.40500E+00 -4.683840E-01 + 6407 6.40600E+00 -4.683109E-01 + 6408 6.40700E+00 -4.682378E-01 + 6409 6.40800E+00 -4.681647E-01 + 6410 6.40900E+00 -4.680917E-01 + 6411 6.41000E+00 -4.680187E-01 + 6412 6.41100E+00 -4.679457E-01 + 6413 6.41200E+00 -4.678727E-01 + 6414 6.41300E+00 -4.677997E-01 + 6415 6.41400E+00 -4.677268E-01 + 6416 6.41500E+00 -4.676539E-01 + 6417 6.41600E+00 -4.675810E-01 + 6418 6.41700E+00 -4.675082E-01 + 6419 6.41800E+00 -4.674353E-01 + 6420 6.41900E+00 -4.673625E-01 + 6421 6.42000E+00 -4.672897E-01 + 6422 6.42100E+00 -4.672169E-01 + 6423 6.42200E+00 -4.671442E-01 + 6424 6.42300E+00 -4.670715E-01 + 6425 6.42400E+00 -4.669988E-01 + 6426 6.42500E+00 -4.669261E-01 + 6427 6.42600E+00 -4.668534E-01 + 6428 6.42700E+00 -4.667808E-01 + 6429 6.42800E+00 -4.667082E-01 + 6430 6.42900E+00 -4.666356E-01 + 6431 6.43000E+00 -4.665630E-01 + 6432 6.43100E+00 -4.664905E-01 + 6433 6.43200E+00 -4.664179E-01 + 6434 6.43300E+00 -4.663454E-01 + 6435 6.43400E+00 -4.662729E-01 + 6436 6.43500E+00 -4.662005E-01 + 6437 6.43600E+00 -4.661280E-01 + 6438 6.43700E+00 -4.660556E-01 + 6439 6.43800E+00 -4.659832E-01 + 6440 6.43900E+00 -4.659109E-01 + 6441 6.44000E+00 -4.658385E-01 + 6442 6.44100E+00 -4.657662E-01 + 6443 6.44200E+00 -4.656939E-01 + 6444 6.44300E+00 -4.656216E-01 + 6445 6.44400E+00 -4.655494E-01 + 6446 6.44500E+00 -4.654771E-01 + 6447 6.44600E+00 -4.654049E-01 + 6448 6.44700E+00 -4.653327E-01 + 6449 6.44800E+00 -4.652605E-01 + 6450 6.44900E+00 -4.651884E-01 + 6451 6.45000E+00 -4.651163E-01 + 6452 6.45100E+00 -4.650442E-01 + 6453 6.45200E+00 -4.649721E-01 + 6454 6.45300E+00 -4.649000E-01 + 6455 6.45400E+00 -4.648280E-01 + 6456 6.45500E+00 -4.647560E-01 + 6457 6.45600E+00 -4.646840E-01 + 6458 6.45700E+00 -4.646120E-01 + 6459 6.45800E+00 -4.645401E-01 + 6460 6.45900E+00 -4.644681E-01 + 6461 6.46000E+00 -4.643962E-01 + 6462 6.46100E+00 -4.643244E-01 + 6463 6.46200E+00 -4.642525E-01 + 6464 6.46300E+00 -4.641807E-01 + 6465 6.46400E+00 -4.641089E-01 + 6466 6.46500E+00 -4.640371E-01 + 6467 6.46600E+00 -4.639653E-01 + 6468 6.46700E+00 -4.638936E-01 + 6469 6.46800E+00 -4.638218E-01 + 6470 6.46900E+00 -4.637501E-01 + 6471 6.47000E+00 -4.636785E-01 + 6472 6.47100E+00 -4.636068E-01 + 6473 6.47200E+00 -4.635352E-01 + 6474 6.47300E+00 -4.634636E-01 + 6475 6.47400E+00 -4.633920E-01 + 6476 6.47500E+00 -4.633204E-01 + 6477 6.47600E+00 -4.632489E-01 + 6478 6.47700E+00 -4.631773E-01 + 6479 6.47800E+00 -4.631058E-01 + 6480 6.47900E+00 -4.630344E-01 + 6481 6.48000E+00 -4.629629E-01 + 6482 6.48100E+00 -4.628915E-01 + 6483 6.48200E+00 -4.628201E-01 + 6484 6.48300E+00 -4.627487E-01 + 6485 6.48400E+00 -4.626773E-01 + 6486 6.48500E+00 -4.626060E-01 + 6487 6.48600E+00 -4.625346E-01 + 6488 6.48700E+00 -4.624633E-01 + 6489 6.48800E+00 -4.623921E-01 + 6490 6.48900E+00 -4.623208E-01 + 6491 6.49000E+00 -4.622496E-01 + 6492 6.49100E+00 -4.621784E-01 + 6493 6.49200E+00 -4.621072E-01 + 6494 6.49300E+00 -4.620360E-01 + 6495 6.49400E+00 -4.619649E-01 + 6496 6.49500E+00 -4.618937E-01 + 6497 6.49600E+00 -4.618226E-01 + 6498 6.49700E+00 -4.617516E-01 + 6499 6.49800E+00 -4.616805E-01 + 6500 6.49900E+00 -4.616095E-01 + 6501 6.50000E+00 -4.615385E-01 + 6502 6.50100E+00 -4.614675E-01 + 6503 6.50200E+00 -4.613965E-01 + 6504 6.50300E+00 -4.613255E-01 + 6505 6.50400E+00 -4.612546E-01 + 6506 6.50500E+00 -4.611837E-01 + 6507 6.50600E+00 -4.611128E-01 + 6508 6.50700E+00 -4.610420E-01 + 6509 6.50800E+00 -4.609711E-01 + 6510 6.50900E+00 -4.609003E-01 + 6511 6.51000E+00 -4.608295E-01 + 6512 6.51100E+00 -4.607587E-01 + 6513 6.51200E+00 -4.606880E-01 + 6514 6.51300E+00 -4.606172E-01 + 6515 6.51400E+00 -4.605465E-01 + 6516 6.51500E+00 -4.604758E-01 + 6517 6.51600E+00 -4.604052E-01 + 6518 6.51700E+00 -4.603345E-01 + 6519 6.51800E+00 -4.602639E-01 + 6520 6.51900E+00 -4.601933E-01 + 6521 6.52000E+00 -4.601227E-01 + 6522 6.52100E+00 -4.600521E-01 + 6523 6.52200E+00 -4.599816E-01 + 6524 6.52300E+00 -4.599111E-01 + 6525 6.52400E+00 -4.598406E-01 + 6526 6.52500E+00 -4.597701E-01 + 6527 6.52600E+00 -4.596997E-01 + 6528 6.52700E+00 -4.596292E-01 + 6529 6.52800E+00 -4.595588E-01 + 6530 6.52900E+00 -4.594884E-01 + 6531 6.53000E+00 -4.594181E-01 + 6532 6.53100E+00 -4.593477E-01 + 6533 6.53200E+00 -4.592774E-01 + 6534 6.53300E+00 -4.592071E-01 + 6535 6.53400E+00 -4.591368E-01 + 6536 6.53500E+00 -4.590665E-01 + 6537 6.53600E+00 -4.589963E-01 + 6538 6.53700E+00 -4.589261E-01 + 6539 6.53800E+00 -4.588559E-01 + 6540 6.53900E+00 -4.587857E-01 + 6541 6.54000E+00 -4.587156E-01 + 6542 6.54100E+00 -4.586454E-01 + 6543 6.54200E+00 -4.585753E-01 + 6544 6.54300E+00 -4.585052E-01 + 6545 6.54400E+00 -4.584352E-01 + 6546 6.54500E+00 -4.583651E-01 + 6547 6.54600E+00 -4.582951E-01 + 6548 6.54700E+00 -4.582251E-01 + 6549 6.54800E+00 -4.581551E-01 + 6550 6.54900E+00 -4.580851E-01 + 6551 6.55000E+00 -4.580152E-01 + 6552 6.55100E+00 -4.579453E-01 + 6553 6.55200E+00 -4.578754E-01 + 6554 6.55300E+00 -4.578055E-01 + 6555 6.55400E+00 -4.577357E-01 + 6556 6.55500E+00 -4.576658E-01 + 6557 6.55600E+00 -4.575960E-01 + 6558 6.55700E+00 -4.575262E-01 + 6559 6.55800E+00 -4.574565E-01 + 6560 6.55900E+00 -4.573867E-01 + 6561 6.56000E+00 -4.573170E-01 + 6562 6.56100E+00 -4.572473E-01 + 6563 6.56200E+00 -4.571776E-01 + 6564 6.56300E+00 -4.571080E-01 + 6565 6.56400E+00 -4.570383E-01 + 6566 6.56500E+00 -4.569687E-01 + 6567 6.56600E+00 -4.568991E-01 + 6568 6.56700E+00 -4.568295E-01 + 6569 6.56800E+00 -4.567600E-01 + 6570 6.56900E+00 -4.566905E-01 + 6571 6.57000E+00 -4.566210E-01 + 6572 6.57100E+00 -4.565515E-01 + 6573 6.57200E+00 -4.564820E-01 + 6574 6.57300E+00 -4.564126E-01 + 6575 6.57400E+00 -4.563431E-01 + 6576 6.57500E+00 -4.562737E-01 + 6577 6.57600E+00 -4.562044E-01 + 6578 6.57700E+00 -4.561350E-01 + 6579 6.57800E+00 -4.560657E-01 + 6580 6.57900E+00 -4.559963E-01 + 6581 6.58000E+00 -4.559271E-01 + 6582 6.58100E+00 -4.558578E-01 + 6583 6.58200E+00 -4.557885E-01 + 6584 6.58300E+00 -4.557193E-01 + 6585 6.58400E+00 -4.556501E-01 + 6586 6.58500E+00 -4.555809E-01 + 6587 6.58600E+00 -4.555117E-01 + 6588 6.58700E+00 -4.554426E-01 + 6589 6.58800E+00 -4.553734E-01 + 6590 6.58900E+00 -4.553043E-01 + 6591 6.59000E+00 -4.552352E-01 + 6592 6.59100E+00 -4.551662E-01 + 6593 6.59200E+00 -4.550971E-01 + 6594 6.59300E+00 -4.550281E-01 + 6595 6.59400E+00 -4.549591E-01 + 6596 6.59500E+00 -4.548901E-01 + 6597 6.59600E+00 -4.548211E-01 + 6598 6.59700E+00 -4.547522E-01 + 6599 6.59800E+00 -4.546832E-01 + 6600 6.59900E+00 -4.546143E-01 + 6601 6.60000E+00 -4.545455E-01 + 6602 6.60100E+00 -4.544766E-01 + 6603 6.60200E+00 -4.544078E-01 + 6604 6.60300E+00 -4.543389E-01 + 6605 6.60400E+00 -4.542701E-01 + 6606 6.60500E+00 -4.542014E-01 + 6607 6.60600E+00 -4.541326E-01 + 6608 6.60700E+00 -4.540639E-01 + 6609 6.60800E+00 -4.539952E-01 + 6610 6.60900E+00 -4.539265E-01 + 6611 6.61000E+00 -4.538578E-01 + 6612 6.61100E+00 -4.537891E-01 + 6613 6.61200E+00 -4.537205E-01 + 6614 6.61300E+00 -4.536519E-01 + 6615 6.61400E+00 -4.535833E-01 + 6616 6.61500E+00 -4.535147E-01 + 6617 6.61600E+00 -4.534462E-01 + 6618 6.61700E+00 -4.533776E-01 + 6619 6.61800E+00 -4.533091E-01 + 6620 6.61900E+00 -4.532406E-01 + 6621 6.62000E+00 -4.531722E-01 + 6622 6.62100E+00 -4.531037E-01 + 6623 6.62200E+00 -4.530353E-01 + 6624 6.62300E+00 -4.529669E-01 + 6625 6.62400E+00 -4.528985E-01 + 6626 6.62500E+00 -4.528301E-01 + 6627 6.62600E+00 -4.527618E-01 + 6628 6.62700E+00 -4.526935E-01 + 6629 6.62800E+00 -4.526252E-01 + 6630 6.62900E+00 -4.525569E-01 + 6631 6.63000E+00 -4.524886E-01 + 6632 6.63100E+00 -4.524204E-01 + 6633 6.63200E+00 -4.523522E-01 + 6634 6.63300E+00 -4.522840E-01 + 6635 6.63400E+00 -4.522158E-01 + 6636 6.63500E+00 -4.521476E-01 + 6637 6.63600E+00 -4.520795E-01 + 6638 6.63700E+00 -4.520114E-01 + 6639 6.63800E+00 -4.519433E-01 + 6640 6.63900E+00 -4.518752E-01 + 6641 6.64000E+00 -4.518072E-01 + 6642 6.64100E+00 -4.517391E-01 + 6643 6.64200E+00 -4.516711E-01 + 6644 6.64300E+00 -4.516031E-01 + 6645 6.64400E+00 -4.515352E-01 + 6646 6.64500E+00 -4.514672E-01 + 6647 6.64600E+00 -4.513993E-01 + 6648 6.64700E+00 -4.513314E-01 + 6649 6.64800E+00 -4.512635E-01 + 6650 6.64900E+00 -4.511956E-01 + 6651 6.65000E+00 -4.511278E-01 + 6652 6.65100E+00 -4.510600E-01 + 6653 6.65200E+00 -4.509922E-01 + 6654 6.65300E+00 -4.509244E-01 + 6655 6.65400E+00 -4.508566E-01 + 6656 6.65500E+00 -4.507889E-01 + 6657 6.65600E+00 -4.507211E-01 + 6658 6.65700E+00 -4.506534E-01 + 6659 6.65800E+00 -4.505858E-01 + 6660 6.65900E+00 -4.505181E-01 + 6661 6.66000E+00 -4.504505E-01 + 6662 6.66100E+00 -4.503828E-01 + 6663 6.66200E+00 -4.503152E-01 + 6664 6.66300E+00 -4.502476E-01 + 6665 6.66400E+00 -4.501801E-01 + 6666 6.66500E+00 -4.501125E-01 + 6667 6.66600E+00 -4.500450E-01 + 6668 6.66700E+00 -4.499775E-01 + 6669 6.66800E+00 -4.499100E-01 + 6670 6.66900E+00 -4.498426E-01 + 6671 6.67000E+00 -4.497751E-01 + 6672 6.67100E+00 -4.497077E-01 + 6673 6.67200E+00 -4.496403E-01 + 6674 6.67300E+00 -4.495729E-01 + 6675 6.67400E+00 -4.495056E-01 + 6676 6.67500E+00 -4.494382E-01 + 6677 6.67600E+00 -4.493709E-01 + 6678 6.67700E+00 -4.493036E-01 + 6679 6.67800E+00 -4.492363E-01 + 6680 6.67900E+00 -4.491691E-01 + 6681 6.68000E+00 -4.491018E-01 + 6682 6.68100E+00 -4.490346E-01 + 6683 6.68200E+00 -4.489674E-01 + 6684 6.68300E+00 -4.489002E-01 + 6685 6.68400E+00 -4.488330E-01 + 6686 6.68500E+00 -4.487659E-01 + 6687 6.68600E+00 -4.486988E-01 + 6688 6.68700E+00 -4.486317E-01 + 6689 6.68800E+00 -4.485646E-01 + 6690 6.68900E+00 -4.484975E-01 + 6691 6.69000E+00 -4.484305E-01 + 6692 6.69100E+00 -4.483635E-01 + 6693 6.69200E+00 -4.482965E-01 + 6694 6.69300E+00 -4.482295E-01 + 6695 6.69400E+00 -4.481625E-01 + 6696 6.69500E+00 -4.480956E-01 + 6697 6.69600E+00 -4.480287E-01 + 6698 6.69700E+00 -4.479618E-01 + 6699 6.69800E+00 -4.478949E-01 + 6700 6.69900E+00 -4.478280E-01 + 6701 6.70000E+00 -4.477612E-01 + 6702 6.70100E+00 -4.476943E-01 + 6703 6.70200E+00 -4.476275E-01 + 6704 6.70300E+00 -4.475608E-01 + 6705 6.70400E+00 -4.474940E-01 + 6706 6.70500E+00 -4.474273E-01 + 6707 6.70600E+00 -4.473605E-01 + 6708 6.70700E+00 -4.472938E-01 + 6709 6.70800E+00 -4.472271E-01 + 6710 6.70900E+00 -4.471605E-01 + 6711 6.71000E+00 -4.470938E-01 + 6712 6.71100E+00 -4.470272E-01 + 6713 6.71200E+00 -4.469606E-01 + 6714 6.71300E+00 -4.468940E-01 + 6715 6.71400E+00 -4.468275E-01 + 6716 6.71500E+00 -4.467609E-01 + 6717 6.71600E+00 -4.466944E-01 + 6718 6.71700E+00 -4.466279E-01 + 6719 6.71800E+00 -4.465614E-01 + 6720 6.71900E+00 -4.464950E-01 + 6721 6.72000E+00 -4.464285E-01 + 6722 6.72100E+00 -4.463621E-01 + 6723 6.72200E+00 -4.462957E-01 + 6724 6.72300E+00 -4.462293E-01 + 6725 6.72400E+00 -4.461629E-01 + 6726 6.72500E+00 -4.460966E-01 + 6727 6.72600E+00 -4.460303E-01 + 6728 6.72700E+00 -4.459640E-01 + 6729 6.72800E+00 -4.458977E-01 + 6730 6.72900E+00 -4.458314E-01 + 6731 6.73000E+00 -4.457652E-01 + 6732 6.73100E+00 -4.456990E-01 + 6733 6.73200E+00 -4.456328E-01 + 6734 6.73300E+00 -4.455666E-01 + 6735 6.73400E+00 -4.455004E-01 + 6736 6.73500E+00 -4.454343E-01 + 6737 6.73600E+00 -4.453681E-01 + 6738 6.73700E+00 -4.453020E-01 + 6739 6.73800E+00 -4.452360E-01 + 6740 6.73900E+00 -4.451699E-01 + 6741 6.74000E+00 -4.451039E-01 + 6742 6.74100E+00 -4.450378E-01 + 6743 6.74200E+00 -4.449718E-01 + 6744 6.74300E+00 -4.449058E-01 + 6745 6.74400E+00 -4.448399E-01 + 6746 6.74500E+00 -4.447739E-01 + 6747 6.74600E+00 -4.447080E-01 + 6748 6.74700E+00 -4.446421E-01 + 6749 6.74800E+00 -4.445762E-01 + 6750 6.74900E+00 -4.445103E-01 + 6751 6.75000E+00 -4.444445E-01 + 6752 6.75100E+00 -4.443786E-01 + 6753 6.75200E+00 -4.443128E-01 + 6754 6.75300E+00 -4.442470E-01 + 6755 6.75400E+00 -4.441812E-01 + 6756 6.75500E+00 -4.441155E-01 + 6757 6.75600E+00 -4.440498E-01 + 6758 6.75700E+00 -4.439840E-01 + 6759 6.75800E+00 -4.439183E-01 + 6760 6.75900E+00 -4.438527E-01 + 6761 6.76000E+00 -4.437870E-01 + 6762 6.76100E+00 -4.437214E-01 + 6763 6.76200E+00 -4.436557E-01 + 6764 6.76300E+00 -4.435901E-01 + 6765 6.76400E+00 -4.435246E-01 + 6766 6.76500E+00 -4.434590E-01 + 6767 6.76600E+00 -4.433934E-01 + 6768 6.76700E+00 -4.433279E-01 + 6769 6.76800E+00 -4.432624E-01 + 6770 6.76900E+00 -4.431969E-01 + 6771 6.77000E+00 -4.431315E-01 + 6772 6.77100E+00 -4.430660E-01 + 6773 6.77200E+00 -4.430006E-01 + 6774 6.77300E+00 -4.429352E-01 + 6775 6.77400E+00 -4.428698E-01 + 6776 6.77500E+00 -4.428044E-01 + 6777 6.77600E+00 -4.427391E-01 + 6778 6.77700E+00 -4.426737E-01 + 6779 6.77800E+00 -4.426084E-01 + 6780 6.77900E+00 -4.425431E-01 + 6781 6.78000E+00 -4.424779E-01 + 6782 6.78100E+00 -4.424126E-01 + 6783 6.78200E+00 -4.423474E-01 + 6784 6.78300E+00 -4.422821E-01 + 6785 6.78400E+00 -4.422169E-01 + 6786 6.78500E+00 -4.421518E-01 + 6787 6.78600E+00 -4.420866E-01 + 6788 6.78700E+00 -4.420215E-01 + 6789 6.78800E+00 -4.419564E-01 + 6790 6.78900E+00 -4.418913E-01 + 6791 6.79000E+00 -4.418262E-01 + 6792 6.79100E+00 -4.417611E-01 + 6793 6.79200E+00 -4.416961E-01 + 6794 6.79300E+00 -4.416310E-01 + 6795 6.79400E+00 -4.415660E-01 + 6796 6.79500E+00 -4.415011E-01 + 6797 6.79600E+00 -4.414361E-01 + 6798 6.79700E+00 -4.413711E-01 + 6799 6.79800E+00 -4.413062E-01 + 6800 6.79900E+00 -4.412413E-01 + 6801 6.80000E+00 -4.411764E-01 + 6802 6.80100E+00 -4.411115E-01 + 6803 6.80200E+00 -4.410467E-01 + 6804 6.80300E+00 -4.409819E-01 + 6805 6.80400E+00 -4.409171E-01 + 6806 6.80500E+00 -4.408523E-01 + 6807 6.80600E+00 -4.407875E-01 + 6808 6.80700E+00 -4.407227E-01 + 6809 6.80800E+00 -4.406580E-01 + 6810 6.80900E+00 -4.405933E-01 + 6811 6.81000E+00 -4.405286E-01 + 6812 6.81100E+00 -4.404639E-01 + 6813 6.81200E+00 -4.403992E-01 + 6814 6.81300E+00 -4.403346E-01 + 6815 6.81400E+00 -4.402700E-01 + 6816 6.81500E+00 -4.402054E-01 + 6817 6.81600E+00 -4.401408E-01 + 6818 6.81700E+00 -4.400762E-01 + 6819 6.81800E+00 -4.400117E-01 + 6820 6.81900E+00 -4.399472E-01 + 6821 6.82000E+00 -4.398827E-01 + 6822 6.82100E+00 -4.398182E-01 + 6823 6.82200E+00 -4.397537E-01 + 6824 6.82300E+00 -4.396893E-01 + 6825 6.82400E+00 -4.396249E-01 + 6826 6.82500E+00 -4.395604E-01 + 6827 6.82600E+00 -4.394960E-01 + 6828 6.82700E+00 -4.394317E-01 + 6829 6.82800E+00 -4.393673E-01 + 6830 6.82900E+00 -4.393030E-01 + 6831 6.83000E+00 -4.392387E-01 + 6832 6.83100E+00 -4.391744E-01 + 6833 6.83200E+00 -4.391101E-01 + 6834 6.83300E+00 -4.390458E-01 + 6835 6.83400E+00 -4.389816E-01 + 6836 6.83500E+00 -4.389174E-01 + 6837 6.83600E+00 -4.388532E-01 + 6838 6.83700E+00 -4.387890E-01 + 6839 6.83800E+00 -4.387248E-01 + 6840 6.83900E+00 -4.386606E-01 + 6841 6.84000E+00 -4.385965E-01 + 6842 6.84100E+00 -4.385324E-01 + 6843 6.84200E+00 -4.384683E-01 + 6844 6.84300E+00 -4.384042E-01 + 6845 6.84400E+00 -4.383402E-01 + 6846 6.84500E+00 -4.382761E-01 + 6847 6.84600E+00 -4.382121E-01 + 6848 6.84700E+00 -4.381481E-01 + 6849 6.84800E+00 -4.380841E-01 + 6850 6.84900E+00 -4.380202E-01 + 6851 6.85000E+00 -4.379562E-01 + 6852 6.85100E+00 -4.378923E-01 + 6853 6.85200E+00 -4.378284E-01 + 6854 6.85300E+00 -4.377645E-01 + 6855 6.85400E+00 -4.377006E-01 + 6856 6.85500E+00 -4.376368E-01 + 6857 6.85600E+00 -4.375729E-01 + 6858 6.85700E+00 -4.375091E-01 + 6859 6.85800E+00 -4.374453E-01 + 6860 6.85900E+00 -4.373815E-01 + 6861 6.86000E+00 -4.373178E-01 + 6862 6.86100E+00 -4.372540E-01 + 6863 6.86200E+00 -4.371903E-01 + 6864 6.86300E+00 -4.371266E-01 + 6865 6.86400E+00 -4.370629E-01 + 6866 6.86500E+00 -4.369992E-01 + 6867 6.86600E+00 -4.369356E-01 + 6868 6.86700E+00 -4.368720E-01 + 6869 6.86800E+00 -4.368084E-01 + 6870 6.86900E+00 -4.367448E-01 + 6871 6.87000E+00 -4.366812E-01 + 6872 6.87100E+00 -4.366176E-01 + 6873 6.87200E+00 -4.365541E-01 + 6874 6.87300E+00 -4.364906E-01 + 6875 6.87400E+00 -4.364271E-01 + 6876 6.87500E+00 -4.363636E-01 + 6877 6.87600E+00 -4.363001E-01 + 6878 6.87700E+00 -4.362367E-01 + 6879 6.87800E+00 -4.361733E-01 + 6880 6.87900E+00 -4.361098E-01 + 6881 6.88000E+00 -4.360465E-01 + 6882 6.88100E+00 -4.359831E-01 + 6883 6.88200E+00 -4.359197E-01 + 6884 6.88300E+00 -4.358564E-01 + 6885 6.88400E+00 -4.357931E-01 + 6886 6.88500E+00 -4.357298E-01 + 6887 6.88600E+00 -4.356665E-01 + 6888 6.88700E+00 -4.356033E-01 + 6889 6.88800E+00 -4.355400E-01 + 6890 6.88900E+00 -4.354768E-01 + 6891 6.89000E+00 -4.354136E-01 + 6892 6.89100E+00 -4.353504E-01 + 6893 6.89200E+00 -4.352872E-01 + 6894 6.89300E+00 -4.352241E-01 + 6895 6.89400E+00 -4.351610E-01 + 6896 6.89500E+00 -4.350978E-01 + 6897 6.89600E+00 -4.350348E-01 + 6898 6.89700E+00 -4.349717E-01 + 6899 6.89800E+00 -4.349086E-01 + 6900 6.89900E+00 -4.348456E-01 + 6901 6.90000E+00 -4.347826E-01 + 6902 6.90100E+00 -4.347196E-01 + 6903 6.90200E+00 -4.346566E-01 + 6904 6.90300E+00 -4.345936E-01 + 6905 6.90400E+00 -4.345307E-01 + 6906 6.90500E+00 -4.344678E-01 + 6907 6.90600E+00 -4.344049E-01 + 6908 6.90700E+00 -4.343420E-01 + 6909 6.90800E+00 -4.342791E-01 + 6910 6.90900E+00 -4.342162E-01 + 6911 6.91000E+00 -4.341534E-01 + 6912 6.91100E+00 -4.340906E-01 + 6913 6.91200E+00 -4.340278E-01 + 6914 6.91300E+00 -4.339650E-01 + 6915 6.91400E+00 -4.339022E-01 + 6916 6.91500E+00 -4.338395E-01 + 6917 6.91600E+00 -4.337768E-01 + 6918 6.91700E+00 -4.337141E-01 + 6919 6.91800E+00 -4.336514E-01 + 6920 6.91900E+00 -4.335887E-01 + 6921 6.92000E+00 -4.335260E-01 + 6922 6.92100E+00 -4.334634E-01 + 6923 6.92200E+00 -4.334008E-01 + 6924 6.92300E+00 -4.333382E-01 + 6925 6.92400E+00 -4.332756E-01 + 6926 6.92500E+00 -4.332130E-01 + 6927 6.92600E+00 -4.331505E-01 + 6928 6.92700E+00 -4.330879E-01 + 6929 6.92800E+00 -4.330254E-01 + 6930 6.92900E+00 -4.329629E-01 + 6931 6.93000E+00 -4.329004E-01 + 6932 6.93100E+00 -4.328380E-01 + 6933 6.93200E+00 -4.327755E-01 + 6934 6.93300E+00 -4.327131E-01 + 6935 6.93400E+00 -4.326507E-01 + 6936 6.93500E+00 -4.325883E-01 + 6937 6.93600E+00 -4.325260E-01 + 6938 6.93700E+00 -4.324636E-01 + 6939 6.93800E+00 -4.324013E-01 + 6940 6.93900E+00 -4.323389E-01 + 6941 6.94000E+00 -4.322767E-01 + 6942 6.94100E+00 -4.322144E-01 + 6943 6.94200E+00 -4.321521E-01 + 6944 6.94300E+00 -4.320899E-01 + 6945 6.94400E+00 -4.320276E-01 + 6946 6.94500E+00 -4.319654E-01 + 6947 6.94600E+00 -4.319032E-01 + 6948 6.94700E+00 -4.318411E-01 + 6949 6.94800E+00 -4.317789E-01 + 6950 6.94900E+00 -4.317168E-01 + 6951 6.95000E+00 -4.316546E-01 + 6952 6.95100E+00 -4.315925E-01 + 6953 6.95200E+00 -4.315305E-01 + 6954 6.95300E+00 -4.314684E-01 + 6955 6.95400E+00 -4.314063E-01 + 6956 6.95500E+00 -4.313443E-01 + 6957 6.95600E+00 -4.312823E-01 + 6958 6.95700E+00 -4.312203E-01 + 6959 6.95800E+00 -4.311583E-01 + 6960 6.95900E+00 -4.310964E-01 + 6961 6.96000E+00 -4.310344E-01 + 6962 6.96100E+00 -4.309725E-01 + 6963 6.96200E+00 -4.309106E-01 + 6964 6.96300E+00 -4.308487E-01 + 6965 6.96400E+00 -4.307869E-01 + 6966 6.96500E+00 -4.307250E-01 + 6967 6.96600E+00 -4.306632E-01 + 6968 6.96700E+00 -4.306014E-01 + 6969 6.96800E+00 -4.305396E-01 + 6970 6.96900E+00 -4.304778E-01 + 6971 6.97000E+00 -4.304160E-01 + 6972 6.97100E+00 -4.303543E-01 + 6973 6.97200E+00 -4.302925E-01 + 6974 6.97300E+00 -4.302308E-01 + 6975 6.97400E+00 -4.301691E-01 + 6976 6.97500E+00 -4.301075E-01 + 6977 6.97600E+00 -4.300458E-01 + 6978 6.97700E+00 -4.299842E-01 + 6979 6.97800E+00 -4.299226E-01 + 6980 6.97900E+00 -4.298610E-01 + 6981 6.98000E+00 -4.297994E-01 + 6982 6.98100E+00 -4.297378E-01 + 6983 6.98200E+00 -4.296763E-01 + 6984 6.98300E+00 -4.296147E-01 + 6985 6.98400E+00 -4.295532E-01 + 6986 6.98500E+00 -4.294917E-01 + 6987 6.98600E+00 -4.294303E-01 + 6988 6.98700E+00 -4.293688E-01 + 6989 6.98800E+00 -4.293074E-01 + 6990 6.98900E+00 -4.292459E-01 + 6991 6.99000E+00 -4.291845E-01 + 6992 6.99100E+00 -4.291231E-01 + 6993 6.99200E+00 -4.290618E-01 + 6994 6.99300E+00 -4.290004E-01 + 6995 6.99400E+00 -4.289391E-01 + 6996 6.99500E+00 -4.288778E-01 + 6997 6.99600E+00 -4.288165E-01 + 6998 6.99700E+00 -4.287552E-01 + 6999 6.99800E+00 -4.286939E-01 + 7000 6.99900E+00 -4.286327E-01 + 7001 7.00000E+00 -4.285714E-01 + 7002 7.00100E+00 -4.285102E-01 + 7003 7.00200E+00 -4.284490E-01 + 7004 7.00300E+00 -4.283879E-01 + 7005 7.00400E+00 -4.283267E-01 + 7006 7.00500E+00 -4.282655E-01 + 7007 7.00600E+00 -4.282044E-01 + 7008 7.00700E+00 -4.281433E-01 + 7009 7.00800E+00 -4.280822E-01 + 7010 7.00900E+00 -4.280211E-01 + 7011 7.01000E+00 -4.279601E-01 + 7012 7.01100E+00 -4.278990E-01 + 7013 7.01200E+00 -4.278380E-01 + 7014 7.01300E+00 -4.277770E-01 + 7015 7.01400E+00 -4.277160E-01 + 7016 7.01500E+00 -4.276550E-01 + 7017 7.01600E+00 -4.275941E-01 + 7018 7.01700E+00 -4.275331E-01 + 7019 7.01800E+00 -4.274722E-01 + 7020 7.01900E+00 -4.274113E-01 + 7021 7.02000E+00 -4.273504E-01 + 7022 7.02100E+00 -4.272896E-01 + 7023 7.02200E+00 -4.272287E-01 + 7024 7.02300E+00 -4.271679E-01 + 7025 7.02400E+00 -4.271071E-01 + 7026 7.02500E+00 -4.270463E-01 + 7027 7.02600E+00 -4.269855E-01 + 7028 7.02700E+00 -4.269247E-01 + 7029 7.02800E+00 -4.268640E-01 + 7030 7.02900E+00 -4.268032E-01 + 7031 7.03000E+00 -4.267425E-01 + 7032 7.03100E+00 -4.266818E-01 + 7033 7.03200E+00 -4.266211E-01 + 7034 7.03300E+00 -4.265605E-01 + 7035 7.03400E+00 -4.264998E-01 + 7036 7.03500E+00 -4.264392E-01 + 7037 7.03600E+00 -4.263786E-01 + 7038 7.03700E+00 -4.263180E-01 + 7039 7.03800E+00 -4.262574E-01 + 7040 7.03900E+00 -4.261969E-01 + 7041 7.04000E+00 -4.261363E-01 + 7042 7.04100E+00 -4.260758E-01 + 7043 7.04200E+00 -4.260153E-01 + 7044 7.04300E+00 -4.259548E-01 + 7045 7.04400E+00 -4.258943E-01 + 7046 7.04500E+00 -4.258339E-01 + 7047 7.04600E+00 -4.257734E-01 + 7048 7.04700E+00 -4.257130E-01 + 7049 7.04800E+00 -4.256526E-01 + 7050 7.04900E+00 -4.255922E-01 + 7051 7.05000E+00 -4.255319E-01 + 7052 7.05100E+00 -4.254715E-01 + 7053 7.05200E+00 -4.254112E-01 + 7054 7.05300E+00 -4.253509E-01 + 7055 7.05400E+00 -4.252906E-01 + 7056 7.05500E+00 -4.252303E-01 + 7057 7.05600E+00 -4.251700E-01 + 7058 7.05700E+00 -4.251098E-01 + 7059 7.05800E+00 -4.250495E-01 + 7060 7.05900E+00 -4.249893E-01 + 7061 7.06000E+00 -4.249291E-01 + 7062 7.06100E+00 -4.248689E-01 + 7063 7.06200E+00 -4.248088E-01 + 7064 7.06300E+00 -4.247486E-01 + 7065 7.06400E+00 -4.246885E-01 + 7066 7.06500E+00 -4.246284E-01 + 7067 7.06600E+00 -4.245683E-01 + 7068 7.06700E+00 -4.245082E-01 + 7069 7.06800E+00 -4.244482E-01 + 7070 7.06900E+00 -4.243881E-01 + 7071 7.07000E+00 -4.243281E-01 + 7072 7.07100E+00 -4.242681E-01 + 7073 7.07200E+00 -4.242081E-01 + 7074 7.07300E+00 -4.241481E-01 + 7075 7.07400E+00 -4.240882E-01 + 7076 7.07500E+00 -4.240282E-01 + 7077 7.07600E+00 -4.239683E-01 + 7078 7.07700E+00 -4.239084E-01 + 7079 7.07800E+00 -4.238485E-01 + 7080 7.07900E+00 -4.237887E-01 + 7081 7.08000E+00 -4.237288E-01 + 7082 7.08100E+00 -4.236690E-01 + 7083 7.08200E+00 -4.236092E-01 + 7084 7.08300E+00 -4.235493E-01 + 7085 7.08400E+00 -4.234896E-01 + 7086 7.08500E+00 -4.234298E-01 + 7087 7.08600E+00 -4.233700E-01 + 7088 7.08700E+00 -4.233103E-01 + 7089 7.08800E+00 -4.232506E-01 + 7090 7.08900E+00 -4.231909E-01 + 7091 7.09000E+00 -4.231312E-01 + 7092 7.09100E+00 -4.230715E-01 + 7093 7.09200E+00 -4.230119E-01 + 7094 7.09300E+00 -4.229522E-01 + 7095 7.09400E+00 -4.228926E-01 + 7096 7.09500E+00 -4.228330E-01 + 7097 7.09600E+00 -4.227734E-01 + 7098 7.09700E+00 -4.227138E-01 + 7099 7.09800E+00 -4.226543E-01 + 7100 7.09900E+00 -4.225947E-01 + 7101 7.10000E+00 -4.225352E-01 + 7102 7.10100E+00 -4.224757E-01 + 7103 7.10200E+00 -4.224162E-01 + 7104 7.10300E+00 -4.223568E-01 + 7105 7.10400E+00 -4.222973E-01 + 7106 7.10500E+00 -4.222379E-01 + 7107 7.10600E+00 -4.221784E-01 + 7108 7.10700E+00 -4.221190E-01 + 7109 7.10800E+00 -4.220596E-01 + 7110 7.10900E+00 -4.220003E-01 + 7111 7.11000E+00 -4.219409E-01 + 7112 7.11100E+00 -4.218816E-01 + 7113 7.11200E+00 -4.218223E-01 + 7114 7.11300E+00 -4.217630E-01 + 7115 7.11400E+00 -4.217037E-01 + 7116 7.11500E+00 -4.216444E-01 + 7117 7.11600E+00 -4.215851E-01 + 7118 7.11700E+00 -4.215259E-01 + 7119 7.11800E+00 -4.214667E-01 + 7120 7.11900E+00 -4.214075E-01 + 7121 7.12000E+00 -4.213483E-01 + 7122 7.12100E+00 -4.212891E-01 + 7123 7.12200E+00 -4.212300E-01 + 7124 7.12300E+00 -4.211708E-01 + 7125 7.12400E+00 -4.211117E-01 + 7126 7.12500E+00 -4.210526E-01 + 7127 7.12600E+00 -4.209935E-01 + 7128 7.12700E+00 -4.209344E-01 + 7129 7.12800E+00 -4.208754E-01 + 7130 7.12900E+00 -4.208163E-01 + 7131 7.13000E+00 -4.207573E-01 + 7132 7.13100E+00 -4.206983E-01 + 7133 7.13200E+00 -4.206393E-01 + 7134 7.13300E+00 -4.205804E-01 + 7135 7.13400E+00 -4.205214E-01 + 7136 7.13500E+00 -4.204625E-01 + 7137 7.13600E+00 -4.204035E-01 + 7138 7.13700E+00 -4.203446E-01 + 7139 7.13800E+00 -4.202857E-01 + 7140 7.13900E+00 -4.202269E-01 + 7141 7.14000E+00 -4.201680E-01 + 7142 7.14100E+00 -4.201092E-01 + 7143 7.14200E+00 -4.200504E-01 + 7144 7.14300E+00 -4.199915E-01 + 7145 7.14400E+00 -4.199328E-01 + 7146 7.14500E+00 -4.198740E-01 + 7147 7.14600E+00 -4.198152E-01 + 7148 7.14700E+00 -4.197565E-01 + 7149 7.14800E+00 -4.196978E-01 + 7150 7.14900E+00 -4.196391E-01 + 7151 7.15000E+00 -4.195804E-01 + 7152 7.15100E+00 -4.195217E-01 + 7153 7.15200E+00 -4.194630E-01 + 7154 7.15300E+00 -4.194044E-01 + 7155 7.15400E+00 -4.193458E-01 + 7156 7.15500E+00 -4.192872E-01 + 7157 7.15600E+00 -4.192286E-01 + 7158 7.15700E+00 -4.191700E-01 + 7159 7.15800E+00 -4.191115E-01 + 7160 7.15900E+00 -4.190529E-01 + 7161 7.16000E+00 -4.189944E-01 + 7162 7.16100E+00 -4.189359E-01 + 7163 7.16200E+00 -4.188774E-01 + 7164 7.16300E+00 -4.188189E-01 + 7165 7.16400E+00 -4.187605E-01 + 7166 7.16500E+00 -4.187020E-01 + 7167 7.16600E+00 -4.186436E-01 + 7168 7.16700E+00 -4.185852E-01 + 7169 7.16800E+00 -4.185268E-01 + 7170 7.16900E+00 -4.184684E-01 + 7171 7.17000E+00 -4.184101E-01 + 7172 7.17100E+00 -4.183517E-01 + 7173 7.17200E+00 -4.182934E-01 + 7174 7.17300E+00 -4.182351E-01 + 7175 7.17400E+00 -4.181768E-01 + 7176 7.17500E+00 -4.181185E-01 + 7177 7.17600E+00 -4.180602E-01 + 7178 7.17700E+00 -4.180020E-01 + 7179 7.17800E+00 -4.179437E-01 + 7180 7.17900E+00 -4.178855E-01 + 7181 7.18000E+00 -4.178273E-01 + 7182 7.18100E+00 -4.177691E-01 + 7183 7.18200E+00 -4.177110E-01 + 7184 7.18300E+00 -4.176528E-01 + 7185 7.18400E+00 -4.175947E-01 + 7186 7.18500E+00 -4.175366E-01 + 7187 7.18600E+00 -4.174784E-01 + 7188 7.18700E+00 -4.174204E-01 + 7189 7.18800E+00 -4.173623E-01 + 7190 7.18900E+00 -4.173042E-01 + 7191 7.19000E+00 -4.172462E-01 + 7192 7.19100E+00 -4.171882E-01 + 7193 7.19200E+00 -4.171302E-01 + 7194 7.19300E+00 -4.170722E-01 + 7195 7.19400E+00 -4.170142E-01 + 7196 7.19500E+00 -4.169562E-01 + 7197 7.19600E+00 -4.168983E-01 + 7198 7.19700E+00 -4.168404E-01 + 7199 7.19800E+00 -4.167824E-01 + 7200 7.19900E+00 -4.167245E-01 + 7201 7.20000E+00 -4.166667E-01 + 7202 7.20100E+00 -4.166088E-01 + 7203 7.20200E+00 -4.165509E-01 + 7204 7.20300E+00 -4.164931E-01 + 7205 7.20400E+00 -4.164353E-01 + 7206 7.20500E+00 -4.163775E-01 + 7207 7.20600E+00 -4.163197E-01 + 7208 7.20700E+00 -4.162619E-01 + 7209 7.20800E+00 -4.162042E-01 + 7210 7.20900E+00 -4.161465E-01 + 7211 7.21000E+00 -4.160887E-01 + 7212 7.21100E+00 -4.160310E-01 + 7213 7.21200E+00 -4.159733E-01 + 7214 7.21300E+00 -4.159157E-01 + 7215 7.21400E+00 -4.158580E-01 + 7216 7.21500E+00 -4.158004E-01 + 7217 7.21600E+00 -4.157428E-01 + 7218 7.21700E+00 -4.156851E-01 + 7219 7.21800E+00 -4.156276E-01 + 7220 7.21900E+00 -4.155700E-01 + 7221 7.22000E+00 -4.155124E-01 + 7222 7.22100E+00 -4.154549E-01 + 7223 7.22200E+00 -4.153973E-01 + 7224 7.22300E+00 -4.153398E-01 + 7225 7.22400E+00 -4.152823E-01 + 7226 7.22500E+00 -4.152249E-01 + 7227 7.22600E+00 -4.151674E-01 + 7228 7.22700E+00 -4.151100E-01 + 7229 7.22800E+00 -4.150525E-01 + 7230 7.22900E+00 -4.149951E-01 + 7231 7.23000E+00 -4.149377E-01 + 7232 7.23100E+00 -4.148803E-01 + 7233 7.23200E+00 -4.148230E-01 + 7234 7.23300E+00 -4.147656E-01 + 7235 7.23400E+00 -4.147083E-01 + 7236 7.23500E+00 -4.146509E-01 + 7237 7.23600E+00 -4.145936E-01 + 7238 7.23700E+00 -4.145364E-01 + 7239 7.23800E+00 -4.144791E-01 + 7240 7.23900E+00 -4.144218E-01 + 7241 7.24000E+00 -4.143646E-01 + 7242 7.24100E+00 -4.143074E-01 + 7243 7.24200E+00 -4.142502E-01 + 7244 7.24300E+00 -4.141930E-01 + 7245 7.24400E+00 -4.141358E-01 + 7246 7.24500E+00 -4.140786E-01 + 7247 7.24600E+00 -4.140215E-01 + 7248 7.24700E+00 -4.139644E-01 + 7249 7.24800E+00 -4.139073E-01 + 7250 7.24900E+00 -4.138502E-01 + 7251 7.25000E+00 -4.137931E-01 + 7252 7.25100E+00 -4.137360E-01 + 7253 7.25200E+00 -4.136790E-01 + 7254 7.25300E+00 -4.136219E-01 + 7255 7.25400E+00 -4.135649E-01 + 7256 7.25500E+00 -4.135079E-01 + 7257 7.25600E+00 -4.134509E-01 + 7258 7.25700E+00 -4.133940E-01 + 7259 7.25800E+00 -4.133370E-01 + 7260 7.25900E+00 -4.132801E-01 + 7261 7.26000E+00 -4.132232E-01 + 7262 7.26100E+00 -4.131662E-01 + 7263 7.26200E+00 -4.131094E-01 + 7264 7.26300E+00 -4.130525E-01 + 7265 7.26400E+00 -4.129956E-01 + 7266 7.26500E+00 -4.129388E-01 + 7267 7.26600E+00 -4.128819E-01 + 7268 7.26700E+00 -4.128251E-01 + 7269 7.26800E+00 -4.127683E-01 + 7270 7.26900E+00 -4.127115E-01 + 7271 7.27000E+00 -4.126548E-01 + 7272 7.27100E+00 -4.125980E-01 + 7273 7.27200E+00 -4.125413E-01 + 7274 7.27300E+00 -4.124845E-01 + 7275 7.27400E+00 -4.124278E-01 + 7276 7.27500E+00 -4.123712E-01 + 7277 7.27600E+00 -4.123145E-01 + 7278 7.27700E+00 -4.122578E-01 + 7279 7.27800E+00 -4.122012E-01 + 7280 7.27900E+00 -4.121445E-01 + 7281 7.28000E+00 -4.120879E-01 + 7282 7.28100E+00 -4.120313E-01 + 7283 7.28200E+00 -4.119747E-01 + 7284 7.28300E+00 -4.119182E-01 + 7285 7.28400E+00 -4.118616E-01 + 7286 7.28500E+00 -4.118051E-01 + 7287 7.28600E+00 -4.117486E-01 + 7288 7.28700E+00 -4.116921E-01 + 7289 7.28800E+00 -4.116356E-01 + 7290 7.28900E+00 -4.115791E-01 + 7291 7.29000E+00 -4.115226E-01 + 7292 7.29100E+00 -4.114662E-01 + 7293 7.29200E+00 -4.114098E-01 + 7294 7.29300E+00 -4.113533E-01 + 7295 7.29400E+00 -4.112969E-01 + 7296 7.29500E+00 -4.112406E-01 + 7297 7.29600E+00 -4.111842E-01 + 7298 7.29700E+00 -4.111278E-01 + 7299 7.29800E+00 -4.110715E-01 + 7300 7.29900E+00 -4.110152E-01 + 7301 7.30000E+00 -4.109589E-01 + 7302 7.30100E+00 -4.109026E-01 + 7303 7.30200E+00 -4.108463E-01 + 7304 7.30300E+00 -4.107901E-01 + 7305 7.30400E+00 -4.107338E-01 + 7306 7.30500E+00 -4.106776E-01 + 7307 7.30600E+00 -4.106214E-01 + 7308 7.30700E+00 -4.105652E-01 + 7309 7.30800E+00 -4.105090E-01 + 7310 7.30900E+00 -4.104528E-01 + 7311 7.31000E+00 -4.103967E-01 + 7312 7.31100E+00 -4.103405E-01 + 7313 7.31200E+00 -4.102844E-01 + 7314 7.31300E+00 -4.102283E-01 + 7315 7.31400E+00 -4.101722E-01 + 7316 7.31500E+00 -4.101162E-01 + 7317 7.31600E+00 -4.100601E-01 + 7318 7.31700E+00 -4.100040E-01 + 7319 7.31800E+00 -4.099480E-01 + 7320 7.31900E+00 -4.098920E-01 + 7321 7.32000E+00 -4.098360E-01 + 7322 7.32100E+00 -4.097800E-01 + 7323 7.32200E+00 -4.097241E-01 + 7324 7.32300E+00 -4.096681E-01 + 7325 7.32400E+00 -4.096122E-01 + 7326 7.32500E+00 -4.095563E-01 + 7327 7.32600E+00 -4.095004E-01 + 7328 7.32700E+00 -4.094445E-01 + 7329 7.32800E+00 -4.093886E-01 + 7330 7.32900E+00 -4.093327E-01 + 7331 7.33000E+00 -4.092769E-01 + 7332 7.33100E+00 -4.092211E-01 + 7333 7.33200E+00 -4.091653E-01 + 7334 7.33300E+00 -4.091095E-01 + 7335 7.33400E+00 -4.090537E-01 + 7336 7.33500E+00 -4.089979E-01 + 7337 7.33600E+00 -4.089422E-01 + 7338 7.33700E+00 -4.088864E-01 + 7339 7.33800E+00 -4.088307E-01 + 7340 7.33900E+00 -4.087750E-01 + 7341 7.34000E+00 -4.087193E-01 + 7342 7.34100E+00 -4.086637E-01 + 7343 7.34200E+00 -4.086080E-01 + 7344 7.34300E+00 -4.085524E-01 + 7345 7.34400E+00 -4.084967E-01 + 7346 7.34500E+00 -4.084411E-01 + 7347 7.34600E+00 -4.083855E-01 + 7348 7.34700E+00 -4.083299E-01 + 7349 7.34800E+00 -4.082744E-01 + 7350 7.34900E+00 -4.082188E-01 + 7351 7.35000E+00 -4.081633E-01 + 7352 7.35100E+00 -4.081078E-01 + 7353 7.35200E+00 -4.080522E-01 + 7354 7.35300E+00 -4.079968E-01 + 7355 7.35400E+00 -4.079413E-01 + 7356 7.35500E+00 -4.078858E-01 + 7357 7.35600E+00 -4.078304E-01 + 7358 7.35700E+00 -4.077749E-01 + 7359 7.35800E+00 -4.077195E-01 + 7360 7.35900E+00 -4.076641E-01 + 7361 7.36000E+00 -4.076087E-01 + 7362 7.36100E+00 -4.075533E-01 + 7363 7.36200E+00 -4.074980E-01 + 7364 7.36300E+00 -4.074426E-01 + 7365 7.36400E+00 -4.073873E-01 + 7366 7.36500E+00 -4.073320E-01 + 7367 7.36600E+00 -4.072767E-01 + 7368 7.36700E+00 -4.072214E-01 + 7369 7.36800E+00 -4.071661E-01 + 7370 7.36900E+00 -4.071109E-01 + 7371 7.37000E+00 -4.070556E-01 + 7372 7.37100E+00 -4.070004E-01 + 7373 7.37200E+00 -4.069452E-01 + 7374 7.37300E+00 -4.068900E-01 + 7375 7.37400E+00 -4.068348E-01 + 7376 7.37500E+00 -4.067797E-01 + 7377 7.37600E+00 -4.067245E-01 + 7378 7.37700E+00 -4.066694E-01 + 7379 7.37800E+00 -4.066143E-01 + 7380 7.37900E+00 -4.065591E-01 + 7381 7.38000E+00 -4.065041E-01 + 7382 7.38100E+00 -4.064490E-01 + 7383 7.38200E+00 -4.063939E-01 + 7384 7.38300E+00 -4.063389E-01 + 7385 7.38400E+00 -4.062838E-01 + 7386 7.38500E+00 -4.062288E-01 + 7387 7.38600E+00 -4.061738E-01 + 7388 7.38700E+00 -4.061188E-01 + 7389 7.38800E+00 -4.060639E-01 + 7390 7.38900E+00 -4.060089E-01 + 7391 7.39000E+00 -4.059540E-01 + 7392 7.39100E+00 -4.058990E-01 + 7393 7.39200E+00 -4.058441E-01 + 7394 7.39300E+00 -4.057892E-01 + 7395 7.39400E+00 -4.057343E-01 + 7396 7.39500E+00 -4.056795E-01 + 7397 7.39600E+00 -4.056246E-01 + 7398 7.39700E+00 -4.055698E-01 + 7399 7.39800E+00 -4.055150E-01 + 7400 7.39900E+00 -4.054602E-01 + 7401 7.40000E+00 -4.054054E-01 + 7402 7.40100E+00 -4.053506E-01 + 7403 7.40200E+00 -4.052958E-01 + 7404 7.40300E+00 -4.052411E-01 + 7405 7.40400E+00 -4.051863E-01 + 7406 7.40500E+00 -4.051316E-01 + 7407 7.40600E+00 -4.050769E-01 + 7408 7.40700E+00 -4.050222E-01 + 7409 7.40800E+00 -4.049676E-01 + 7410 7.40900E+00 -4.049129E-01 + 7411 7.41000E+00 -4.048582E-01 + 7412 7.41100E+00 -4.048036E-01 + 7413 7.41200E+00 -4.047490E-01 + 7414 7.41300E+00 -4.046944E-01 + 7415 7.41400E+00 -4.046398E-01 + 7416 7.41500E+00 -4.045853E-01 + 7417 7.41600E+00 -4.045307E-01 + 7418 7.41700E+00 -4.044762E-01 + 7419 7.41800E+00 -4.044216E-01 + 7420 7.41900E+00 -4.043671E-01 + 7421 7.42000E+00 -4.043126E-01 + 7422 7.42100E+00 -4.042581E-01 + 7423 7.42200E+00 -4.042037E-01 + 7424 7.42300E+00 -4.041492E-01 + 7425 7.42400E+00 -4.040948E-01 + 7426 7.42500E+00 -4.040404E-01 + 7427 7.42600E+00 -4.039860E-01 + 7428 7.42700E+00 -4.039316E-01 + 7429 7.42800E+00 -4.038772E-01 + 7430 7.42900E+00 -4.038228E-01 + 7431 7.43000E+00 -4.037685E-01 + 7432 7.43100E+00 -4.037142E-01 + 7433 7.43200E+00 -4.036598E-01 + 7434 7.43300E+00 -4.036055E-01 + 7435 7.43400E+00 -4.035513E-01 + 7436 7.43500E+00 -4.034970E-01 + 7437 7.43600E+00 -4.034427E-01 + 7438 7.43700E+00 -4.033885E-01 + 7439 7.43800E+00 -4.033342E-01 + 7440 7.43900E+00 -4.032800E-01 + 7441 7.44000E+00 -4.032258E-01 + 7442 7.44100E+00 -4.031716E-01 + 7443 7.44200E+00 -4.031175E-01 + 7444 7.44300E+00 -4.030633E-01 + 7445 7.44400E+00 -4.030092E-01 + 7446 7.44500E+00 -4.029550E-01 + 7447 7.44600E+00 -4.029009E-01 + 7448 7.44700E+00 -4.028468E-01 + 7449 7.44800E+00 -4.027927E-01 + 7450 7.44900E+00 -4.027386E-01 + 7451 7.45000E+00 -4.026846E-01 + 7452 7.45100E+00 -4.026305E-01 + 7453 7.45200E+00 -4.025765E-01 + 7454 7.45300E+00 -4.025225E-01 + 7455 7.45400E+00 -4.024685E-01 + 7456 7.45500E+00 -4.024145E-01 + 7457 7.45600E+00 -4.023605E-01 + 7458 7.45700E+00 -4.023066E-01 + 7459 7.45800E+00 -4.022526E-01 + 7460 7.45900E+00 -4.021987E-01 + 7461 7.46000E+00 -4.021448E-01 + 7462 7.46100E+00 -4.020909E-01 + 7463 7.46200E+00 -4.020370E-01 + 7464 7.46300E+00 -4.019831E-01 + 7465 7.46400E+00 -4.019293E-01 + 7466 7.46500E+00 -4.018754E-01 + 7467 7.46600E+00 -4.018216E-01 + 7468 7.46700E+00 -4.017678E-01 + 7469 7.46800E+00 -4.017140E-01 + 7470 7.46900E+00 -4.016602E-01 + 7471 7.47000E+00 -4.016064E-01 + 7472 7.47100E+00 -4.015527E-01 + 7473 7.47200E+00 -4.014989E-01 + 7474 7.47300E+00 -4.014452E-01 + 7475 7.47400E+00 -4.013915E-01 + 7476 7.47500E+00 -4.013378E-01 + 7477 7.47600E+00 -4.012841E-01 + 7478 7.47700E+00 -4.012304E-01 + 7479 7.47800E+00 -4.011768E-01 + 7480 7.47900E+00 -4.011231E-01 + 7481 7.48000E+00 -4.010695E-01 + 7482 7.48100E+00 -4.010159E-01 + 7483 7.48200E+00 -4.009623E-01 + 7484 7.48300E+00 -4.009087E-01 + 7485 7.48400E+00 -4.008551E-01 + 7486 7.48500E+00 -4.008016E-01 + 7487 7.48600E+00 -4.007480E-01 + 7488 7.48700E+00 -4.006945E-01 + 7489 7.48800E+00 -4.006410E-01 + 7490 7.48900E+00 -4.005875E-01 + 7491 7.49000E+00 -4.005340E-01 + 7492 7.49100E+00 -4.004805E-01 + 7493 7.49200E+00 -4.004271E-01 + 7494 7.49300E+00 -4.003736E-01 + 7495 7.49400E+00 -4.003202E-01 + 7496 7.49500E+00 -4.002668E-01 + 7497 7.49600E+00 -4.002134E-01 + 7498 7.49700E+00 -4.001600E-01 + 7499 7.49800E+00 -4.001066E-01 + 7500 7.49900E+00 -4.000533E-01 + 7501 7.50000E+00 -3.999999E-01 + 7502 7.50100E+00 -3.999466E-01 + 7503 7.50200E+00 -3.998933E-01 + 7504 7.50300E+00 -3.998400E-01 + 7505 7.50400E+00 -3.997867E-01 + 7506 7.50500E+00 -3.997335E-01 + 7507 7.50600E+00 -3.996802E-01 + 7508 7.50700E+00 -3.996270E-01 + 7509 7.50800E+00 -3.995737E-01 + 7510 7.50900E+00 -3.995205E-01 + 7511 7.51000E+00 -3.994673E-01 + 7512 7.51100E+00 -3.994141E-01 + 7513 7.51200E+00 -3.993610E-01 + 7514 7.51300E+00 -3.993078E-01 + 7515 7.51400E+00 -3.992547E-01 + 7516 7.51500E+00 -3.992016E-01 + 7517 7.51600E+00 -3.991484E-01 + 7518 7.51700E+00 -3.990954E-01 + 7519 7.51800E+00 -3.990423E-01 + 7520 7.51900E+00 -3.989892E-01 + 7521 7.52000E+00 -3.989361E-01 + 7522 7.52100E+00 -3.988831E-01 + 7523 7.52200E+00 -3.988301E-01 + 7524 7.52300E+00 -3.987771E-01 + 7525 7.52400E+00 -3.987241E-01 + 7526 7.52500E+00 -3.986711E-01 + 7527 7.52600E+00 -3.986181E-01 + 7528 7.52700E+00 -3.985652E-01 + 7529 7.52800E+00 -3.985122E-01 + 7530 7.52900E+00 -3.984593E-01 + 7531 7.53000E+00 -3.984064E-01 + 7532 7.53100E+00 -3.983535E-01 + 7533 7.53200E+00 -3.983006E-01 + 7534 7.53300E+00 -3.982477E-01 + 7535 7.53400E+00 -3.981949E-01 + 7536 7.53500E+00 -3.981420E-01 + 7537 7.53600E+00 -3.980892E-01 + 7538 7.53700E+00 -3.980364E-01 + 7539 7.53800E+00 -3.979836E-01 + 7540 7.53900E+00 -3.979308E-01 + 7541 7.54000E+00 -3.978780E-01 + 7542 7.54100E+00 -3.978252E-01 + 7543 7.54200E+00 -3.977725E-01 + 7544 7.54300E+00 -3.977198E-01 + 7545 7.54400E+00 -3.976670E-01 + 7546 7.54500E+00 -3.976143E-01 + 7547 7.54600E+00 -3.975616E-01 + 7548 7.54700E+00 -3.975090E-01 + 7549 7.54800E+00 -3.974563E-01 + 7550 7.54900E+00 -3.974036E-01 + 7551 7.55000E+00 -3.973510E-01 + 7552 7.55100E+00 -3.972984E-01 + 7553 7.55200E+00 -3.972458E-01 + 7554 7.55300E+00 -3.971932E-01 + 7555 7.55400E+00 -3.971406E-01 + 7556 7.55500E+00 -3.970880E-01 + 7557 7.55600E+00 -3.970355E-01 + 7558 7.55700E+00 -3.969829E-01 + 7559 7.55800E+00 -3.969304E-01 + 7560 7.55900E+00 -3.968779E-01 + 7561 7.56000E+00 -3.968254E-01 + 7562 7.56100E+00 -3.967729E-01 + 7563 7.56200E+00 -3.967204E-01 + 7564 7.56300E+00 -3.966680E-01 + 7565 7.56400E+00 -3.966155E-01 + 7566 7.56500E+00 -3.965631E-01 + 7567 7.56600E+00 -3.965107E-01 + 7568 7.56700E+00 -3.964583E-01 + 7569 7.56800E+00 -3.964059E-01 + 7570 7.56900E+00 -3.963535E-01 + 7571 7.57000E+00 -3.963012E-01 + 7572 7.57100E+00 -3.962488E-01 + 7573 7.57200E+00 -3.961965E-01 + 7574 7.57300E+00 -3.961442E-01 + 7575 7.57400E+00 -3.960919E-01 + 7576 7.57500E+00 -3.960396E-01 + 7577 7.57600E+00 -3.959873E-01 + 7578 7.57700E+00 -3.959350E-01 + 7579 7.57800E+00 -3.958828E-01 + 7580 7.57900E+00 -3.958305E-01 + 7581 7.58000E+00 -3.957783E-01 + 7582 7.58100E+00 -3.957261E-01 + 7583 7.58200E+00 -3.956739E-01 + 7584 7.58300E+00 -3.956217E-01 + 7585 7.58400E+00 -3.955696E-01 + 7586 7.58500E+00 -3.955174E-01 + 7587 7.58600E+00 -3.954653E-01 + 7588 7.58700E+00 -3.954132E-01 + 7589 7.58800E+00 -3.953610E-01 + 7590 7.58900E+00 -3.953089E-01 + 7591 7.59000E+00 -3.952569E-01 + 7592 7.59100E+00 -3.952048E-01 + 7593 7.59200E+00 -3.951527E-01 + 7594 7.59300E+00 -3.951007E-01 + 7595 7.59400E+00 -3.950487E-01 + 7596 7.59500E+00 -3.949967E-01 + 7597 7.59600E+00 -3.949447E-01 + 7598 7.59700E+00 -3.948927E-01 + 7599 7.59800E+00 -3.948407E-01 + 7600 7.59900E+00 -3.947887E-01 + 7601 7.60000E+00 -3.947368E-01 + 7602 7.60100E+00 -3.946849E-01 + 7603 7.60200E+00 -3.946329E-01 + 7604 7.60300E+00 -3.945810E-01 + 7605 7.60400E+00 -3.945292E-01 + 7606 7.60500E+00 -3.944773E-01 + 7607 7.60600E+00 -3.944254E-01 + 7608 7.60700E+00 -3.943736E-01 + 7609 7.60800E+00 -3.943217E-01 + 7610 7.60900E+00 -3.942699E-01 + 7611 7.61000E+00 -3.942181E-01 + 7612 7.61100E+00 -3.941663E-01 + 7613 7.61200E+00 -3.941145E-01 + 7614 7.61300E+00 -3.940628E-01 + 7615 7.61400E+00 -3.940110E-01 + 7616 7.61500E+00 -3.939593E-01 + 7617 7.61600E+00 -3.939076E-01 + 7618 7.61700E+00 -3.938558E-01 + 7619 7.61800E+00 -3.938041E-01 + 7620 7.61900E+00 -3.937525E-01 + 7621 7.62000E+00 -3.937008E-01 + 7622 7.62100E+00 -3.936491E-01 + 7623 7.62200E+00 -3.935975E-01 + 7624 7.62300E+00 -3.935459E-01 + 7625 7.62400E+00 -3.934942E-01 + 7626 7.62500E+00 -3.934426E-01 + 7627 7.62600E+00 -3.933910E-01 + 7628 7.62700E+00 -3.933395E-01 + 7629 7.62800E+00 -3.932879E-01 + 7630 7.62900E+00 -3.932364E-01 + 7631 7.63000E+00 -3.931848E-01 + 7632 7.63100E+00 -3.931333E-01 + 7633 7.63200E+00 -3.930818E-01 + 7634 7.63300E+00 -3.930303E-01 + 7635 7.63400E+00 -3.929788E-01 + 7636 7.63500E+00 -3.929273E-01 + 7637 7.63600E+00 -3.928759E-01 + 7638 7.63700E+00 -3.928244E-01 + 7639 7.63800E+00 -3.927730E-01 + 7640 7.63900E+00 -3.927216E-01 + 7641 7.64000E+00 -3.926702E-01 + 7642 7.64100E+00 -3.926188E-01 + 7643 7.64200E+00 -3.925674E-01 + 7644 7.64300E+00 -3.925160E-01 + 7645 7.64400E+00 -3.924647E-01 + 7646 7.64500E+00 -3.924134E-01 + 7647 7.64600E+00 -3.923620E-01 + 7648 7.64700E+00 -3.923107E-01 + 7649 7.64800E+00 -3.922594E-01 + 7650 7.64900E+00 -3.922081E-01 + 7651 7.65000E+00 -3.921569E-01 + 7652 7.65100E+00 -3.921056E-01 + 7653 7.65200E+00 -3.920544E-01 + 7654 7.65300E+00 -3.920031E-01 + 7655 7.65400E+00 -3.919519E-01 + 7656 7.65500E+00 -3.919007E-01 + 7657 7.65600E+00 -3.918495E-01 + 7658 7.65700E+00 -3.917983E-01 + 7659 7.65800E+00 -3.917472E-01 + 7660 7.65900E+00 -3.916960E-01 + 7661 7.66000E+00 -3.916449E-01 + 7662 7.66100E+00 -3.915938E-01 + 7663 7.66200E+00 -3.915427E-01 + 7664 7.66300E+00 -3.914916E-01 + 7665 7.66400E+00 -3.914405E-01 + 7666 7.66500E+00 -3.913894E-01 + 7667 7.66600E+00 -3.913383E-01 + 7668 7.66700E+00 -3.912873E-01 + 7669 7.66800E+00 -3.912363E-01 + 7670 7.66900E+00 -3.911853E-01 + 7671 7.67000E+00 -3.911343E-01 + 7672 7.67100E+00 -3.910833E-01 + 7673 7.67200E+00 -3.910323E-01 + 7674 7.67300E+00 -3.909813E-01 + 7675 7.67400E+00 -3.909304E-01 + 7676 7.67500E+00 -3.908794E-01 + 7677 7.67600E+00 -3.908285E-01 + 7678 7.67700E+00 -3.907776E-01 + 7679 7.67800E+00 -3.907267E-01 + 7680 7.67900E+00 -3.906758E-01 + 7681 7.68000E+00 -3.906250E-01 + 7682 7.68100E+00 -3.905741E-01 + 7683 7.68200E+00 -3.905233E-01 + 7684 7.68300E+00 -3.904724E-01 + 7685 7.68400E+00 -3.904216E-01 + 7686 7.68500E+00 -3.903708E-01 + 7687 7.68600E+00 -3.903200E-01 + 7688 7.68700E+00 -3.902692E-01 + 7689 7.68800E+00 -3.902185E-01 + 7690 7.68900E+00 -3.901677E-01 + 7691 7.69000E+00 -3.901170E-01 + 7692 7.69100E+00 -3.900663E-01 + 7693 7.69200E+00 -3.900156E-01 + 7694 7.69300E+00 -3.899649E-01 + 7695 7.69400E+00 -3.899142E-01 + 7696 7.69500E+00 -3.898635E-01 + 7697 7.69600E+00 -3.898128E-01 + 7698 7.69700E+00 -3.897622E-01 + 7699 7.69800E+00 -3.897116E-01 + 7700 7.69900E+00 -3.896610E-01 + 7701 7.70000E+00 -3.896104E-01 + 7702 7.70100E+00 -3.895598E-01 + 7703 7.70200E+00 -3.895092E-01 + 7704 7.70300E+00 -3.894586E-01 + 7705 7.70400E+00 -3.894081E-01 + 7706 7.70500E+00 -3.893575E-01 + 7707 7.70600E+00 -3.893070E-01 + 7708 7.70700E+00 -3.892565E-01 + 7709 7.70800E+00 -3.892060E-01 + 7710 7.70900E+00 -3.891555E-01 + 7711 7.71000E+00 -3.891051E-01 + 7712 7.71100E+00 -3.890546E-01 + 7713 7.71200E+00 -3.890042E-01 + 7714 7.71300E+00 -3.889537E-01 + 7715 7.71400E+00 -3.889033E-01 + 7716 7.71500E+00 -3.888529E-01 + 7717 7.71600E+00 -3.888025E-01 + 7718 7.71700E+00 -3.887521E-01 + 7719 7.71800E+00 -3.887017E-01 + 7720 7.71900E+00 -3.886514E-01 + 7721 7.72000E+00 -3.886011E-01 + 7722 7.72100E+00 -3.885507E-01 + 7723 7.72200E+00 -3.885004E-01 + 7724 7.72300E+00 -3.884501E-01 + 7725 7.72400E+00 -3.883998E-01 + 7726 7.72500E+00 -3.883495E-01 + 7727 7.72600E+00 -3.882993E-01 + 7728 7.72700E+00 -3.882490E-01 + 7729 7.72800E+00 -3.881988E-01 + 7730 7.72900E+00 -3.881485E-01 + 7731 7.73000E+00 -3.880983E-01 + 7732 7.73100E+00 -3.880481E-01 + 7733 7.73200E+00 -3.879979E-01 + 7734 7.73300E+00 -3.879478E-01 + 7735 7.73400E+00 -3.878976E-01 + 7736 7.73500E+00 -3.878475E-01 + 7737 7.73600E+00 -3.877973E-01 + 7738 7.73700E+00 -3.877472E-01 + 7739 7.73800E+00 -3.876971E-01 + 7740 7.73900E+00 -3.876470E-01 + 7741 7.74000E+00 -3.875969E-01 + 7742 7.74100E+00 -3.875468E-01 + 7743 7.74200E+00 -3.874968E-01 + 7744 7.74300E+00 -3.874467E-01 + 7745 7.74400E+00 -3.873967E-01 + 7746 7.74500E+00 -3.873467E-01 + 7747 7.74600E+00 -3.872967E-01 + 7748 7.74700E+00 -3.872467E-01 + 7749 7.74800E+00 -3.871967E-01 + 7750 7.74900E+00 -3.871467E-01 + 7751 7.75000E+00 -3.870968E-01 + 7752 7.75100E+00 -3.870468E-01 + 7753 7.75200E+00 -3.869969E-01 + 7754 7.75300E+00 -3.869470E-01 + 7755 7.75400E+00 -3.868971E-01 + 7756 7.75500E+00 -3.868472E-01 + 7757 7.75600E+00 -3.867973E-01 + 7758 7.75700E+00 -3.867474E-01 + 7759 7.75800E+00 -3.866976E-01 + 7760 7.75900E+00 -3.866477E-01 + 7761 7.76000E+00 -3.865979E-01 + 7762 7.76100E+00 -3.865481E-01 + 7763 7.76200E+00 -3.864983E-01 + 7764 7.76300E+00 -3.864485E-01 + 7765 7.76400E+00 -3.863987E-01 + 7766 7.76500E+00 -3.863490E-01 + 7767 7.76600E+00 -3.862992E-01 + 7768 7.76700E+00 -3.862495E-01 + 7769 7.76800E+00 -3.861998E-01 + 7770 7.76900E+00 -3.861500E-01 + 7771 7.77000E+00 -3.861003E-01 + 7772 7.77100E+00 -3.860507E-01 + 7773 7.77200E+00 -3.860010E-01 + 7774 7.77300E+00 -3.859513E-01 + 7775 7.77400E+00 -3.859017E-01 + 7776 7.77500E+00 -3.858520E-01 + 7777 7.77600E+00 -3.858024E-01 + 7778 7.77700E+00 -3.857528E-01 + 7779 7.77800E+00 -3.857032E-01 + 7780 7.77900E+00 -3.856536E-01 + 7781 7.78000E+00 -3.856041E-01 + 7782 7.78100E+00 -3.855545E-01 + 7783 7.78200E+00 -3.855050E-01 + 7784 7.78300E+00 -3.854554E-01 + 7785 7.78400E+00 -3.854059E-01 + 7786 7.78500E+00 -3.853564E-01 + 7787 7.78600E+00 -3.853069E-01 + 7788 7.78700E+00 -3.852574E-01 + 7789 7.78800E+00 -3.852080E-01 + 7790 7.78900E+00 -3.851585E-01 + 7791 7.79000E+00 -3.851091E-01 + 7792 7.79100E+00 -3.850596E-01 + 7793 7.79200E+00 -3.850102E-01 + 7794 7.79300E+00 -3.849608E-01 + 7795 7.79400E+00 -3.849114E-01 + 7796 7.79500E+00 -3.848621E-01 + 7797 7.79600E+00 -3.848127E-01 + 7798 7.79700E+00 -3.847633E-01 + 7799 7.79800E+00 -3.847140E-01 + 7800 7.79900E+00 -3.846647E-01 + 7801 7.80000E+00 -3.846154E-01 + 7802 7.80100E+00 -3.845661E-01 + 7803 7.80200E+00 -3.845168E-01 + 7804 7.80300E+00 -3.844675E-01 + 7805 7.80400E+00 -3.844182E-01 + 7806 7.80500E+00 -3.843690E-01 + 7807 7.80600E+00 -3.843198E-01 + 7808 7.80700E+00 -3.842705E-01 + 7809 7.80800E+00 -3.842213E-01 + 7810 7.80900E+00 -3.841721E-01 + 7811 7.81000E+00 -3.841229E-01 + 7812 7.81100E+00 -3.840738E-01 + 7813 7.81200E+00 -3.840246E-01 + 7814 7.81300E+00 -3.839754E-01 + 7815 7.81400E+00 -3.839263E-01 + 7816 7.81500E+00 -3.838772E-01 + 7817 7.81600E+00 -3.838281E-01 + 7818 7.81700E+00 -3.837790E-01 + 7819 7.81800E+00 -3.837299E-01 + 7820 7.81900E+00 -3.836808E-01 + 7821 7.82000E+00 -3.836317E-01 + 7822 7.82100E+00 -3.835827E-01 + 7823 7.82200E+00 -3.835336E-01 + 7824 7.82300E+00 -3.834846E-01 + 7825 7.82400E+00 -3.834356E-01 + 7826 7.82500E+00 -3.833866E-01 + 7827 7.82600E+00 -3.833376E-01 + 7828 7.82700E+00 -3.832886E-01 + 7829 7.82800E+00 -3.832397E-01 + 7830 7.82900E+00 -3.831907E-01 + 7831 7.83000E+00 -3.831418E-01 + 7832 7.83100E+00 -3.830928E-01 + 7833 7.83200E+00 -3.830439E-01 + 7834 7.83300E+00 -3.829950E-01 + 7835 7.83400E+00 -3.829461E-01 + 7836 7.83500E+00 -3.828973E-01 + 7837 7.83600E+00 -3.828484E-01 + 7838 7.83700E+00 -3.827995E-01 + 7839 7.83800E+00 -3.827507E-01 + 7840 7.83900E+00 -3.827019E-01 + 7841 7.84000E+00 -3.826531E-01 + 7842 7.84100E+00 -3.826043E-01 + 7843 7.84200E+00 -3.825555E-01 + 7844 7.84300E+00 -3.825067E-01 + 7845 7.84400E+00 -3.824579E-01 + 7846 7.84500E+00 -3.824092E-01 + 7847 7.84600E+00 -3.823604E-01 + 7848 7.84700E+00 -3.823117E-01 + 7849 7.84800E+00 -3.822630E-01 + 7850 7.84900E+00 -3.822143E-01 + 7851 7.85000E+00 -3.821656E-01 + 7852 7.85100E+00 -3.821169E-01 + 7853 7.85200E+00 -3.820682E-01 + 7854 7.85300E+00 -3.820196E-01 + 7855 7.85400E+00 -3.819709E-01 + 7856 7.85500E+00 -3.819223E-01 + 7857 7.85600E+00 -3.818737E-01 + 7858 7.85700E+00 -3.818251E-01 + 7859 7.85800E+00 -3.817765E-01 + 7860 7.85900E+00 -3.817279E-01 + 7861 7.86000E+00 -3.816794E-01 + 7862 7.86100E+00 -3.816308E-01 + 7863 7.86200E+00 -3.815823E-01 + 7864 7.86300E+00 -3.815337E-01 + 7865 7.86400E+00 -3.814852E-01 + 7866 7.86500E+00 -3.814367E-01 + 7867 7.86600E+00 -3.813882E-01 + 7868 7.86700E+00 -3.813397E-01 + 7869 7.86800E+00 -3.812913E-01 + 7870 7.86900E+00 -3.812428E-01 + 7871 7.87000E+00 -3.811944E-01 + 7872 7.87100E+00 -3.811459E-01 + 7873 7.87200E+00 -3.810975E-01 + 7874 7.87300E+00 -3.810491E-01 + 7875 7.87400E+00 -3.810007E-01 + 7876 7.87500E+00 -3.809523E-01 + 7877 7.87600E+00 -3.809040E-01 + 7878 7.87700E+00 -3.808556E-01 + 7879 7.87800E+00 -3.808073E-01 + 7880 7.87900E+00 -3.807589E-01 + 7881 7.88000E+00 -3.807106E-01 + 7882 7.88100E+00 -3.806623E-01 + 7883 7.88200E+00 -3.806140E-01 + 7884 7.88300E+00 -3.805657E-01 + 7885 7.88400E+00 -3.805175E-01 + 7886 7.88500E+00 -3.804692E-01 + 7887 7.88600E+00 -3.804210E-01 + 7888 7.88700E+00 -3.803727E-01 + 7889 7.88800E+00 -3.803245E-01 + 7890 7.88900E+00 -3.802763E-01 + 7891 7.89000E+00 -3.802281E-01 + 7892 7.89100E+00 -3.801799E-01 + 7893 7.89200E+00 -3.801317E-01 + 7894 7.89300E+00 -3.800836E-01 + 7895 7.89400E+00 -3.800354E-01 + 7896 7.89500E+00 -3.799873E-01 + 7897 7.89600E+00 -3.799392E-01 + 7898 7.89700E+00 -3.798911E-01 + 7899 7.89800E+00 -3.798430E-01 + 7900 7.89900E+00 -3.797949E-01 + 7901 7.90000E+00 -3.797468E-01 + 7902 7.90100E+00 -3.796988E-01 + 7903 7.90200E+00 -3.796507E-01 + 7904 7.90300E+00 -3.796027E-01 + 7905 7.90400E+00 -3.795547E-01 + 7906 7.90500E+00 -3.795066E-01 + 7907 7.90600E+00 -3.794586E-01 + 7908 7.90700E+00 -3.794107E-01 + 7909 7.90800E+00 -3.793627E-01 + 7910 7.90900E+00 -3.793147E-01 + 7911 7.91000E+00 -3.792668E-01 + 7912 7.91100E+00 -3.792188E-01 + 7913 7.91200E+00 -3.791709E-01 + 7914 7.91300E+00 -3.791230E-01 + 7915 7.91400E+00 -3.790751E-01 + 7916 7.91500E+00 -3.790272E-01 + 7917 7.91600E+00 -3.789793E-01 + 7918 7.91700E+00 -3.789314E-01 + 7919 7.91800E+00 -3.788836E-01 + 7920 7.91900E+00 -3.788357E-01 + 7921 7.92000E+00 -3.787879E-01 + 7922 7.92100E+00 -3.787401E-01 + 7923 7.92200E+00 -3.786923E-01 + 7924 7.92300E+00 -3.786445E-01 + 7925 7.92400E+00 -3.785967E-01 + 7926 7.92500E+00 -3.785489E-01 + 7927 7.92600E+00 -3.785011E-01 + 7928 7.92700E+00 -3.784534E-01 + 7929 7.92800E+00 -3.784057E-01 + 7930 7.92900E+00 -3.783579E-01 + 7931 7.93000E+00 -3.783102E-01 + 7932 7.93100E+00 -3.782625E-01 + 7933 7.93200E+00 -3.782148E-01 + 7934 7.93300E+00 -3.781672E-01 + 7935 7.93400E+00 -3.781195E-01 + 7936 7.93500E+00 -3.780718E-01 + 7937 7.93600E+00 -3.780242E-01 + 7938 7.93700E+00 -3.779766E-01 + 7939 7.93800E+00 -3.779289E-01 + 7940 7.93900E+00 -3.778813E-01 + 7941 7.94000E+00 -3.778337E-01 + 7942 7.94100E+00 -3.777862E-01 + 7943 7.94200E+00 -3.777386E-01 + 7944 7.94300E+00 -3.776910E-01 + 7945 7.94400E+00 -3.776435E-01 + 7946 7.94500E+00 -3.775960E-01 + 7947 7.94600E+00 -3.775484E-01 + 7948 7.94700E+00 -3.775009E-01 + 7949 7.94800E+00 -3.774534E-01 + 7950 7.94900E+00 -3.774059E-01 + 7951 7.95000E+00 -3.773585E-01 + 7952 7.95100E+00 -3.773110E-01 + 7953 7.95200E+00 -3.772636E-01 + 7954 7.95300E+00 -3.772161E-01 + 7955 7.95400E+00 -3.771687E-01 + 7956 7.95500E+00 -3.771213E-01 + 7957 7.95600E+00 -3.770739E-01 + 7958 7.95700E+00 -3.770265E-01 + 7959 7.95800E+00 -3.769791E-01 + 7960 7.95900E+00 -3.769317E-01 + 7961 7.96000E+00 -3.768844E-01 + 7962 7.96100E+00 -3.768370E-01 + 7963 7.96200E+00 -3.767897E-01 + 7964 7.96300E+00 -3.767424E-01 + 7965 7.96400E+00 -3.766951E-01 + 7966 7.96500E+00 -3.766478E-01 + 7967 7.96600E+00 -3.766005E-01 + 7968 7.96700E+00 -3.765532E-01 + 7969 7.96800E+00 -3.765060E-01 + 7970 7.96900E+00 -3.764587E-01 + 7971 7.97000E+00 -3.764115E-01 + 7972 7.97100E+00 -3.763643E-01 + 7973 7.97200E+00 -3.763171E-01 + 7974 7.97300E+00 -3.762699E-01 + 7975 7.97400E+00 -3.762227E-01 + 7976 7.97500E+00 -3.761755E-01 + 7977 7.97600E+00 -3.761283E-01 + 7978 7.97700E+00 -3.760812E-01 + 7979 7.97800E+00 -3.760340E-01 + 7980 7.97900E+00 -3.759869E-01 + 7981 7.98000E+00 -3.759398E-01 + 7982 7.98100E+00 -3.758927E-01 + 7983 7.98200E+00 -3.758456E-01 + 7984 7.98300E+00 -3.757985E-01 + 7985 7.98400E+00 -3.757515E-01 + 7986 7.98500E+00 -3.757044E-01 + 7987 7.98600E+00 -3.756574E-01 + 7988 7.98700E+00 -3.756103E-01 + 7989 7.98800E+00 -3.755633E-01 + 7990 7.98900E+00 -3.755163E-01 + 7991 7.99000E+00 -3.754693E-01 + 7992 7.99100E+00 -3.754223E-01 + 7993 7.99200E+00 -3.753753E-01 + 7994 7.99300E+00 -3.753284E-01 + 7995 7.99400E+00 -3.752814E-01 + 7996 7.99500E+00 -3.752345E-01 + 7997 7.99600E+00 -3.751876E-01 + 7998 7.99700E+00 -3.751407E-01 + 7999 7.99800E+00 -3.750938E-01 + 8000 7.99900E+00 -3.750469E-01 + 8001 8.00000E+00 -3.750000E-01 + 8002 8.00100E+00 -3.749531E-01 + 8003 8.00200E+00 -3.749063E-01 + 8004 8.00300E+00 -3.748594E-01 + 8005 8.00400E+00 -3.748126E-01 + 8006 8.00500E+00 -3.747658E-01 + 8007 8.00600E+00 -3.747190E-01 + 8008 8.00700E+00 -3.746722E-01 + 8009 8.00800E+00 -3.746254E-01 + 8010 8.00900E+00 -3.745786E-01 + 8011 8.01000E+00 -3.745318E-01 + 8012 8.01100E+00 -3.744851E-01 + 8013 8.01200E+00 -3.744384E-01 + 8014 8.01300E+00 -3.743916E-01 + 8015 8.01400E+00 -3.743449E-01 + 8016 8.01500E+00 -3.742982E-01 + 8017 8.01600E+00 -3.742515E-01 + 8018 8.01700E+00 -3.742048E-01 + 8019 8.01800E+00 -3.741582E-01 + 8020 8.01900E+00 -3.741115E-01 + 8021 8.02000E+00 -3.740648E-01 + 8022 8.02100E+00 -3.740182E-01 + 8023 8.02200E+00 -3.739716E-01 + 8024 8.02300E+00 -3.739250E-01 + 8025 8.02400E+00 -3.738784E-01 + 8026 8.02500E+00 -3.738318E-01 + 8027 8.02600E+00 -3.737852E-01 + 8028 8.02700E+00 -3.737386E-01 + 8029 8.02800E+00 -3.736921E-01 + 8030 8.02900E+00 -3.736455E-01 + 8031 8.03000E+00 -3.735990E-01 + 8032 8.03100E+00 -3.735525E-01 + 8033 8.03200E+00 -3.735060E-01 + 8034 8.03300E+00 -3.734595E-01 + 8035 8.03400E+00 -3.734130E-01 + 8036 8.03500E+00 -3.733665E-01 + 8037 8.03600E+00 -3.733201E-01 + 8038 8.03700E+00 -3.732736E-01 + 8039 8.03800E+00 -3.732272E-01 + 8040 8.03900E+00 -3.731807E-01 + 8041 8.04000E+00 -3.731343E-01 + 8042 8.04100E+00 -3.730879E-01 + 8043 8.04200E+00 -3.730415E-01 + 8044 8.04300E+00 -3.729951E-01 + 8045 8.04400E+00 -3.729488E-01 + 8046 8.04500E+00 -3.729024E-01 + 8047 8.04600E+00 -3.728561E-01 + 8048 8.04700E+00 -3.728097E-01 + 8049 8.04800E+00 -3.727634E-01 + 8050 8.04900E+00 -3.727171E-01 + 8051 8.05000E+00 -3.726708E-01 + 8052 8.05100E+00 -3.726245E-01 + 8053 8.05200E+00 -3.725782E-01 + 8054 8.05300E+00 -3.725319E-01 + 8055 8.05400E+00 -3.724857E-01 + 8056 8.05500E+00 -3.724394E-01 + 8057 8.05600E+00 -3.723932E-01 + 8058 8.05700E+00 -3.723470E-01 + 8059 8.05800E+00 -3.723008E-01 + 8060 8.05900E+00 -3.722546E-01 + 8061 8.06000E+00 -3.722084E-01 + 8062 8.06100E+00 -3.721622E-01 + 8063 8.06200E+00 -3.721161E-01 + 8064 8.06300E+00 -3.720699E-01 + 8065 8.06400E+00 -3.720238E-01 + 8066 8.06500E+00 -3.719776E-01 + 8067 8.06600E+00 -3.719315E-01 + 8068 8.06700E+00 -3.718854E-01 + 8069 8.06800E+00 -3.718393E-01 + 8070 8.06900E+00 -3.717932E-01 + 8071 8.07000E+00 -3.717472E-01 + 8072 8.07100E+00 -3.717011E-01 + 8073 8.07200E+00 -3.716551E-01 + 8074 8.07300E+00 -3.716090E-01 + 8075 8.07400E+00 -3.715630E-01 + 8076 8.07500E+00 -3.715170E-01 + 8077 8.07600E+00 -3.714710E-01 + 8078 8.07700E+00 -3.714250E-01 + 8079 8.07800E+00 -3.713790E-01 + 8080 8.07900E+00 -3.713330E-01 + 8081 8.08000E+00 -3.712871E-01 + 8082 8.08100E+00 -3.712411E-01 + 8083 8.08200E+00 -3.711952E-01 + 8084 8.08300E+00 -3.711493E-01 + 8085 8.08400E+00 -3.711034E-01 + 8086 8.08500E+00 -3.710575E-01 + 8087 8.08600E+00 -3.710116E-01 + 8088 8.08700E+00 -3.709657E-01 + 8089 8.08800E+00 -3.709199E-01 + 8090 8.08900E+00 -3.708740E-01 + 8091 8.09000E+00 -3.708282E-01 + 8092 8.09100E+00 -3.707823E-01 + 8093 8.09200E+00 -3.707365E-01 + 8094 8.09300E+00 -3.706907E-01 + 8095 8.09400E+00 -3.706449E-01 + 8096 8.09500E+00 -3.705991E-01 + 8097 8.09600E+00 -3.705534E-01 + 8098 8.09700E+00 -3.705076E-01 + 8099 8.09800E+00 -3.704618E-01 + 8100 8.09900E+00 -3.704161E-01 + 8101 8.10000E+00 -3.703704E-01 + 8102 8.10100E+00 -3.703247E-01 + 8103 8.10200E+00 -3.702790E-01 + 8104 8.10300E+00 -3.702333E-01 + 8105 8.10400E+00 -3.701876E-01 + 8106 8.10500E+00 -3.701419E-01 + 8107 8.10600E+00 -3.700962E-01 + 8108 8.10700E+00 -3.700506E-01 + 8109 8.10800E+00 -3.700050E-01 + 8110 8.10900E+00 -3.699593E-01 + 8111 8.11000E+00 -3.699137E-01 + 8112 8.11100E+00 -3.698681E-01 + 8113 8.11200E+00 -3.698225E-01 + 8114 8.11300E+00 -3.697769E-01 + 8115 8.11400E+00 -3.697313E-01 + 8116 8.11500E+00 -3.696858E-01 + 8117 8.11600E+00 -3.696402E-01 + 8118 8.11700E+00 -3.695947E-01 + 8119 8.11800E+00 -3.695492E-01 + 8120 8.11900E+00 -3.695037E-01 + 8121 8.12000E+00 -3.694581E-01 + 8122 8.12100E+00 -3.694127E-01 + 8123 8.12200E+00 -3.693672E-01 + 8124 8.12300E+00 -3.693217E-01 + 8125 8.12400E+00 -3.692762E-01 + 8126 8.12500E+00 -3.692308E-01 + 8127 8.12600E+00 -3.691853E-01 + 8128 8.12700E+00 -3.691399E-01 + 8129 8.12800E+00 -3.690945E-01 + 8130 8.12900E+00 -3.690491E-01 + 8131 8.13000E+00 -3.690037E-01 + 8132 8.13100E+00 -3.689583E-01 + 8133 8.13200E+00 -3.689129E-01 + 8134 8.13300E+00 -3.688676E-01 + 8135 8.13400E+00 -3.688222E-01 + 8136 8.13500E+00 -3.687769E-01 + 8137 8.13600E+00 -3.687316E-01 + 8138 8.13700E+00 -3.686862E-01 + 8139 8.13800E+00 -3.686409E-01 + 8140 8.13900E+00 -3.685956E-01 + 8141 8.14000E+00 -3.685504E-01 + 8142 8.14100E+00 -3.685051E-01 + 8143 8.14200E+00 -3.684598E-01 + 8144 8.14300E+00 -3.684146E-01 + 8145 8.14400E+00 -3.683693E-01 + 8146 8.14500E+00 -3.683241E-01 + 8147 8.14600E+00 -3.682789E-01 + 8148 8.14700E+00 -3.682337E-01 + 8149 8.14800E+00 -3.681885E-01 + 8150 8.14900E+00 -3.681433E-01 + 8151 8.15000E+00 -3.680981E-01 + 8152 8.15100E+00 -3.680530E-01 + 8153 8.15200E+00 -3.680078E-01 + 8154 8.15300E+00 -3.679627E-01 + 8155 8.15400E+00 -3.679176E-01 + 8156 8.15500E+00 -3.678724E-01 + 8157 8.15600E+00 -3.678273E-01 + 8158 8.15700E+00 -3.677822E-01 + 8159 8.15800E+00 -3.677372E-01 + 8160 8.15900E+00 -3.676921E-01 + 8161 8.16000E+00 -3.676470E-01 + 8162 8.16100E+00 -3.676020E-01 + 8163 8.16200E+00 -3.675569E-01 + 8164 8.16300E+00 -3.675119E-01 + 8165 8.16400E+00 -3.674669E-01 + 8166 8.16500E+00 -3.674219E-01 + 8167 8.16600E+00 -3.673769E-01 + 8168 8.16700E+00 -3.673319E-01 + 8169 8.16800E+00 -3.672869E-01 + 8170 8.16900E+00 -3.672420E-01 + 8171 8.17000E+00 -3.671970E-01 + 8172 8.17100E+00 -3.671521E-01 + 8173 8.17200E+00 -3.671071E-01 + 8174 8.17300E+00 -3.670622E-01 + 8175 8.17400E+00 -3.670173E-01 + 8176 8.17500E+00 -3.669724E-01 + 8177 8.17600E+00 -3.669275E-01 + 8178 8.17700E+00 -3.668827E-01 + 8179 8.17800E+00 -3.668378E-01 + 8180 8.17900E+00 -3.667930E-01 + 8181 8.18000E+00 -3.667481E-01 + 8182 8.18100E+00 -3.667033E-01 + 8183 8.18200E+00 -3.666585E-01 + 8184 8.18300E+00 -3.666137E-01 + 8185 8.18400E+00 -3.665689E-01 + 8186 8.18500E+00 -3.665241E-01 + 8187 8.18600E+00 -3.664793E-01 + 8188 8.18700E+00 -3.664346E-01 + 8189 8.18800E+00 -3.663898E-01 + 8190 8.18900E+00 -3.663451E-01 + 8191 8.19000E+00 -3.663003E-01 + 8192 8.19100E+00 -3.662556E-01 + 8193 8.19200E+00 -3.662109E-01 + 8194 8.19300E+00 -3.661662E-01 + 8195 8.19400E+00 -3.661215E-01 + 8196 8.19500E+00 -3.660769E-01 + 8197 8.19600E+00 -3.660322E-01 + 8198 8.19700E+00 -3.659876E-01 + 8199 8.19800E+00 -3.659429E-01 + 8200 8.19900E+00 -3.658983E-01 + 8201 8.20000E+00 -3.658537E-01 + 8202 8.20100E+00 -3.658091E-01 + 8203 8.20200E+00 -3.657645E-01 + 8204 8.20300E+00 -3.657199E-01 + 8205 8.20400E+00 -3.656753E-01 + 8206 8.20500E+00 -3.656307E-01 + 8207 8.20600E+00 -3.655862E-01 + 8208 8.20700E+00 -3.655416E-01 + 8209 8.20800E+00 -3.654971E-01 + 8210 8.20900E+00 -3.654526E-01 + 8211 8.21000E+00 -3.654081E-01 + 8212 8.21100E+00 -3.653636E-01 + 8213 8.21200E+00 -3.653191E-01 + 8214 8.21300E+00 -3.652746E-01 + 8215 8.21400E+00 -3.652301E-01 + 8216 8.21500E+00 -3.651857E-01 + 8217 8.21600E+00 -3.651412E-01 + 8218 8.21700E+00 -3.650968E-01 + 8219 8.21800E+00 -3.650523E-01 + 8220 8.21900E+00 -3.650079E-01 + 8221 8.22000E+00 -3.649635E-01 + 8222 8.22100E+00 -3.649191E-01 + 8223 8.22200E+00 -3.648747E-01 + 8224 8.22300E+00 -3.648304E-01 + 8225 8.22400E+00 -3.647860E-01 + 8226 8.22500E+00 -3.647416E-01 + 8227 8.22600E+00 -3.646973E-01 + 8228 8.22700E+00 -3.646530E-01 + 8229 8.22800E+00 -3.646087E-01 + 8230 8.22900E+00 -3.645643E-01 + 8231 8.23000E+00 -3.645201E-01 + 8232 8.23100E+00 -3.644758E-01 + 8233 8.23200E+00 -3.644315E-01 + 8234 8.23300E+00 -3.643872E-01 + 8235 8.23400E+00 -3.643430E-01 + 8236 8.23500E+00 -3.642987E-01 + 8237 8.23600E+00 -3.642545E-01 + 8238 8.23700E+00 -3.642103E-01 + 8239 8.23800E+00 -3.641660E-01 + 8240 8.23900E+00 -3.641218E-01 + 8241 8.24000E+00 -3.640777E-01 + 8242 8.24100E+00 -3.640335E-01 + 8243 8.24200E+00 -3.639893E-01 + 8244 8.24300E+00 -3.639451E-01 + 8245 8.24400E+00 -3.639010E-01 + 8246 8.24500E+00 -3.638569E-01 + 8247 8.24600E+00 -3.638127E-01 + 8248 8.24700E+00 -3.637686E-01 + 8249 8.24800E+00 -3.637245E-01 + 8250 8.24900E+00 -3.636804E-01 + 8251 8.25000E+00 -3.636363E-01 + 8252 8.25100E+00 -3.635923E-01 + 8253 8.25200E+00 -3.635482E-01 + 8254 8.25300E+00 -3.635041E-01 + 8255 8.25400E+00 -3.634601E-01 + 8256 8.25500E+00 -3.634161E-01 + 8257 8.25600E+00 -3.633721E-01 + 8258 8.25700E+00 -3.633280E-01 + 8259 8.25800E+00 -3.632840E-01 + 8260 8.25900E+00 -3.632401E-01 + 8261 8.26000E+00 -3.631961E-01 + 8262 8.26100E+00 -3.631521E-01 + 8263 8.26200E+00 -3.631082E-01 + 8264 8.26300E+00 -3.630642E-01 + 8265 8.26400E+00 -3.630203E-01 + 8266 8.26500E+00 -3.629764E-01 + 8267 8.26600E+00 -3.629324E-01 + 8268 8.26700E+00 -3.628885E-01 + 8269 8.26800E+00 -3.628447E-01 + 8270 8.26900E+00 -3.628008E-01 + 8271 8.27000E+00 -3.627569E-01 + 8272 8.27100E+00 -3.627130E-01 + 8273 8.27200E+00 -3.626692E-01 + 8274 8.27300E+00 -3.626254E-01 + 8275 8.27400E+00 -3.625815E-01 + 8276 8.27500E+00 -3.625377E-01 + 8277 8.27600E+00 -3.624939E-01 + 8278 8.27700E+00 -3.624501E-01 + 8279 8.27800E+00 -3.624063E-01 + 8280 8.27900E+00 -3.623626E-01 + 8281 8.28000E+00 -3.623188E-01 + 8282 8.28100E+00 -3.622750E-01 + 8283 8.28200E+00 -3.622313E-01 + 8284 8.28300E+00 -3.621876E-01 + 8285 8.28400E+00 -3.621439E-01 + 8286 8.28500E+00 -3.621001E-01 + 8287 8.28600E+00 -3.620564E-01 + 8288 8.28700E+00 -3.620128E-01 + 8289 8.28800E+00 -3.619691E-01 + 8290 8.28900E+00 -3.619254E-01 + 8291 8.29000E+00 -3.618818E-01 + 8292 8.29100E+00 -3.618381E-01 + 8293 8.29200E+00 -3.617945E-01 + 8294 8.29300E+00 -3.617509E-01 + 8295 8.29400E+00 -3.617072E-01 + 8296 8.29500E+00 -3.616636E-01 + 8297 8.29600E+00 -3.616200E-01 + 8298 8.29700E+00 -3.615765E-01 + 8299 8.29800E+00 -3.615329E-01 + 8300 8.29900E+00 -3.614893E-01 + 8301 8.30000E+00 -3.614458E-01 + 8302 8.30100E+00 -3.614022E-01 + 8303 8.30200E+00 -3.613587E-01 + 8304 8.30300E+00 -3.613152E-01 + 8305 8.30400E+00 -3.612717E-01 + 8306 8.30500E+00 -3.612282E-01 + 8307 8.30600E+00 -3.611847E-01 + 8308 8.30700E+00 -3.611412E-01 + 8309 8.30800E+00 -3.610977E-01 + 8310 8.30900E+00 -3.610543E-01 + 8311 8.31000E+00 -3.610108E-01 + 8312 8.31100E+00 -3.609674E-01 + 8313 8.31200E+00 -3.609240E-01 + 8314 8.31300E+00 -3.608806E-01 + 8315 8.31400E+00 -3.608372E-01 + 8316 8.31500E+00 -3.607938E-01 + 8317 8.31600E+00 -3.607504E-01 + 8318 8.31700E+00 -3.607070E-01 + 8319 8.31800E+00 -3.606636E-01 + 8320 8.31900E+00 -3.606203E-01 + 8321 8.32000E+00 -3.605769E-01 + 8322 8.32100E+00 -3.605336E-01 + 8323 8.32200E+00 -3.604903E-01 + 8324 8.32300E+00 -3.604470E-01 + 8325 8.32400E+00 -3.604037E-01 + 8326 8.32500E+00 -3.603604E-01 + 8327 8.32600E+00 -3.603171E-01 + 8328 8.32700E+00 -3.602738E-01 + 8329 8.32800E+00 -3.602306E-01 + 8330 8.32900E+00 -3.601873E-01 + 8331 8.33000E+00 -3.601441E-01 + 8332 8.33100E+00 -3.601008E-01 + 8333 8.33200E+00 -3.600576E-01 + 8334 8.33300E+00 -3.600144E-01 + 8335 8.33400E+00 -3.599712E-01 + 8336 8.33500E+00 -3.599280E-01 + 8337 8.33600E+00 -3.598848E-01 + 8338 8.33700E+00 -3.598417E-01 + 8339 8.33800E+00 -3.597985E-01 + 8340 8.33900E+00 -3.597554E-01 + 8341 8.34000E+00 -3.597122E-01 + 8342 8.34100E+00 -3.596691E-01 + 8343 8.34200E+00 -3.596260E-01 + 8344 8.34300E+00 -3.595829E-01 + 8345 8.34400E+00 -3.595398E-01 + 8346 8.34500E+00 -3.594967E-01 + 8347 8.34600E+00 -3.594536E-01 + 8348 8.34700E+00 -3.594105E-01 + 8349 8.34800E+00 -3.593675E-01 + 8350 8.34900E+00 -3.593244E-01 + 8351 8.35000E+00 -3.592814E-01 + 8352 8.35100E+00 -3.592384E-01 + 8353 8.35200E+00 -3.591954E-01 + 8354 8.35300E+00 -3.591524E-01 + 8355 8.35400E+00 -3.591094E-01 + 8356 8.35500E+00 -3.590664E-01 + 8357 8.35600E+00 -3.590234E-01 + 8358 8.35700E+00 -3.589805E-01 + 8359 8.35800E+00 -3.589375E-01 + 8360 8.35900E+00 -3.588946E-01 + 8361 8.36000E+00 -3.588516E-01 + 8362 8.36100E+00 -3.588087E-01 + 8363 8.36200E+00 -3.587658E-01 + 8364 8.36300E+00 -3.587229E-01 + 8365 8.36400E+00 -3.586800E-01 + 8366 8.36500E+00 -3.586371E-01 + 8367 8.36600E+00 -3.585943E-01 + 8368 8.36700E+00 -3.585514E-01 + 8369 8.36800E+00 -3.585086E-01 + 8370 8.36900E+00 -3.584657E-01 + 8371 8.37000E+00 -3.584229E-01 + 8372 8.37100E+00 -3.583801E-01 + 8373 8.37200E+00 -3.583373E-01 + 8374 8.37300E+00 -3.582945E-01 + 8375 8.37400E+00 -3.582517E-01 + 8376 8.37500E+00 -3.582089E-01 + 8377 8.37600E+00 -3.581661E-01 + 8378 8.37700E+00 -3.581234E-01 + 8379 8.37800E+00 -3.580806E-01 + 8380 8.37900E+00 -3.580379E-01 + 8381 8.38000E+00 -3.579952E-01 + 8382 8.38100E+00 -3.579525E-01 + 8383 8.38200E+00 -3.579098E-01 + 8384 8.38300E+00 -3.578671E-01 + 8385 8.38400E+00 -3.578244E-01 + 8386 8.38500E+00 -3.577817E-01 + 8387 8.38600E+00 -3.577391E-01 + 8388 8.38700E+00 -3.576964E-01 + 8389 8.38800E+00 -3.576538E-01 + 8390 8.38900E+00 -3.576111E-01 + 8391 8.39000E+00 -3.575685E-01 + 8392 8.39100E+00 -3.575259E-01 + 8393 8.39200E+00 -3.574833E-01 + 8394 8.39300E+00 -3.574407E-01 + 8395 8.39400E+00 -3.573981E-01 + 8396 8.39500E+00 -3.573556E-01 + 8397 8.39600E+00 -3.573130E-01 + 8398 8.39700E+00 -3.572704E-01 + 8399 8.39800E+00 -3.572279E-01 + 8400 8.39900E+00 -3.571854E-01 + 8401 8.40000E+00 -3.571429E-01 + 8402 8.40100E+00 -3.571003E-01 + 8403 8.40200E+00 -3.570578E-01 + 8404 8.40300E+00 -3.570154E-01 + 8405 8.40400E+00 -3.569729E-01 + 8406 8.40500E+00 -3.569304E-01 + 8407 8.40600E+00 -3.568879E-01 + 8408 8.40700E+00 -3.568455E-01 + 8409 8.40800E+00 -3.568031E-01 + 8410 8.40900E+00 -3.567606E-01 + 8411 8.41000E+00 -3.567182E-01 + 8412 8.41100E+00 -3.566758E-01 + 8413 8.41200E+00 -3.566334E-01 + 8414 8.41300E+00 -3.565910E-01 + 8415 8.41400E+00 -3.565486E-01 + 8416 8.41500E+00 -3.565063E-01 + 8417 8.41600E+00 -3.564639E-01 + 8418 8.41700E+00 -3.564215E-01 + 8419 8.41800E+00 -3.563792E-01 + 8420 8.41900E+00 -3.563369E-01 + 8421 8.42000E+00 -3.562946E-01 + 8422 8.42100E+00 -3.562522E-01 + 8423 8.42200E+00 -3.562099E-01 + 8424 8.42300E+00 -3.561677E-01 + 8425 8.42400E+00 -3.561254E-01 + 8426 8.42500E+00 -3.560831E-01 + 8427 8.42600E+00 -3.560408E-01 + 8428 8.42700E+00 -3.559986E-01 + 8429 8.42800E+00 -3.559563E-01 + 8430 8.42900E+00 -3.559141E-01 + 8431 8.43000E+00 -3.558719E-01 + 8432 8.43100E+00 -3.558297E-01 + 8433 8.43200E+00 -3.557875E-01 + 8434 8.43300E+00 -3.557453E-01 + 8435 8.43400E+00 -3.557031E-01 + 8436 8.43500E+00 -3.556609E-01 + 8437 8.43600E+00 -3.556188E-01 + 8438 8.43700E+00 -3.555766E-01 + 8439 8.43800E+00 -3.555345E-01 + 8440 8.43900E+00 -3.554924E-01 + 8441 8.44000E+00 -3.554502E-01 + 8442 8.44100E+00 -3.554081E-01 + 8443 8.44200E+00 -3.553660E-01 + 8444 8.44300E+00 -3.553239E-01 + 8445 8.44400E+00 -3.552818E-01 + 8446 8.44500E+00 -3.552398E-01 + 8447 8.44600E+00 -3.551977E-01 + 8448 8.44700E+00 -3.551557E-01 + 8449 8.44800E+00 -3.551136E-01 + 8450 8.44900E+00 -3.550716E-01 + 8451 8.45000E+00 -3.550296E-01 + 8452 8.45100E+00 -3.549876E-01 + 8453 8.45200E+00 -3.549456E-01 + 8454 8.45300E+00 -3.549036E-01 + 8455 8.45400E+00 -3.548616E-01 + 8456 8.45500E+00 -3.548196E-01 + 8457 8.45600E+00 -3.547776E-01 + 8458 8.45700E+00 -3.547357E-01 + 8459 8.45800E+00 -3.546938E-01 + 8460 8.45900E+00 -3.546518E-01 + 8461 8.46000E+00 -3.546099E-01 + 8462 8.46100E+00 -3.545680E-01 + 8463 8.46200E+00 -3.545261E-01 + 8464 8.46300E+00 -3.544842E-01 + 8465 8.46400E+00 -3.544423E-01 + 8466 8.46500E+00 -3.544004E-01 + 8467 8.46600E+00 -3.543586E-01 + 8468 8.46700E+00 -3.543167E-01 + 8469 8.46800E+00 -3.542749E-01 + 8470 8.46900E+00 -3.542330E-01 + 8471 8.47000E+00 -3.541912E-01 + 8472 8.47100E+00 -3.541494E-01 + 8473 8.47200E+00 -3.541076E-01 + 8474 8.47300E+00 -3.540658E-01 + 8475 8.47400E+00 -3.540240E-01 + 8476 8.47500E+00 -3.539823E-01 + 8477 8.47600E+00 -3.539405E-01 + 8478 8.47700E+00 -3.538987E-01 + 8479 8.47800E+00 -3.538570E-01 + 8480 8.47900E+00 -3.538153E-01 + 8481 8.48000E+00 -3.537735E-01 + 8482 8.48100E+00 -3.537318E-01 + 8483 8.48200E+00 -3.536901E-01 + 8484 8.48300E+00 -3.536484E-01 + 8485 8.48400E+00 -3.536067E-01 + 8486 8.48500E+00 -3.535651E-01 + 8487 8.48600E+00 -3.535234E-01 + 8488 8.48700E+00 -3.534818E-01 + 8489 8.48800E+00 -3.534401E-01 + 8490 8.48900E+00 -3.533985E-01 + 8491 8.49000E+00 -3.533569E-01 + 8492 8.49100E+00 -3.533152E-01 + 8493 8.49200E+00 -3.532736E-01 + 8494 8.49300E+00 -3.532320E-01 + 8495 8.49400E+00 -3.531905E-01 + 8496 8.49500E+00 -3.531489E-01 + 8497 8.49600E+00 -3.531073E-01 + 8498 8.49700E+00 -3.530658E-01 + 8499 8.49800E+00 -3.530242E-01 + 8500 8.49900E+00 -3.529827E-01 + 8501 8.50000E+00 -3.529412E-01 + 8502 8.50100E+00 -3.528997E-01 + 8503 8.50200E+00 -3.528581E-01 + 8504 8.50300E+00 -3.528167E-01 + 8505 8.50400E+00 -3.527752E-01 + 8506 8.50500E+00 -3.527337E-01 + 8507 8.50600E+00 -3.526922E-01 + 8508 8.50700E+00 -3.526508E-01 + 8509 8.50800E+00 -3.526093E-01 + 8510 8.50900E+00 -3.525679E-01 + 8511 8.51000E+00 -3.525265E-01 + 8512 8.51100E+00 -3.524850E-01 + 8513 8.51200E+00 -3.524436E-01 + 8514 8.51300E+00 -3.524022E-01 + 8515 8.51400E+00 -3.523608E-01 + 8516 8.51500E+00 -3.523195E-01 + 8517 8.51600E+00 -3.522781E-01 + 8518 8.51700E+00 -3.522367E-01 + 8519 8.51800E+00 -3.521954E-01 + 8520 8.51900E+00 -3.521540E-01 + 8521 8.52000E+00 -3.521127E-01 + 8522 8.52100E+00 -3.520714E-01 + 8523 8.52200E+00 -3.520301E-01 + 8524 8.52300E+00 -3.519888E-01 + 8525 8.52400E+00 -3.519475E-01 + 8526 8.52500E+00 -3.519062E-01 + 8527 8.52600E+00 -3.518649E-01 + 8528 8.52700E+00 -3.518236E-01 + 8529 8.52800E+00 -3.517824E-01 + 8530 8.52900E+00 -3.517411E-01 + 8531 8.53000E+00 -3.516999E-01 + 8532 8.53100E+00 -3.516587E-01 + 8533 8.53200E+00 -3.516175E-01 + 8534 8.53300E+00 -3.515762E-01 + 8535 8.53400E+00 -3.515350E-01 + 8536 8.53500E+00 -3.514939E-01 + 8537 8.53600E+00 -3.514527E-01 + 8538 8.53700E+00 -3.514115E-01 + 8539 8.53800E+00 -3.513703E-01 + 8540 8.53900E+00 -3.513292E-01 + 8541 8.54000E+00 -3.512881E-01 + 8542 8.54100E+00 -3.512469E-01 + 8543 8.54200E+00 -3.512058E-01 + 8544 8.54300E+00 -3.511647E-01 + 8545 8.54400E+00 -3.511236E-01 + 8546 8.54500E+00 -3.510825E-01 + 8547 8.54600E+00 -3.510414E-01 + 8548 8.54700E+00 -3.510003E-01 + 8549 8.54800E+00 -3.509593E-01 + 8550 8.54900E+00 -3.509182E-01 + 8551 8.55000E+00 -3.508772E-01 + 8552 8.55100E+00 -3.508361E-01 + 8553 8.55200E+00 -3.507951E-01 + 8554 8.55300E+00 -3.507541E-01 + 8555 8.55400E+00 -3.507131E-01 + 8556 8.55500E+00 -3.506721E-01 + 8557 8.55600E+00 -3.506311E-01 + 8558 8.55700E+00 -3.505901E-01 + 8559 8.55800E+00 -3.505492E-01 + 8560 8.55900E+00 -3.505082E-01 + 8561 8.56000E+00 -3.504673E-01 + 8562 8.56100E+00 -3.504263E-01 + 8563 8.56200E+00 -3.503854E-01 + 8564 8.56300E+00 -3.503445E-01 + 8565 8.56400E+00 -3.503036E-01 + 8566 8.56500E+00 -3.502627E-01 + 8567 8.56600E+00 -3.502218E-01 + 8568 8.56700E+00 -3.501809E-01 + 8569 8.56800E+00 -3.501400E-01 + 8570 8.56900E+00 -3.500992E-01 + 8571 8.57000E+00 -3.500583E-01 + 8572 8.57100E+00 -3.500175E-01 + 8573 8.57200E+00 -3.499766E-01 + 8574 8.57300E+00 -3.499358E-01 + 8575 8.57400E+00 -3.498950E-01 + 8576 8.57500E+00 -3.498542E-01 + 8577 8.57600E+00 -3.498134E-01 + 8578 8.57700E+00 -3.497726E-01 + 8579 8.57800E+00 -3.497318E-01 + 8580 8.57900E+00 -3.496911E-01 + 8581 8.58000E+00 -3.496503E-01 + 8582 8.58100E+00 -3.496096E-01 + 8583 8.58200E+00 -3.495688E-01 + 8584 8.58300E+00 -3.495281E-01 + 8585 8.58400E+00 -3.494874E-01 + 8586 8.58500E+00 -3.494467E-01 + 8587 8.58600E+00 -3.494060E-01 + 8588 8.58700E+00 -3.493653E-01 + 8589 8.58800E+00 -3.493246E-01 + 8590 8.58900E+00 -3.492839E-01 + 8591 8.59000E+00 -3.492433E-01 + 8592 8.59100E+00 -3.492026E-01 + 8593 8.59200E+00 -3.491620E-01 + 8594 8.59300E+00 -3.491213E-01 + 8595 8.59400E+00 -3.490807E-01 + 8596 8.59500E+00 -3.490401E-01 + 8597 8.59600E+00 -3.489995E-01 + 8598 8.59700E+00 -3.489589E-01 + 8599 8.59800E+00 -3.489183E-01 + 8600 8.59900E+00 -3.488777E-01 + 8601 8.60000E+00 -3.488372E-01 + 8602 8.60100E+00 -3.487966E-01 + 8603 8.60200E+00 -3.487561E-01 + 8604 8.60300E+00 -3.487155E-01 + 8605 8.60400E+00 -3.486750E-01 + 8606 8.60500E+00 -3.486345E-01 + 8607 8.60600E+00 -3.485940E-01 + 8608 8.60700E+00 -3.485535E-01 + 8609 8.60800E+00 -3.485130E-01 + 8610 8.60900E+00 -3.484725E-01 + 8611 8.61000E+00 -3.484321E-01 + 8612 8.61100E+00 -3.483916E-01 + 8613 8.61200E+00 -3.483511E-01 + 8614 8.61300E+00 -3.483107E-01 + 8615 8.61400E+00 -3.482703E-01 + 8616 8.61500E+00 -3.482298E-01 + 8617 8.61600E+00 -3.481894E-01 + 8618 8.61700E+00 -3.481490E-01 + 8619 8.61800E+00 -3.481086E-01 + 8620 8.61900E+00 -3.480682E-01 + 8621 8.62000E+00 -3.480279E-01 + 8622 8.62100E+00 -3.479875E-01 + 8623 8.62200E+00 -3.479471E-01 + 8624 8.62300E+00 -3.479068E-01 + 8625 8.62400E+00 -3.478664E-01 + 8626 8.62500E+00 -3.478261E-01 + 8627 8.62600E+00 -3.477858E-01 + 8628 8.62700E+00 -3.477455E-01 + 8629 8.62800E+00 -3.477052E-01 + 8630 8.62900E+00 -3.476649E-01 + 8631 8.63000E+00 -3.476246E-01 + 8632 8.63100E+00 -3.475843E-01 + 8633 8.63200E+00 -3.475440E-01 + 8634 8.63300E+00 -3.475038E-01 + 8635 8.63400E+00 -3.474635E-01 + 8636 8.63500E+00 -3.474233E-01 + 8637 8.63600E+00 -3.473831E-01 + 8638 8.63700E+00 -3.473428E-01 + 8639 8.63800E+00 -3.473026E-01 + 8640 8.63900E+00 -3.472624E-01 + 8641 8.64000E+00 -3.472222E-01 + 8642 8.64100E+00 -3.471820E-01 + 8643 8.64200E+00 -3.471419E-01 + 8644 8.64300E+00 -3.471017E-01 + 8645 8.64400E+00 -3.470615E-01 + 8646 8.64500E+00 -3.470214E-01 + 8647 8.64600E+00 -3.469813E-01 + 8648 8.64700E+00 -3.469411E-01 + 8649 8.64800E+00 -3.469010E-01 + 8650 8.64900E+00 -3.468609E-01 + 8651 8.65000E+00 -3.468208E-01 + 8652 8.65100E+00 -3.467807E-01 + 8653 8.65200E+00 -3.467406E-01 + 8654 8.65300E+00 -3.467006E-01 + 8655 8.65400E+00 -3.466605E-01 + 8656 8.65500E+00 -3.466204E-01 + 8657 8.65600E+00 -3.465804E-01 + 8658 8.65700E+00 -3.465404E-01 + 8659 8.65800E+00 -3.465003E-01 + 8660 8.65900E+00 -3.464603E-01 + 8661 8.66000E+00 -3.464203E-01 + 8662 8.66100E+00 -3.463803E-01 + 8663 8.66200E+00 -3.463403E-01 + 8664 8.66300E+00 -3.463003E-01 + 8665 8.66400E+00 -3.462604E-01 + 8666 8.66500E+00 -3.462204E-01 + 8667 8.66600E+00 -3.461804E-01 + 8668 8.66700E+00 -3.461405E-01 + 8669 8.66800E+00 -3.461006E-01 + 8670 8.66900E+00 -3.460606E-01 + 8671 8.67000E+00 -3.460207E-01 + 8672 8.67100E+00 -3.459808E-01 + 8673 8.67200E+00 -3.459409E-01 + 8674 8.67300E+00 -3.459010E-01 + 8675 8.67400E+00 -3.458612E-01 + 8676 8.67500E+00 -3.458213E-01 + 8677 8.67600E+00 -3.457814E-01 + 8678 8.67700E+00 -3.457416E-01 + 8679 8.67800E+00 -3.457017E-01 + 8680 8.67900E+00 -3.456619E-01 + 8681 8.68000E+00 -3.456221E-01 + 8682 8.68100E+00 -3.455823E-01 + 8683 8.68200E+00 -3.455425E-01 + 8684 8.68300E+00 -3.455027E-01 + 8685 8.68400E+00 -3.454629E-01 + 8686 8.68500E+00 -3.454231E-01 + 8687 8.68600E+00 -3.453833E-01 + 8688 8.68700E+00 -3.453436E-01 + 8689 8.68800E+00 -3.453038E-01 + 8690 8.68900E+00 -3.452641E-01 + 8691 8.69000E+00 -3.452243E-01 + 8692 8.69100E+00 -3.451846E-01 + 8693 8.69200E+00 -3.451449E-01 + 8694 8.69300E+00 -3.451052E-01 + 8695 8.69400E+00 -3.450655E-01 + 8696 8.69500E+00 -3.450258E-01 + 8697 8.69600E+00 -3.449862E-01 + 8698 8.69700E+00 -3.449465E-01 + 8699 8.69800E+00 -3.449068E-01 + 8700 8.69900E+00 -3.448672E-01 + 8701 8.70000E+00 -3.448275E-01 + 8702 8.70100E+00 -3.447879E-01 + 8703 8.70200E+00 -3.447483E-01 + 8704 8.70300E+00 -3.447087E-01 + 8705 8.70400E+00 -3.446691E-01 + 8706 8.70500E+00 -3.446295E-01 + 8707 8.70600E+00 -3.445899E-01 + 8708 8.70700E+00 -3.445503E-01 + 8709 8.70800E+00 -3.445108E-01 + 8710 8.70900E+00 -3.444712E-01 + 8711 8.71000E+00 -3.444317E-01 + 8712 8.71100E+00 -3.443921E-01 + 8713 8.71200E+00 -3.443526E-01 + 8714 8.71300E+00 -3.443131E-01 + 8715 8.71400E+00 -3.442736E-01 + 8716 8.71500E+00 -3.442341E-01 + 8717 8.71600E+00 -3.441946E-01 + 8718 8.71700E+00 -3.441551E-01 + 8719 8.71800E+00 -3.441156E-01 + 8720 8.71900E+00 -3.440762E-01 + 8721 8.72000E+00 -3.440367E-01 + 8722 8.72100E+00 -3.439973E-01 + 8723 8.72200E+00 -3.439578E-01 + 8724 8.72300E+00 -3.439184E-01 + 8725 8.72400E+00 -3.438790E-01 + 8726 8.72500E+00 -3.438395E-01 + 8727 8.72600E+00 -3.438001E-01 + 8728 8.72700E+00 -3.437608E-01 + 8729 8.72800E+00 -3.437214E-01 + 8730 8.72900E+00 -3.436820E-01 + 8731 8.73000E+00 -3.436426E-01 + 8732 8.73100E+00 -3.436033E-01 + 8733 8.73200E+00 -3.435639E-01 + 8734 8.73300E+00 -3.435246E-01 + 8735 8.73400E+00 -3.434852E-01 + 8736 8.73500E+00 -3.434459E-01 + 8737 8.73600E+00 -3.434066E-01 + 8738 8.73700E+00 -3.433673E-01 + 8739 8.73800E+00 -3.433280E-01 + 8740 8.73900E+00 -3.432887E-01 + 8741 8.74000E+00 -3.432494E-01 + 8742 8.74100E+00 -3.432102E-01 + 8743 8.74200E+00 -3.431709E-01 + 8744 8.74300E+00 -3.431317E-01 + 8745 8.74400E+00 -3.430924E-01 + 8746 8.74500E+00 -3.430532E-01 + 8747 8.74600E+00 -3.430140E-01 + 8748 8.74700E+00 -3.429747E-01 + 8749 8.74800E+00 -3.429355E-01 + 8750 8.74900E+00 -3.428963E-01 + 8751 8.75000E+00 -3.428571E-01 + 8752 8.75100E+00 -3.428180E-01 + 8753 8.75200E+00 -3.427788E-01 + 8754 8.75300E+00 -3.427396E-01 + 8755 8.75400E+00 -3.427005E-01 + 8756 8.75500E+00 -3.426613E-01 + 8757 8.75600E+00 -3.426222E-01 + 8758 8.75700E+00 -3.425831E-01 + 8759 8.75800E+00 -3.425439E-01 + 8760 8.75900E+00 -3.425048E-01 + 8761 8.76000E+00 -3.424657E-01 + 8762 8.76100E+00 -3.424266E-01 + 8763 8.76200E+00 -3.423876E-01 + 8764 8.76300E+00 -3.423485E-01 + 8765 8.76400E+00 -3.423094E-01 + 8766 8.76500E+00 -3.422704E-01 + 8767 8.76600E+00 -3.422313E-01 + 8768 8.76700E+00 -3.421923E-01 + 8769 8.76800E+00 -3.421533E-01 + 8770 8.76900E+00 -3.421142E-01 + 8771 8.77000E+00 -3.420752E-01 + 8772 8.77100E+00 -3.420362E-01 + 8773 8.77200E+00 -3.419972E-01 + 8774 8.77300E+00 -3.419582E-01 + 8775 8.77400E+00 -3.419193E-01 + 8776 8.77500E+00 -3.418803E-01 + 8777 8.77600E+00 -3.418413E-01 + 8778 8.77700E+00 -3.418024E-01 + 8779 8.77800E+00 -3.417635E-01 + 8780 8.77900E+00 -3.417245E-01 + 8781 8.78000E+00 -3.416856E-01 + 8782 8.78100E+00 -3.416467E-01 + 8783 8.78200E+00 -3.416078E-01 + 8784 8.78300E+00 -3.415689E-01 + 8785 8.78400E+00 -3.415300E-01 + 8786 8.78500E+00 -3.414911E-01 + 8787 8.78600E+00 -3.414523E-01 + 8788 8.78700E+00 -3.414134E-01 + 8789 8.78800E+00 -3.413746E-01 + 8790 8.78900E+00 -3.413357E-01 + 8791 8.79000E+00 -3.412969E-01 + 8792 8.79100E+00 -3.412581E-01 + 8793 8.79200E+00 -3.412192E-01 + 8794 8.79300E+00 -3.411804E-01 + 8795 8.79400E+00 -3.411416E-01 + 8796 8.79500E+00 -3.411029E-01 + 8797 8.79600E+00 -3.410641E-01 + 8798 8.79700E+00 -3.410253E-01 + 8799 8.79800E+00 -3.409865E-01 + 8800 8.79900E+00 -3.409478E-01 + 8801 8.80000E+00 -3.409090E-01 + 8802 8.80100E+00 -3.408703E-01 + 8803 8.80200E+00 -3.408316E-01 + 8804 8.80300E+00 -3.407929E-01 + 8805 8.80400E+00 -3.407542E-01 + 8806 8.80500E+00 -3.407155E-01 + 8807 8.80600E+00 -3.406768E-01 + 8808 8.80700E+00 -3.406381E-01 + 8809 8.80800E+00 -3.405994E-01 + 8810 8.80900E+00 -3.405608E-01 + 8811 8.81000E+00 -3.405221E-01 + 8812 8.81100E+00 -3.404835E-01 + 8813 8.81200E+00 -3.404448E-01 + 8814 8.81300E+00 -3.404062E-01 + 8815 8.81400E+00 -3.403676E-01 + 8816 8.81500E+00 -3.403290E-01 + 8817 8.81600E+00 -3.402904E-01 + 8818 8.81700E+00 -3.402518E-01 + 8819 8.81800E+00 -3.402132E-01 + 8820 8.81900E+00 -3.401746E-01 + 8821 8.82000E+00 -3.401360E-01 + 8822 8.82100E+00 -3.400975E-01 + 8823 8.82200E+00 -3.400589E-01 + 8824 8.82300E+00 -3.400204E-01 + 8825 8.82400E+00 -3.399819E-01 + 8826 8.82500E+00 -3.399433E-01 + 8827 8.82600E+00 -3.399048E-01 + 8828 8.82700E+00 -3.398663E-01 + 8829 8.82800E+00 -3.398278E-01 + 8830 8.82900E+00 -3.397893E-01 + 8831 8.83000E+00 -3.397509E-01 + 8832 8.83100E+00 -3.397124E-01 + 8833 8.83200E+00 -3.396739E-01 + 8834 8.83300E+00 -3.396355E-01 + 8835 8.83400E+00 -3.395970E-01 + 8836 8.83500E+00 -3.395586E-01 + 8837 8.83600E+00 -3.395202E-01 + 8838 8.83700E+00 -3.394817E-01 + 8839 8.83800E+00 -3.394433E-01 + 8840 8.83900E+00 -3.394049E-01 + 8841 8.84000E+00 -3.393665E-01 + 8842 8.84100E+00 -3.393281E-01 + 8843 8.84200E+00 -3.392898E-01 + 8844 8.84300E+00 -3.392514E-01 + 8845 8.84400E+00 -3.392130E-01 + 8846 8.84500E+00 -3.391747E-01 + 8847 8.84600E+00 -3.391363E-01 + 8848 8.84700E+00 -3.390980E-01 + 8849 8.84800E+00 -3.390597E-01 + 8850 8.84900E+00 -3.390214E-01 + 8851 8.85000E+00 -3.389831E-01 + 8852 8.85100E+00 -3.389448E-01 + 8853 8.85200E+00 -3.389065E-01 + 8854 8.85300E+00 -3.388682E-01 + 8855 8.85400E+00 -3.388299E-01 + 8856 8.85500E+00 -3.387916E-01 + 8857 8.85600E+00 -3.387534E-01 + 8858 8.85700E+00 -3.387151E-01 + 8859 8.85800E+00 -3.386769E-01 + 8860 8.85900E+00 -3.386387E-01 + 8861 8.86000E+00 -3.386004E-01 + 8862 8.86100E+00 -3.385622E-01 + 8863 8.86200E+00 -3.385240E-01 + 8864 8.86300E+00 -3.384858E-01 + 8865 8.86400E+00 -3.384476E-01 + 8866 8.86500E+00 -3.384095E-01 + 8867 8.86600E+00 -3.383713E-01 + 8868 8.86700E+00 -3.383331E-01 + 8869 8.86800E+00 -3.382950E-01 + 8870 8.86900E+00 -3.382568E-01 + 8871 8.87000E+00 -3.382187E-01 + 8872 8.87100E+00 -3.381806E-01 + 8873 8.87200E+00 -3.381425E-01 + 8874 8.87300E+00 -3.381043E-01 + 8875 8.87400E+00 -3.380662E-01 + 8876 8.87500E+00 -3.380281E-01 + 8877 8.87600E+00 -3.379901E-01 + 8878 8.87700E+00 -3.379520E-01 + 8879 8.87800E+00 -3.379139E-01 + 8880 8.87900E+00 -3.378759E-01 + 8881 8.88000E+00 -3.378378E-01 + 8882 8.88100E+00 -3.377998E-01 + 8883 8.88200E+00 -3.377617E-01 + 8884 8.88300E+00 -3.377237E-01 + 8885 8.88400E+00 -3.376857E-01 + 8886 8.88500E+00 -3.376477E-01 + 8887 8.88600E+00 -3.376097E-01 + 8888 8.88700E+00 -3.375717E-01 + 8889 8.88800E+00 -3.375337E-01 + 8890 8.88900E+00 -3.374957E-01 + 8891 8.89000E+00 -3.374578E-01 + 8892 8.89100E+00 -3.374198E-01 + 8893 8.89200E+00 -3.373819E-01 + 8894 8.89300E+00 -3.373439E-01 + 8895 8.89400E+00 -3.373060E-01 + 8896 8.89500E+00 -3.372681E-01 + 8897 8.89600E+00 -3.372302E-01 + 8898 8.89700E+00 -3.371923E-01 + 8899 8.89800E+00 -3.371544E-01 + 8900 8.89900E+00 -3.371165E-01 + 8901 8.90000E+00 -3.370786E-01 + 8902 8.90100E+00 -3.370407E-01 + 8903 8.90200E+00 -3.370029E-01 + 8904 8.90300E+00 -3.369650E-01 + 8905 8.90400E+00 -3.369272E-01 + 8906 8.90500E+00 -3.368893E-01 + 8907 8.90600E+00 -3.368515E-01 + 8908 8.90700E+00 -3.368137E-01 + 8909 8.90800E+00 -3.367759E-01 + 8910 8.90900E+00 -3.367381E-01 + 8911 8.91000E+00 -3.367003E-01 + 8912 8.91100E+00 -3.366625E-01 + 8913 8.91200E+00 -3.366247E-01 + 8914 8.91300E+00 -3.365870E-01 + 8915 8.91400E+00 -3.365492E-01 + 8916 8.91500E+00 -3.365115E-01 + 8917 8.91600E+00 -3.364737E-01 + 8918 8.91700E+00 -3.364360E-01 + 8919 8.91800E+00 -3.363983E-01 + 8920 8.91900E+00 -3.363606E-01 + 8921 8.92000E+00 -3.363228E-01 + 8922 8.92100E+00 -3.362851E-01 + 8923 8.92200E+00 -3.362475E-01 + 8924 8.92300E+00 -3.362098E-01 + 8925 8.92400E+00 -3.361721E-01 + 8926 8.92500E+00 -3.361344E-01 + 8927 8.92600E+00 -3.360968E-01 + 8928 8.92700E+00 -3.360591E-01 + 8929 8.92800E+00 -3.360215E-01 + 8930 8.92900E+00 -3.359839E-01 + 8931 8.93000E+00 -3.359462E-01 + 8932 8.93100E+00 -3.359086E-01 + 8933 8.93200E+00 -3.358710E-01 + 8934 8.93300E+00 -3.358334E-01 + 8935 8.93400E+00 -3.357958E-01 + 8936 8.93500E+00 -3.357583E-01 + 8937 8.93600E+00 -3.357207E-01 + 8938 8.93700E+00 -3.356831E-01 + 8939 8.93800E+00 -3.356456E-01 + 8940 8.93900E+00 -3.356080E-01 + 8941 8.94000E+00 -3.355705E-01 + 8942 8.94100E+00 -3.355330E-01 + 8943 8.94200E+00 -3.354954E-01 + 8944 8.94300E+00 -3.354579E-01 + 8945 8.94400E+00 -3.354204E-01 + 8946 8.94500E+00 -3.353829E-01 + 8947 8.94600E+00 -3.353454E-01 + 8948 8.94700E+00 -3.353079E-01 + 8949 8.94800E+00 -3.352705E-01 + 8950 8.94900E+00 -3.352330E-01 + 8951 8.95000E+00 -3.351955E-01 + 8952 8.95100E+00 -3.351581E-01 + 8953 8.95200E+00 -3.351207E-01 + 8954 8.95300E+00 -3.350832E-01 + 8955 8.95400E+00 -3.350458E-01 + 8956 8.95500E+00 -3.350084E-01 + 8957 8.95600E+00 -3.349710E-01 + 8958 8.95700E+00 -3.349336E-01 + 8959 8.95800E+00 -3.348962E-01 + 8960 8.95900E+00 -3.348588E-01 + 8961 8.96000E+00 -3.348214E-01 + 8962 8.96100E+00 -3.347841E-01 + 8963 8.96200E+00 -3.347467E-01 + 8964 8.96300E+00 -3.347094E-01 + 8965 8.96400E+00 -3.346720E-01 + 8966 8.96500E+00 -3.346347E-01 + 8967 8.96600E+00 -3.345974E-01 + 8968 8.96700E+00 -3.345601E-01 + 8969 8.96800E+00 -3.345228E-01 + 8970 8.96900E+00 -3.344855E-01 + 8971 8.97000E+00 -3.344482E-01 + 8972 8.97100E+00 -3.344109E-01 + 8973 8.97200E+00 -3.343736E-01 + 8974 8.97300E+00 -3.343363E-01 + 8975 8.97400E+00 -3.342991E-01 + 8976 8.97500E+00 -3.342618E-01 + 8977 8.97600E+00 -3.342246E-01 + 8978 8.97700E+00 -3.341874E-01 + 8979 8.97800E+00 -3.341501E-01 + 8980 8.97900E+00 -3.341129E-01 + 8981 8.98000E+00 -3.340757E-01 + 8982 8.98100E+00 -3.340385E-01 + 8983 8.98200E+00 -3.340013E-01 + 8984 8.98300E+00 -3.339641E-01 + 8985 8.98400E+00 -3.339270E-01 + 8986 8.98500E+00 -3.338898E-01 + 8987 8.98600E+00 -3.338526E-01 + 8988 8.98700E+00 -3.338155E-01 + 8989 8.98800E+00 -3.337783E-01 + 8990 8.98900E+00 -3.337412E-01 + 8991 8.99000E+00 -3.337041E-01 + 8992 8.99100E+00 -3.336670E-01 + 8993 8.99200E+00 -3.336299E-01 + 8994 8.99300E+00 -3.335928E-01 + 8995 8.99400E+00 -3.335557E-01 + 8996 8.99500E+00 -3.335186E-01 + 8997 8.99600E+00 -3.334815E-01 + 8998 8.99700E+00 -3.334444E-01 + 8999 8.99800E+00 -3.334074E-01 + 9000 8.99900E+00 -3.333703E-01 + 9001 9.00000E+00 -3.333333E-01 + 9002 9.00100E+00 -3.332963E-01 + 9003 9.00200E+00 -3.332592E-01 + 9004 9.00300E+00 -3.332222E-01 + 9005 9.00400E+00 -3.331852E-01 + 9006 9.00500E+00 -3.331482E-01 + 9007 9.00600E+00 -3.331112E-01 + 9008 9.00700E+00 -3.330742E-01 + 9009 9.00800E+00 -3.330373E-01 + 9010 9.00900E+00 -3.330003E-01 + 9011 9.01000E+00 -3.329633E-01 + 9012 9.01100E+00 -3.329264E-01 + 9013 9.01200E+00 -3.328894E-01 + 9014 9.01300E+00 -3.328525E-01 + 9015 9.01400E+00 -3.328156E-01 + 9016 9.01500E+00 -3.327787E-01 + 9017 9.01600E+00 -3.327418E-01 + 9018 9.01700E+00 -3.327049E-01 + 9019 9.01800E+00 -3.326680E-01 + 9020 9.01900E+00 -3.326311E-01 + 9021 9.02000E+00 -3.325942E-01 + 9022 9.02100E+00 -3.325573E-01 + 9023 9.02200E+00 -3.325205E-01 + 9024 9.02300E+00 -3.324836E-01 + 9025 9.02400E+00 -3.324468E-01 + 9026 9.02500E+00 -3.324099E-01 + 9027 9.02600E+00 -3.323731E-01 + 9028 9.02700E+00 -3.323363E-01 + 9029 9.02800E+00 -3.322995E-01 + 9030 9.02900E+00 -3.322627E-01 + 9031 9.03000E+00 -3.322259E-01 + 9032 9.03100E+00 -3.321891E-01 + 9033 9.03200E+00 -3.321523E-01 + 9034 9.03300E+00 -3.321156E-01 + 9035 9.03400E+00 -3.320788E-01 + 9036 9.03500E+00 -3.320421E-01 + 9037 9.03600E+00 -3.320053E-01 + 9038 9.03700E+00 -3.319686E-01 + 9039 9.03800E+00 -3.319318E-01 + 9040 9.03900E+00 -3.318951E-01 + 9041 9.04000E+00 -3.318584E-01 + 9042 9.04100E+00 -3.318217E-01 + 9043 9.04200E+00 -3.317850E-01 + 9044 9.04300E+00 -3.317483E-01 + 9045 9.04400E+00 -3.317116E-01 + 9046 9.04500E+00 -3.316750E-01 + 9047 9.04600E+00 -3.316383E-01 + 9048 9.04700E+00 -3.316016E-01 + 9049 9.04800E+00 -3.315650E-01 + 9050 9.04900E+00 -3.315284E-01 + 9051 9.05000E+00 -3.314917E-01 + 9052 9.05100E+00 -3.314551E-01 + 9053 9.05200E+00 -3.314185E-01 + 9054 9.05300E+00 -3.313819E-01 + 9055 9.05400E+00 -3.313453E-01 + 9056 9.05500E+00 -3.313087E-01 + 9057 9.05600E+00 -3.312721E-01 + 9058 9.05700E+00 -3.312355E-01 + 9059 9.05800E+00 -3.311990E-01 + 9060 9.05900E+00 -3.311624E-01 + 9061 9.06000E+00 -3.311258E-01 + 9062 9.06100E+00 -3.310893E-01 + 9063 9.06200E+00 -3.310528E-01 + 9064 9.06300E+00 -3.310162E-01 + 9065 9.06400E+00 -3.309797E-01 + 9066 9.06500E+00 -3.309432E-01 + 9067 9.06600E+00 -3.309067E-01 + 9068 9.06700E+00 -3.308702E-01 + 9069 9.06800E+00 -3.308337E-01 + 9070 9.06900E+00 -3.307972E-01 + 9071 9.07000E+00 -3.307608E-01 + 9072 9.07100E+00 -3.307243E-01 + 9073 9.07200E+00 -3.306878E-01 + 9074 9.07300E+00 -3.306514E-01 + 9075 9.07400E+00 -3.306149E-01 + 9076 9.07500E+00 -3.305785E-01 + 9077 9.07600E+00 -3.305421E-01 + 9078 9.07700E+00 -3.305057E-01 + 9079 9.07800E+00 -3.304693E-01 + 9080 9.07900E+00 -3.304329E-01 + 9081 9.08000E+00 -3.303965E-01 + 9082 9.08100E+00 -3.303601E-01 + 9083 9.08200E+00 -3.303237E-01 + 9084 9.08300E+00 -3.302873E-01 + 9085 9.08400E+00 -3.302510E-01 + 9086 9.08500E+00 -3.302146E-01 + 9087 9.08600E+00 -3.301783E-01 + 9088 9.08700E+00 -3.301419E-01 + 9089 9.08800E+00 -3.301056E-01 + 9090 9.08900E+00 -3.300693E-01 + 9091 9.09000E+00 -3.300330E-01 + 9092 9.09100E+00 -3.299967E-01 + 9093 9.09200E+00 -3.299604E-01 + 9094 9.09300E+00 -3.299241E-01 + 9095 9.09400E+00 -3.298878E-01 + 9096 9.09500E+00 -3.298515E-01 + 9097 9.09600E+00 -3.298153E-01 + 9098 9.09700E+00 -3.297790E-01 + 9099 9.09800E+00 -3.297428E-01 + 9100 9.09900E+00 -3.297065E-01 + 9101 9.10000E+00 -3.296703E-01 + 9102 9.10100E+00 -3.296341E-01 + 9103 9.10200E+00 -3.295979E-01 + 9104 9.10300E+00 -3.295616E-01 + 9105 9.10400E+00 -3.295254E-01 + 9106 9.10500E+00 -3.294893E-01 + 9107 9.10600E+00 -3.294531E-01 + 9108 9.10700E+00 -3.294169E-01 + 9109 9.10800E+00 -3.293807E-01 + 9110 9.10900E+00 -3.293446E-01 + 9111 9.11000E+00 -3.293084E-01 + 9112 9.11100E+00 -3.292723E-01 + 9113 9.11200E+00 -3.292361E-01 + 9114 9.11300E+00 -3.292000E-01 + 9115 9.11400E+00 -3.291639E-01 + 9116 9.11500E+00 -3.291278E-01 + 9117 9.11600E+00 -3.290917E-01 + 9118 9.11700E+00 -3.290556E-01 + 9119 9.11800E+00 -3.290195E-01 + 9120 9.11900E+00 -3.289834E-01 + 9121 9.12000E+00 -3.289473E-01 + 9122 9.12100E+00 -3.289113E-01 + 9123 9.12200E+00 -3.288752E-01 + 9124 9.12300E+00 -3.288392E-01 + 9125 9.12400E+00 -3.288031E-01 + 9126 9.12500E+00 -3.287671E-01 + 9127 9.12600E+00 -3.287311E-01 + 9128 9.12700E+00 -3.286950E-01 + 9129 9.12800E+00 -3.286590E-01 + 9130 9.12900E+00 -3.286230E-01 + 9131 9.13000E+00 -3.285870E-01 + 9132 9.13100E+00 -3.285510E-01 + 9133 9.13200E+00 -3.285151E-01 + 9134 9.13300E+00 -3.284791E-01 + 9135 9.13400E+00 -3.284431E-01 + 9136 9.13500E+00 -3.284072E-01 + 9137 9.13600E+00 -3.283712E-01 + 9138 9.13700E+00 -3.283353E-01 + 9139 9.13800E+00 -3.282994E-01 + 9140 9.13900E+00 -3.282635E-01 + 9141 9.14000E+00 -3.282275E-01 + 9142 9.14100E+00 -3.281916E-01 + 9143 9.14200E+00 -3.281557E-01 + 9144 9.14300E+00 -3.281198E-01 + 9145 9.14400E+00 -3.280840E-01 + 9146 9.14500E+00 -3.280481E-01 + 9147 9.14600E+00 -3.280122E-01 + 9148 9.14700E+00 -3.279764E-01 + 9149 9.14800E+00 -3.279405E-01 + 9150 9.14900E+00 -3.279047E-01 + 9151 9.15000E+00 -3.278688E-01 + 9152 9.15100E+00 -3.278330E-01 + 9153 9.15200E+00 -3.277972E-01 + 9154 9.15300E+00 -3.277614E-01 + 9155 9.15400E+00 -3.277256E-01 + 9156 9.15500E+00 -3.276898E-01 + 9157 9.15600E+00 -3.276540E-01 + 9158 9.15700E+00 -3.276182E-01 + 9159 9.15800E+00 -3.275824E-01 + 9160 9.15900E+00 -3.275467E-01 + 9161 9.16000E+00 -3.275109E-01 + 9162 9.16100E+00 -3.274752E-01 + 9163 9.16200E+00 -3.274394E-01 + 9164 9.16300E+00 -3.274037E-01 + 9165 9.16400E+00 -3.273680E-01 + 9166 9.16500E+00 -3.273323E-01 + 9167 9.16600E+00 -3.272965E-01 + 9168 9.16700E+00 -3.272608E-01 + 9169 9.16800E+00 -3.272251E-01 + 9170 9.16900E+00 -3.271895E-01 + 9171 9.17000E+00 -3.271538E-01 + 9172 9.17100E+00 -3.271181E-01 + 9173 9.17200E+00 -3.270824E-01 + 9174 9.17300E+00 -3.270468E-01 + 9175 9.17400E+00 -3.270111E-01 + 9176 9.17500E+00 -3.269755E-01 + 9177 9.17600E+00 -3.269399E-01 + 9178 9.17700E+00 -3.269042E-01 + 9179 9.17800E+00 -3.268686E-01 + 9180 9.17900E+00 -3.268330E-01 + 9181 9.18000E+00 -3.267974E-01 + 9182 9.18100E+00 -3.267618E-01 + 9183 9.18200E+00 -3.267262E-01 + 9184 9.18300E+00 -3.266906E-01 + 9185 9.18400E+00 -3.266551E-01 + 9186 9.18500E+00 -3.266195E-01 + 9187 9.18600E+00 -3.265839E-01 + 9188 9.18700E+00 -3.265484E-01 + 9189 9.18800E+00 -3.265128E-01 + 9190 9.18900E+00 -3.264773E-01 + 9191 9.19000E+00 -3.264418E-01 + 9192 9.19100E+00 -3.264063E-01 + 9193 9.19200E+00 -3.263708E-01 + 9194 9.19300E+00 -3.263352E-01 + 9195 9.19400E+00 -3.262998E-01 + 9196 9.19500E+00 -3.262643E-01 + 9197 9.19600E+00 -3.262288E-01 + 9198 9.19700E+00 -3.261933E-01 + 9199 9.19800E+00 -3.261578E-01 + 9200 9.19900E+00 -3.261224E-01 + 9201 9.20000E+00 -3.260869E-01 + 9202 9.20100E+00 -3.260515E-01 + 9203 9.20200E+00 -3.260161E-01 + 9204 9.20300E+00 -3.259806E-01 + 9205 9.20400E+00 -3.259452E-01 + 9206 9.20500E+00 -3.259098E-01 + 9207 9.20600E+00 -3.258744E-01 + 9208 9.20700E+00 -3.258390E-01 + 9209 9.20800E+00 -3.258036E-01 + 9210 9.20900E+00 -3.257682E-01 + 9211 9.21000E+00 -3.257329E-01 + 9212 9.21100E+00 -3.256975E-01 + 9213 9.21200E+00 -3.256621E-01 + 9214 9.21300E+00 -3.256268E-01 + 9215 9.21400E+00 -3.255915E-01 + 9216 9.21500E+00 -3.255561E-01 + 9217 9.21600E+00 -3.255208E-01 + 9218 9.21700E+00 -3.254855E-01 + 9219 9.21800E+00 -3.254502E-01 + 9220 9.21900E+00 -3.254149E-01 + 9221 9.22000E+00 -3.253796E-01 + 9222 9.22100E+00 -3.253443E-01 + 9223 9.22200E+00 -3.253090E-01 + 9224 9.22300E+00 -3.252737E-01 + 9225 9.22400E+00 -3.252385E-01 + 9226 9.22500E+00 -3.252032E-01 + 9227 9.22600E+00 -3.251680E-01 + 9228 9.22700E+00 -3.251327E-01 + 9229 9.22800E+00 -3.250975E-01 + 9230 9.22900E+00 -3.250623E-01 + 9231 9.23000E+00 -3.250270E-01 + 9232 9.23100E+00 -3.249918E-01 + 9233 9.23200E+00 -3.249566E-01 + 9234 9.23300E+00 -3.249214E-01 + 9235 9.23400E+00 -3.248862E-01 + 9236 9.23500E+00 -3.248511E-01 + 9237 9.23600E+00 -3.248159E-01 + 9238 9.23700E+00 -3.247807E-01 + 9239 9.23800E+00 -3.247456E-01 + 9240 9.23900E+00 -3.247104E-01 + 9241 9.24000E+00 -3.246753E-01 + 9242 9.24100E+00 -3.246401E-01 + 9243 9.24200E+00 -3.246050E-01 + 9244 9.24300E+00 -3.245699E-01 + 9245 9.24400E+00 -3.245348E-01 + 9246 9.24500E+00 -3.244997E-01 + 9247 9.24600E+00 -3.244646E-01 + 9248 9.24700E+00 -3.244295E-01 + 9249 9.24800E+00 -3.243944E-01 + 9250 9.24900E+00 -3.243594E-01 + 9251 9.25000E+00 -3.243243E-01 + 9252 9.25100E+00 -3.242892E-01 + 9253 9.25200E+00 -3.242542E-01 + 9254 9.25300E+00 -3.242191E-01 + 9255 9.25400E+00 -3.241841E-01 + 9256 9.25500E+00 -3.241491E-01 + 9257 9.25600E+00 -3.241141E-01 + 9258 9.25700E+00 -3.240791E-01 + 9259 9.25800E+00 -3.240441E-01 + 9260 9.25900E+00 -3.240091E-01 + 9261 9.26000E+00 -3.239741E-01 + 9262 9.26100E+00 -3.239391E-01 + 9263 9.26200E+00 -3.239041E-01 + 9264 9.26300E+00 -3.238692E-01 + 9265 9.26400E+00 -3.238342E-01 + 9266 9.26500E+00 -3.237992E-01 + 9267 9.26600E+00 -3.237643E-01 + 9268 9.26700E+00 -3.237294E-01 + 9269 9.26800E+00 -3.236944E-01 + 9270 9.26900E+00 -3.236595E-01 + 9271 9.27000E+00 -3.236246E-01 + 9272 9.27100E+00 -3.235897E-01 + 9273 9.27200E+00 -3.235548E-01 + 9274 9.27300E+00 -3.235199E-01 + 9275 9.27400E+00 -3.234850E-01 + 9276 9.27500E+00 -3.234501E-01 + 9277 9.27600E+00 -3.234153E-01 + 9278 9.27700E+00 -3.233804E-01 + 9279 9.27800E+00 -3.233456E-01 + 9280 9.27900E+00 -3.233107E-01 + 9281 9.28000E+00 -3.232759E-01 + 9282 9.28100E+00 -3.232410E-01 + 9283 9.28200E+00 -3.232062E-01 + 9284 9.28300E+00 -3.231714E-01 + 9285 9.28400E+00 -3.231366E-01 + 9286 9.28500E+00 -3.231018E-01 + 9287 9.28600E+00 -3.230670E-01 + 9288 9.28700E+00 -3.230322E-01 + 9289 9.28800E+00 -3.229974E-01 + 9290 9.28900E+00 -3.229627E-01 + 9291 9.29000E+00 -3.229279E-01 + 9292 9.29100E+00 -3.228931E-01 + 9293 9.29200E+00 -3.228584E-01 + 9294 9.29300E+00 -3.228236E-01 + 9295 9.29400E+00 -3.227889E-01 + 9296 9.29500E+00 -3.227542E-01 + 9297 9.29600E+00 -3.227195E-01 + 9298 9.29700E+00 -3.226847E-01 + 9299 9.29800E+00 -3.226500E-01 + 9300 9.29900E+00 -3.226153E-01 + 9301 9.30000E+00 -3.225806E-01 + 9302 9.30100E+00 -3.225460E-01 + 9303 9.30200E+00 -3.225113E-01 + 9304 9.30300E+00 -3.224766E-01 + 9305 9.30400E+00 -3.224420E-01 + 9306 9.30500E+00 -3.224073E-01 + 9307 9.30600E+00 -3.223727E-01 + 9308 9.30700E+00 -3.223380E-01 + 9309 9.30800E+00 -3.223034E-01 + 9310 9.30900E+00 -3.222688E-01 + 9311 9.31000E+00 -3.222341E-01 + 9312 9.31100E+00 -3.221995E-01 + 9313 9.31200E+00 -3.221649E-01 + 9314 9.31300E+00 -3.221303E-01 + 9315 9.31400E+00 -3.220958E-01 + 9316 9.31500E+00 -3.220612E-01 + 9317 9.31600E+00 -3.220266E-01 + 9318 9.31700E+00 -3.219920E-01 + 9319 9.31800E+00 -3.219575E-01 + 9320 9.31900E+00 -3.219229E-01 + 9321 9.32000E+00 -3.218884E-01 + 9322 9.32100E+00 -3.218539E-01 + 9323 9.32200E+00 -3.218193E-01 + 9324 9.32300E+00 -3.217848E-01 + 9325 9.32400E+00 -3.217503E-01 + 9326 9.32500E+00 -3.217158E-01 + 9327 9.32600E+00 -3.216813E-01 + 9328 9.32700E+00 -3.216468E-01 + 9329 9.32800E+00 -3.216123E-01 + 9330 9.32900E+00 -3.215778E-01 + 9331 9.33000E+00 -3.215434E-01 + 9332 9.33100E+00 -3.215089E-01 + 9333 9.33200E+00 -3.214745E-01 + 9334 9.33300E+00 -3.214400E-01 + 9335 9.33400E+00 -3.214056E-01 + 9336 9.33500E+00 -3.213711E-01 + 9337 9.33600E+00 -3.213367E-01 + 9338 9.33700E+00 -3.213023E-01 + 9339 9.33800E+00 -3.212679E-01 + 9340 9.33900E+00 -3.212335E-01 + 9341 9.34000E+00 -3.211991E-01 + 9342 9.34100E+00 -3.211647E-01 + 9343 9.34200E+00 -3.211303E-01 + 9344 9.34300E+00 -3.210960E-01 + 9345 9.34400E+00 -3.210616E-01 + 9346 9.34500E+00 -3.210272E-01 + 9347 9.34600E+00 -3.209929E-01 + 9348 9.34700E+00 -3.209586E-01 + 9349 9.34800E+00 -3.209242E-01 + 9350 9.34900E+00 -3.208899E-01 + 9351 9.35000E+00 -3.208556E-01 + 9352 9.35100E+00 -3.208213E-01 + 9353 9.35200E+00 -3.207870E-01 + 9354 9.35300E+00 -3.207527E-01 + 9355 9.35400E+00 -3.207184E-01 + 9356 9.35500E+00 -3.206841E-01 + 9357 9.35600E+00 -3.206498E-01 + 9358 9.35700E+00 -3.206155E-01 + 9359 9.35800E+00 -3.205813E-01 + 9360 9.35900E+00 -3.205470E-01 + 9361 9.36000E+00 -3.205128E-01 + 9362 9.36100E+00 -3.204785E-01 + 9363 9.36200E+00 -3.204443E-01 + 9364 9.36300E+00 -3.204101E-01 + 9365 9.36400E+00 -3.203759E-01 + 9366 9.36500E+00 -3.203417E-01 + 9367 9.36600E+00 -3.203075E-01 + 9368 9.36700E+00 -3.202733E-01 + 9369 9.36800E+00 -3.202391E-01 + 9370 9.36900E+00 -3.202049E-01 + 9371 9.37000E+00 -3.201707E-01 + 9372 9.37100E+00 -3.201366E-01 + 9373 9.37200E+00 -3.201024E-01 + 9374 9.37300E+00 -3.200683E-01 + 9375 9.37400E+00 -3.200341E-01 + 9376 9.37500E+00 -3.200000E-01 + 9377 9.37600E+00 -3.199659E-01 + 9378 9.37700E+00 -3.199317E-01 + 9379 9.37800E+00 -3.198976E-01 + 9380 9.37900E+00 -3.198635E-01 + 9381 9.38000E+00 -3.198294E-01 + 9382 9.38100E+00 -3.197953E-01 + 9383 9.38200E+00 -3.197613E-01 + 9384 9.38300E+00 -3.197272E-01 + 9385 9.38400E+00 -3.196931E-01 + 9386 9.38500E+00 -3.196590E-01 + 9387 9.38600E+00 -3.196250E-01 + 9388 9.38700E+00 -3.195909E-01 + 9389 9.38800E+00 -3.195569E-01 + 9390 9.38900E+00 -3.195229E-01 + 9391 9.39000E+00 -3.194888E-01 + 9392 9.39100E+00 -3.194548E-01 + 9393 9.39200E+00 -3.194208E-01 + 9394 9.39300E+00 -3.193868E-01 + 9395 9.39400E+00 -3.193528E-01 + 9396 9.39500E+00 -3.193188E-01 + 9397 9.39600E+00 -3.192848E-01 + 9398 9.39700E+00 -3.192508E-01 + 9399 9.39800E+00 -3.192169E-01 + 9400 9.39900E+00 -3.191829E-01 + 9401 9.40000E+00 -3.191490E-01 + 9402 9.40100E+00 -3.191150E-01 + 9403 9.40200E+00 -3.190811E-01 + 9404 9.40300E+00 -3.190471E-01 + 9405 9.40400E+00 -3.190132E-01 + 9406 9.40500E+00 -3.189793E-01 + 9407 9.40600E+00 -3.189454E-01 + 9408 9.40700E+00 -3.189115E-01 + 9409 9.40800E+00 -3.188776E-01 + 9410 9.40900E+00 -3.188437E-01 + 9411 9.41000E+00 -3.188098E-01 + 9412 9.41100E+00 -3.187759E-01 + 9413 9.41200E+00 -3.187420E-01 + 9414 9.41300E+00 -3.187082E-01 + 9415 9.41400E+00 -3.186743E-01 + 9416 9.41500E+00 -3.186405E-01 + 9417 9.41600E+00 -3.186066E-01 + 9418 9.41700E+00 -3.185728E-01 + 9419 9.41800E+00 -3.185390E-01 + 9420 9.41900E+00 -3.185051E-01 + 9421 9.42000E+00 -3.184713E-01 + 9422 9.42100E+00 -3.184375E-01 + 9423 9.42200E+00 -3.184037E-01 + 9424 9.42300E+00 -3.183699E-01 + 9425 9.42400E+00 -3.183362E-01 + 9426 9.42500E+00 -3.183024E-01 + 9427 9.42600E+00 -3.182686E-01 + 9428 9.42700E+00 -3.182348E-01 + 9429 9.42800E+00 -3.182011E-01 + 9430 9.42900E+00 -3.181673E-01 + 9431 9.43000E+00 -3.181336E-01 + 9432 9.43100E+00 -3.180999E-01 + 9433 9.43200E+00 -3.180661E-01 + 9434 9.43300E+00 -3.180324E-01 + 9435 9.43400E+00 -3.179987E-01 + 9436 9.43500E+00 -3.179650E-01 + 9437 9.43600E+00 -3.179313E-01 + 9438 9.43700E+00 -3.178976E-01 + 9439 9.43800E+00 -3.178639E-01 + 9440 9.43900E+00 -3.178303E-01 + 9441 9.44000E+00 -3.177966E-01 + 9442 9.44100E+00 -3.177629E-01 + 9443 9.44200E+00 -3.177293E-01 + 9444 9.44300E+00 -3.176956E-01 + 9445 9.44400E+00 -3.176620E-01 + 9446 9.44500E+00 -3.176283E-01 + 9447 9.44600E+00 -3.175947E-01 + 9448 9.44700E+00 -3.175611E-01 + 9449 9.44800E+00 -3.175275E-01 + 9450 9.44900E+00 -3.174939E-01 + 9451 9.45000E+00 -3.174603E-01 + 9452 9.45100E+00 -3.174267E-01 + 9453 9.45200E+00 -3.173931E-01 + 9454 9.45300E+00 -3.173595E-01 + 9455 9.45400E+00 -3.173260E-01 + 9456 9.45500E+00 -3.172924E-01 + 9457 9.45600E+00 -3.172588E-01 + 9458 9.45700E+00 -3.172253E-01 + 9459 9.45800E+00 -3.171918E-01 + 9460 9.45900E+00 -3.171582E-01 + 9461 9.46000E+00 -3.171247E-01 + 9462 9.46100E+00 -3.170912E-01 + 9463 9.46200E+00 -3.170577E-01 + 9464 9.46300E+00 -3.170242E-01 + 9465 9.46400E+00 -3.169907E-01 + 9466 9.46500E+00 -3.169572E-01 + 9467 9.46600E+00 -3.169237E-01 + 9468 9.46700E+00 -3.168902E-01 + 9469 9.46800E+00 -3.168567E-01 + 9470 9.46900E+00 -3.168233E-01 + 9471 9.47000E+00 -3.167898E-01 + 9472 9.47100E+00 -3.167564E-01 + 9473 9.47200E+00 -3.167229E-01 + 9474 9.47300E+00 -3.166895E-01 + 9475 9.47400E+00 -3.166561E-01 + 9476 9.47500E+00 -3.166227E-01 + 9477 9.47600E+00 -3.165892E-01 + 9478 9.47700E+00 -3.165558E-01 + 9479 9.47800E+00 -3.165224E-01 + 9480 9.47900E+00 -3.164891E-01 + 9481 9.48000E+00 -3.164557E-01 + 9482 9.48100E+00 -3.164223E-01 + 9483 9.48200E+00 -3.163889E-01 + 9484 9.48300E+00 -3.163556E-01 + 9485 9.48400E+00 -3.163222E-01 + 9486 9.48500E+00 -3.162889E-01 + 9487 9.48600E+00 -3.162555E-01 + 9488 9.48700E+00 -3.162222E-01 + 9489 9.48800E+00 -3.161889E-01 + 9490 9.48900E+00 -3.161555E-01 + 9491 9.49000E+00 -3.161222E-01 + 9492 9.49100E+00 -3.160889E-01 + 9493 9.49200E+00 -3.160556E-01 + 9494 9.49300E+00 -3.160223E-01 + 9495 9.49400E+00 -3.159890E-01 + 9496 9.49500E+00 -3.159558E-01 + 9497 9.49600E+00 -3.159225E-01 + 9498 9.49700E+00 -3.158892E-01 + 9499 9.49800E+00 -3.158560E-01 + 9500 9.49900E+00 -3.158227E-01 + 9501 9.50000E+00 -3.157895E-01 + 9502 9.50100E+00 -3.157562E-01 + 9503 9.50200E+00 -3.157230E-01 + 9504 9.50300E+00 -3.156898E-01 + 9505 9.50400E+00 -3.156566E-01 + 9506 9.50500E+00 -3.156234E-01 + 9507 9.50600E+00 -3.155902E-01 + 9508 9.50700E+00 -3.155570E-01 + 9509 9.50800E+00 -3.155238E-01 + 9510 9.50900E+00 -3.154906E-01 + 9511 9.51000E+00 -3.154574E-01 + 9512 9.51100E+00 -3.154243E-01 + 9513 9.51200E+00 -3.153911E-01 + 9514 9.51300E+00 -3.153579E-01 + 9515 9.51400E+00 -3.153248E-01 + 9516 9.51500E+00 -3.152917E-01 + 9517 9.51600E+00 -3.152585E-01 + 9518 9.51700E+00 -3.152254E-01 + 9519 9.51800E+00 -3.151923E-01 + 9520 9.51900E+00 -3.151592E-01 + 9521 9.52000E+00 -3.151261E-01 + 9522 9.52100E+00 -3.150930E-01 + 9523 9.52200E+00 -3.150599E-01 + 9524 9.52300E+00 -3.150268E-01 + 9525 9.52400E+00 -3.149937E-01 + 9526 9.52500E+00 -3.149606E-01 + 9527 9.52600E+00 -3.149276E-01 + 9528 9.52700E+00 -3.148945E-01 + 9529 9.52800E+00 -3.148615E-01 + 9530 9.52900E+00 -3.148284E-01 + 9531 9.53000E+00 -3.147954E-01 + 9532 9.53100E+00 -3.147624E-01 + 9533 9.53200E+00 -3.147293E-01 + 9534 9.53300E+00 -3.146963E-01 + 9535 9.53400E+00 -3.146633E-01 + 9536 9.53500E+00 -3.146303E-01 + 9537 9.53600E+00 -3.145973E-01 + 9538 9.53700E+00 -3.145643E-01 + 9539 9.53800E+00 -3.145313E-01 + 9540 9.53900E+00 -3.144984E-01 + 9541 9.54000E+00 -3.144654E-01 + 9542 9.54100E+00 -3.144324E-01 + 9543 9.54200E+00 -3.143995E-01 + 9544 9.54300E+00 -3.143665E-01 + 9545 9.54400E+00 -3.143336E-01 + 9546 9.54500E+00 -3.143007E-01 + 9547 9.54600E+00 -3.142677E-01 + 9548 9.54700E+00 -3.142348E-01 + 9549 9.54800E+00 -3.142019E-01 + 9550 9.54900E+00 -3.141690E-01 + 9551 9.55000E+00 -3.141361E-01 + 9552 9.55100E+00 -3.141032E-01 + 9553 9.55200E+00 -3.140703E-01 + 9554 9.55300E+00 -3.140375E-01 + 9555 9.55400E+00 -3.140046E-01 + 9556 9.55500E+00 -3.139717E-01 + 9557 9.55600E+00 -3.139389E-01 + 9558 9.55700E+00 -3.139060E-01 + 9559 9.55800E+00 -3.138732E-01 + 9560 9.55900E+00 -3.138403E-01 + 9561 9.56000E+00 -3.138075E-01 + 9562 9.56100E+00 -3.137747E-01 + 9563 9.56200E+00 -3.137419E-01 + 9564 9.56300E+00 -3.137091E-01 + 9565 9.56400E+00 -3.136762E-01 + 9566 9.56500E+00 -3.136435E-01 + 9567 9.56600E+00 -3.136107E-01 + 9568 9.56700E+00 -3.135779E-01 + 9569 9.56800E+00 -3.135451E-01 + 9570 9.56900E+00 -3.135123E-01 + 9571 9.57000E+00 -3.134796E-01 + 9572 9.57100E+00 -3.134468E-01 + 9573 9.57200E+00 -3.134141E-01 + 9574 9.57300E+00 -3.133813E-01 + 9575 9.57400E+00 -3.133486E-01 + 9576 9.57500E+00 -3.133159E-01 + 9577 9.57600E+00 -3.132832E-01 + 9578 9.57700E+00 -3.132505E-01 + 9579 9.57800E+00 -3.132177E-01 + 9580 9.57900E+00 -3.131850E-01 + 9581 9.58000E+00 -3.131524E-01 + 9582 9.58100E+00 -3.131197E-01 + 9583 9.58200E+00 -3.130870E-01 + 9584 9.58300E+00 -3.130543E-01 + 9585 9.58400E+00 -3.130217E-01 + 9586 9.58500E+00 -3.129890E-01 + 9587 9.58600E+00 -3.129564E-01 + 9588 9.58700E+00 -3.129237E-01 + 9589 9.58800E+00 -3.128911E-01 + 9590 9.58900E+00 -3.128584E-01 + 9591 9.59000E+00 -3.128258E-01 + 9592 9.59100E+00 -3.127932E-01 + 9593 9.59200E+00 -3.127606E-01 + 9594 9.59300E+00 -3.127280E-01 + 9595 9.59400E+00 -3.126954E-01 + 9596 9.59500E+00 -3.126628E-01 + 9597 9.59600E+00 -3.126302E-01 + 9598 9.59700E+00 -3.125977E-01 + 9599 9.59800E+00 -3.125651E-01 + 9600 9.59900E+00 -3.125325E-01 + 9601 9.60000E+00 -3.125000E-01 + 9602 9.60100E+00 -3.124674E-01 + 9603 9.60200E+00 -3.124349E-01 + 9604 9.60300E+00 -3.124024E-01 + 9605 9.60400E+00 -3.123698E-01 + 9606 9.60500E+00 -3.123373E-01 + 9607 9.60600E+00 -3.123048E-01 + 9608 9.60700E+00 -3.122723E-01 + 9609 9.60800E+00 -3.122398E-01 + 9610 9.60900E+00 -3.122073E-01 + 9611 9.61000E+00 -3.121748E-01 + 9612 9.61100E+00 -3.121423E-01 + 9613 9.61200E+00 -3.121099E-01 + 9614 9.61300E+00 -3.120774E-01 + 9615 9.61400E+00 -3.120449E-01 + 9616 9.61500E+00 -3.120125E-01 + 9617 9.61600E+00 -3.119800E-01 + 9618 9.61700E+00 -3.119476E-01 + 9619 9.61800E+00 -3.119152E-01 + 9620 9.61900E+00 -3.118827E-01 + 9621 9.62000E+00 -3.118503E-01 + 9622 9.62100E+00 -3.118179E-01 + 9623 9.62200E+00 -3.117855E-01 + 9624 9.62300E+00 -3.117531E-01 + 9625 9.62400E+00 -3.117207E-01 + 9626 9.62500E+00 -3.116883E-01 + 9627 9.62600E+00 -3.116559E-01 + 9628 9.62700E+00 -3.116236E-01 + 9629 9.62800E+00 -3.115912E-01 + 9630 9.62900E+00 -3.115588E-01 + 9631 9.63000E+00 -3.115265E-01 + 9632 9.63100E+00 -3.114941E-01 + 9633 9.63200E+00 -3.114618E-01 + 9634 9.63300E+00 -3.114295E-01 + 9635 9.63400E+00 -3.113971E-01 + 9636 9.63500E+00 -3.113648E-01 + 9637 9.63600E+00 -3.113325E-01 + 9638 9.63700E+00 -3.113002E-01 + 9639 9.63800E+00 -3.112679E-01 + 9640 9.63900E+00 -3.112356E-01 + 9641 9.64000E+00 -3.112033E-01 + 9642 9.64100E+00 -3.111710E-01 + 9643 9.64200E+00 -3.111388E-01 + 9644 9.64300E+00 -3.111065E-01 + 9645 9.64400E+00 -3.110742E-01 + 9646 9.64500E+00 -3.110420E-01 + 9647 9.64600E+00 -3.110097E-01 + 9648 9.64700E+00 -3.109775E-01 + 9649 9.64800E+00 -3.109453E-01 + 9650 9.64900E+00 -3.109130E-01 + 9651 9.65000E+00 -3.108808E-01 + 9652 9.65100E+00 -3.108486E-01 + 9653 9.65200E+00 -3.108164E-01 + 9654 9.65300E+00 -3.107842E-01 + 9655 9.65400E+00 -3.107520E-01 + 9656 9.65500E+00 -3.107198E-01 + 9657 9.65600E+00 -3.106876E-01 + 9658 9.65700E+00 -3.106555E-01 + 9659 9.65800E+00 -3.106233E-01 + 9660 9.65900E+00 -3.105911E-01 + 9661 9.66000E+00 -3.105590E-01 + 9662 9.66100E+00 -3.105268E-01 + 9663 9.66200E+00 -3.104947E-01 + 9664 9.66300E+00 -3.104626E-01 + 9665 9.66400E+00 -3.104304E-01 + 9666 9.66500E+00 -3.103983E-01 + 9667 9.66600E+00 -3.103662E-01 + 9668 9.66700E+00 -3.103341E-01 + 9669 9.66800E+00 -3.103020E-01 + 9670 9.66900E+00 -3.102699E-01 + 9671 9.67000E+00 -3.102378E-01 + 9672 9.67100E+00 -3.102057E-01 + 9673 9.67200E+00 -3.101737E-01 + 9674 9.67300E+00 -3.101416E-01 + 9675 9.67400E+00 -3.101095E-01 + 9676 9.67500E+00 -3.100775E-01 + 9677 9.67600E+00 -3.100454E-01 + 9678 9.67700E+00 -3.100134E-01 + 9679 9.67800E+00 -3.099814E-01 + 9680 9.67900E+00 -3.099493E-01 + 9681 9.68000E+00 -3.099173E-01 + 9682 9.68100E+00 -3.098853E-01 + 9683 9.68200E+00 -3.098533E-01 + 9684 9.68300E+00 -3.098213E-01 + 9685 9.68400E+00 -3.097893E-01 + 9686 9.68500E+00 -3.097573E-01 + 9687 9.68600E+00 -3.097253E-01 + 9688 9.68700E+00 -3.096934E-01 + 9689 9.68800E+00 -3.096614E-01 + 9690 9.68900E+00 -3.096294E-01 + 9691 9.69000E+00 -3.095975E-01 + 9692 9.69100E+00 -3.095655E-01 + 9693 9.69200E+00 -3.095336E-01 + 9694 9.69300E+00 -3.095017E-01 + 9695 9.69400E+00 -3.094697E-01 + 9696 9.69500E+00 -3.094378E-01 + 9697 9.69600E+00 -3.094059E-01 + 9698 9.69700E+00 -3.093740E-01 + 9699 9.69800E+00 -3.093421E-01 + 9700 9.69900E+00 -3.093102E-01 + 9701 9.70000E+00 -3.092783E-01 + 9702 9.70100E+00 -3.092464E-01 + 9703 9.70200E+00 -3.092146E-01 + 9704 9.70300E+00 -3.091827E-01 + 9705 9.70400E+00 -3.091508E-01 + 9706 9.70500E+00 -3.091190E-01 + 9707 9.70600E+00 -3.090871E-01 + 9708 9.70700E+00 -3.090553E-01 + 9709 9.70800E+00 -3.090234E-01 + 9710 9.70900E+00 -3.089916E-01 + 9711 9.71000E+00 -3.089598E-01 + 9712 9.71100E+00 -3.089280E-01 + 9713 9.71200E+00 -3.088962E-01 + 9714 9.71300E+00 -3.088644E-01 + 9715 9.71400E+00 -3.088326E-01 + 9716 9.71500E+00 -3.088008E-01 + 9717 9.71600E+00 -3.087690E-01 + 9718 9.71700E+00 -3.087372E-01 + 9719 9.71800E+00 -3.087055E-01 + 9720 9.71900E+00 -3.086737E-01 + 9721 9.72000E+00 -3.086420E-01 + 9722 9.72100E+00 -3.086102E-01 + 9723 9.72200E+00 -3.085785E-01 + 9724 9.72300E+00 -3.085467E-01 + 9725 9.72400E+00 -3.085150E-01 + 9726 9.72500E+00 -3.084833E-01 + 9727 9.72600E+00 -3.084516E-01 + 9728 9.72700E+00 -3.084199E-01 + 9729 9.72800E+00 -3.083882E-01 + 9730 9.72900E+00 -3.083565E-01 + 9731 9.73000E+00 -3.083248E-01 + 9732 9.73100E+00 -3.082931E-01 + 9733 9.73200E+00 -3.082614E-01 + 9734 9.73300E+00 -3.082297E-01 + 9735 9.73400E+00 -3.081981E-01 + 9736 9.73500E+00 -3.081664E-01 + 9737 9.73600E+00 -3.081348E-01 + 9738 9.73700E+00 -3.081031E-01 + 9739 9.73800E+00 -3.080715E-01 + 9740 9.73900E+00 -3.080398E-01 + 9741 9.74000E+00 -3.080082E-01 + 9742 9.74100E+00 -3.079766E-01 + 9743 9.74200E+00 -3.079450E-01 + 9744 9.74300E+00 -3.079134E-01 + 9745 9.74400E+00 -3.078818E-01 + 9746 9.74500E+00 -3.078502E-01 + 9747 9.74600E+00 -3.078186E-01 + 9748 9.74700E+00 -3.077870E-01 + 9749 9.74800E+00 -3.077554E-01 + 9750 9.74900E+00 -3.077239E-01 + 9751 9.75000E+00 -3.076923E-01 + 9752 9.75100E+00 -3.076608E-01 + 9753 9.75200E+00 -3.076292E-01 + 9754 9.75300E+00 -3.075977E-01 + 9755 9.75400E+00 -3.075661E-01 + 9756 9.75500E+00 -3.075346E-01 + 9757 9.75600E+00 -3.075031E-01 + 9758 9.75700E+00 -3.074716E-01 + 9759 9.75800E+00 -3.074401E-01 + 9760 9.75900E+00 -3.074086E-01 + 9761 9.76000E+00 -3.073771E-01 + 9762 9.76100E+00 -3.073456E-01 + 9763 9.76200E+00 -3.073141E-01 + 9764 9.76300E+00 -3.072826E-01 + 9765 9.76400E+00 -3.072511E-01 + 9766 9.76500E+00 -3.072197E-01 + 9767 9.76600E+00 -3.071882E-01 + 9768 9.76700E+00 -3.071567E-01 + 9769 9.76800E+00 -3.071253E-01 + 9770 9.76900E+00 -3.070939E-01 + 9771 9.77000E+00 -3.070624E-01 + 9772 9.77100E+00 -3.070310E-01 + 9773 9.77200E+00 -3.069996E-01 + 9774 9.77300E+00 -3.069682E-01 + 9775 9.77400E+00 -3.069368E-01 + 9776 9.77500E+00 -3.069054E-01 + 9777 9.77600E+00 -3.068740E-01 + 9778 9.77700E+00 -3.068426E-01 + 9779 9.77800E+00 -3.068112E-01 + 9780 9.77900E+00 -3.067798E-01 + 9781 9.78000E+00 -3.067484E-01 + 9782 9.78100E+00 -3.067171E-01 + 9783 9.78200E+00 -3.066857E-01 + 9784 9.78300E+00 -3.066544E-01 + 9785 9.78400E+00 -3.066230E-01 + 9786 9.78500E+00 -3.065917E-01 + 9787 9.78600E+00 -3.065604E-01 + 9788 9.78700E+00 -3.065290E-01 + 9789 9.78800E+00 -3.064977E-01 + 9790 9.78900E+00 -3.064664E-01 + 9791 9.79000E+00 -3.064351E-01 + 9792 9.79100E+00 -3.064038E-01 + 9793 9.79200E+00 -3.063725E-01 + 9794 9.79300E+00 -3.063412E-01 + 9795 9.79400E+00 -3.063100E-01 + 9796 9.79500E+00 -3.062787E-01 + 9797 9.79600E+00 -3.062474E-01 + 9798 9.79700E+00 -3.062162E-01 + 9799 9.79800E+00 -3.061849E-01 + 9800 9.79900E+00 -3.061537E-01 + 9801 9.80000E+00 -3.061224E-01 + 9802 9.80100E+00 -3.060912E-01 + 9803 9.80200E+00 -3.060599E-01 + 9804 9.80300E+00 -3.060287E-01 + 9805 9.80400E+00 -3.059975E-01 + 9806 9.80500E+00 -3.059663E-01 + 9807 9.80600E+00 -3.059351E-01 + 9808 9.80700E+00 -3.059039E-01 + 9809 9.80800E+00 -3.058727E-01 + 9810 9.80900E+00 -3.058415E-01 + 9811 9.81000E+00 -3.058104E-01 + 9812 9.81100E+00 -3.057792E-01 + 9813 9.81200E+00 -3.057480E-01 + 9814 9.81300E+00 -3.057169E-01 + 9815 9.81400E+00 -3.056857E-01 + 9816 9.81500E+00 -3.056546E-01 + 9817 9.81600E+00 -3.056234E-01 + 9818 9.81700E+00 -3.055923E-01 + 9819 9.81800E+00 -3.055612E-01 + 9820 9.81900E+00 -3.055300E-01 + 9821 9.82000E+00 -3.054989E-01 + 9822 9.82100E+00 -3.054678E-01 + 9823 9.82200E+00 -3.054367E-01 + 9824 9.82300E+00 -3.054056E-01 + 9825 9.82400E+00 -3.053745E-01 + 9826 9.82500E+00 -3.053435E-01 + 9827 9.82600E+00 -3.053124E-01 + 9828 9.82700E+00 -3.052813E-01 + 9829 9.82800E+00 -3.052503E-01 + 9830 9.82900E+00 -3.052192E-01 + 9831 9.83000E+00 -3.051882E-01 + 9832 9.83100E+00 -3.051571E-01 + 9833 9.83200E+00 -3.051261E-01 + 9834 9.83300E+00 -3.050951E-01 + 9835 9.83400E+00 -3.050640E-01 + 9836 9.83500E+00 -3.050330E-01 + 9837 9.83600E+00 -3.050020E-01 + 9838 9.83700E+00 -3.049710E-01 + 9839 9.83800E+00 -3.049400E-01 + 9840 9.83900E+00 -3.049090E-01 + 9841 9.84000E+00 -3.048780E-01 + 9842 9.84100E+00 -3.048470E-01 + 9843 9.84200E+00 -3.048161E-01 + 9844 9.84300E+00 -3.047851E-01 + 9845 9.84400E+00 -3.047542E-01 + 9846 9.84500E+00 -3.047232E-01 + 9847 9.84600E+00 -3.046923E-01 + 9848 9.84700E+00 -3.046613E-01 + 9849 9.84800E+00 -3.046304E-01 + 9850 9.84900E+00 -3.045994E-01 + 9851 9.85000E+00 -3.045685E-01 + 9852 9.85100E+00 -3.045376E-01 + 9853 9.85200E+00 -3.045067E-01 + 9854 9.85300E+00 -3.044758E-01 + 9855 9.85400E+00 -3.044449E-01 + 9856 9.85500E+00 -3.044140E-01 + 9857 9.85600E+00 -3.043831E-01 + 9858 9.85700E+00 -3.043522E-01 + 9859 9.85800E+00 -3.043214E-01 + 9860 9.85900E+00 -3.042905E-01 + 9861 9.86000E+00 -3.042596E-01 + 9862 9.86100E+00 -3.042288E-01 + 9863 9.86200E+00 -3.041979E-01 + 9864 9.86300E+00 -3.041671E-01 + 9865 9.86400E+00 -3.041363E-01 + 9866 9.86500E+00 -3.041054E-01 + 9867 9.86600E+00 -3.040746E-01 + 9868 9.86700E+00 -3.040438E-01 + 9869 9.86800E+00 -3.040130E-01 + 9870 9.86900E+00 -3.039822E-01 + 9871 9.87000E+00 -3.039514E-01 + 9872 9.87100E+00 -3.039206E-01 + 9873 9.87200E+00 -3.038898E-01 + 9874 9.87300E+00 -3.038590E-01 + 9875 9.87400E+00 -3.038282E-01 + 9876 9.87500E+00 -3.037975E-01 + 9877 9.87600E+00 -3.037667E-01 + 9878 9.87700E+00 -3.037360E-01 + 9879 9.87800E+00 -3.037052E-01 + 9880 9.87900E+00 -3.036745E-01 + 9881 9.88000E+00 -3.036437E-01 + 9882 9.88100E+00 -3.036130E-01 + 9883 9.88200E+00 -3.035823E-01 + 9884 9.88300E+00 -3.035516E-01 + 9885 9.88400E+00 -3.035208E-01 + 9886 9.88500E+00 -3.034901E-01 + 9887 9.88600E+00 -3.034594E-01 + 9888 9.88700E+00 -3.034287E-01 + 9889 9.88800E+00 -3.033981E-01 + 9890 9.88900E+00 -3.033674E-01 + 9891 9.89000E+00 -3.033367E-01 + 9892 9.89100E+00 -3.033060E-01 + 9893 9.89200E+00 -3.032754E-01 + 9894 9.89300E+00 -3.032447E-01 + 9895 9.89400E+00 -3.032141E-01 + 9896 9.89500E+00 -3.031834E-01 + 9897 9.89600E+00 -3.031528E-01 + 9898 9.89700E+00 -3.031221E-01 + 9899 9.89800E+00 -3.030915E-01 + 9900 9.89900E+00 -3.030609E-01 + 9901 9.90000E+00 -3.030303E-01 + 9902 9.90100E+00 -3.029997E-01 + 9903 9.90200E+00 -3.029691E-01 + 9904 9.90300E+00 -3.029385E-01 + 9905 9.90400E+00 -3.029079E-01 + 9906 9.90500E+00 -3.028773E-01 + 9907 9.90600E+00 -3.028467E-01 + 9908 9.90700E+00 -3.028162E-01 + 9909 9.90800E+00 -3.027856E-01 + 9910 9.90900E+00 -3.027550E-01 + 9911 9.91000E+00 -3.027245E-01 + 9912 9.91100E+00 -3.026940E-01 + 9913 9.91200E+00 -3.026634E-01 + 9914 9.91300E+00 -3.026329E-01 + 9915 9.91400E+00 -3.026024E-01 + 9916 9.91500E+00 -3.025718E-01 + 9917 9.91600E+00 -3.025413E-01 + 9918 9.91700E+00 -3.025108E-01 + 9919 9.91800E+00 -3.024803E-01 + 9920 9.91900E+00 -3.024498E-01 + 9921 9.92000E+00 -3.024193E-01 + 9922 9.92100E+00 -3.023888E-01 + 9923 9.92200E+00 -3.023584E-01 + 9924 9.92300E+00 -3.023279E-01 + 9925 9.92400E+00 -3.022974E-01 + 9926 9.92500E+00 -3.022670E-01 + 9927 9.92600E+00 -3.022365E-01 + 9928 9.92700E+00 -3.022061E-01 + 9929 9.92800E+00 -3.021756E-01 + 9930 9.92900E+00 -3.021452E-01 + 9931 9.93000E+00 -3.021148E-01 + 9932 9.93100E+00 -3.020843E-01 + 9933 9.93200E+00 -3.020539E-01 + 9934 9.93300E+00 -3.020235E-01 + 9935 9.93400E+00 -3.019931E-01 + 9936 9.93500E+00 -3.019627E-01 + 9937 9.93600E+00 -3.019323E-01 + 9938 9.93700E+00 -3.019019E-01 + 9939 9.93800E+00 -3.018716E-01 + 9940 9.93900E+00 -3.018412E-01 + 9941 9.94000E+00 -3.018108E-01 + 9942 9.94100E+00 -3.017805E-01 + 9943 9.94200E+00 -3.017501E-01 + 9944 9.94300E+00 -3.017198E-01 + 9945 9.94400E+00 -3.016894E-01 + 9946 9.94500E+00 -3.016591E-01 + 9947 9.94600E+00 -3.016288E-01 + 9948 9.94700E+00 -3.015984E-01 + 9949 9.94800E+00 -3.015681E-01 + 9950 9.94900E+00 -3.015378E-01 + 9951 9.95000E+00 -3.015075E-01 + 9952 9.95100E+00 -3.014772E-01 + 9953 9.95200E+00 -3.014469E-01 + 9954 9.95300E+00 -3.014166E-01 + 9955 9.95400E+00 -3.013864E-01 + 9956 9.95500E+00 -3.013561E-01 + 9957 9.95600E+00 -3.013258E-01 + 9958 9.95700E+00 -3.012955E-01 + 9959 9.95800E+00 -3.012653E-01 + 9960 9.95900E+00 -3.012350E-01 + 9961 9.96000E+00 -3.012048E-01 + 9962 9.96100E+00 -3.011746E-01 + 9963 9.96200E+00 -3.011443E-01 + 9964 9.96300E+00 -3.011141E-01 + 9965 9.96400E+00 -3.010839E-01 + 9966 9.96500E+00 -3.010537E-01 + 9967 9.96600E+00 -3.010235E-01 + 9968 9.96700E+00 -3.009933E-01 + 9969 9.96800E+00 -3.009631E-01 + 9970 9.96900E+00 -3.009329E-01 + 9971 9.97000E+00 -3.009027E-01 + 9972 9.97100E+00 -3.008725E-01 + 9973 9.97200E+00 -3.008424E-01 + 9974 9.97300E+00 -3.008122E-01 + 9975 9.97400E+00 -3.007820E-01 + 9976 9.97500E+00 -3.007519E-01 + 9977 9.97600E+00 -3.007217E-01 + 9978 9.97700E+00 -3.006916E-01 + 9979 9.97800E+00 -3.006615E-01 + 9980 9.97900E+00 -3.006313E-01 + 9981 9.98000E+00 -3.006012E-01 + 9982 9.98100E+00 -3.005711E-01 + 9983 9.98200E+00 -3.005410E-01 + 9984 9.98300E+00 -3.005109E-01 + 9985 9.98400E+00 -3.004808E-01 + 9986 9.98500E+00 -3.004507E-01 + 9987 9.98600E+00 -3.004206E-01 + 9988 9.98700E+00 -3.003905E-01 + 9989 9.98800E+00 -3.003604E-01 + 9990 9.98900E+00 -3.003304E-01 + 9991 9.99000E+00 -3.003003E-01 + 9992 9.99100E+00 -3.002703E-01 + 9993 9.99200E+00 -3.002402E-01 + 9994 9.99300E+00 -3.002102E-01 + 9995 9.99400E+00 -3.001801E-01 + 9996 9.99500E+00 -3.001501E-01 + 9997 9.99600E+00 -3.001201E-01 + 9998 9.99700E+00 -3.000900E-01 + 9999 9.99800E+00 -3.000600E-01 +# use_poly: F +# vtype: 7 +# iorb_start: 1 +# r(icut): 1.983933 +# rcut: 2.000000 +# pcoeff: 0.000000E+00 +# wfopt: 0.000000000000E+00 +# wfopt: 0.000000000000E+00 +# wfopt: 0.000000000000E+00 +# npar: 3 +# param( 1) -2.365161818626E+00 +# param( 2) 3.873287186776E+00 +# param( 3) -6.980966226984E+00 +# param( 4) 3.099802766534E+00 +# param( 5) 3.503366573786E+00 +# param( 6) -2.577960345323E+00 +----------- vlocal.ini ------------ +1 mk_vlocal +2.0 rcut # 0.8 x peak +7 vtype +1 iorb_start +0.0 pcoeff +0.000 0.000 0.0 wopt coefficients +-1 magnetic fit +2e-1 magnetic fitting weight +-0.18278 E(high spin) - E(low spin) +1 3 5.0 1.0 0.0 occ spin up (valence only) +1 3 0.5 1.0 0.0 occ spin down (valence only) +3 npar + -2.267758E+00 + 4.023203E+00 + -7.946056E+00 + 4.879319E+00 + 3.066083E+00 + -3.809382E+00 + 6.546663E-03 + 8.636164E-01 + -1.839027E-01 + diff --git a/tests/integrate/101_PW_lps6_pseudopots/INPUT b/tests/integrate/101_PW_lps6_pseudopots/INPUT new file mode 100644 index 0000000000..367c0254c8 --- /dev/null +++ b/tests/integrate/101_PW_lps6_pseudopots/INPUT @@ -0,0 +1,27 @@ +INPUT_PARAMETERS +#Parameters (1.General) +suffix autotest +calculation scf + +nbands 13 +symmetry 1 +pseudo_dir ../../PP_ORB +pseudo_rcut 10 +out_element_info 1 + +#Parameters (2.Iteration) +ecutwfc 20 +scf_thr 1e-6 +scf_nmax 100 + + +#Parameters (3.Basis) +basis_type pw + +#Parameters (4.Smearing) +smearing_method gauss +smearing_sigma 0.002 +dft_functional pbe +#Parameters (5.Mixing) +mixing_type broyden +mixing_beta 0.7 diff --git a/tests/integrate/101_PW_lps6_pseudopots/KPT b/tests/integrate/101_PW_lps6_pseudopots/KPT new file mode 100644 index 0000000000..c289c0158a --- /dev/null +++ b/tests/integrate/101_PW_lps6_pseudopots/KPT @@ -0,0 +1,4 @@ +K_POINTS +0 +Gamma +1 1 1 0 0 0 diff --git a/tests/integrate/101_PW_lps6_pseudopots/README b/tests/integrate/101_PW_lps6_pseudopots/README new file mode 100644 index 0000000000..3f5e10718e --- /dev/null +++ b/tests/integrate/101_PW_lps6_pseudopots/README @@ -0,0 +1,5 @@ +This test for: +*Ag-fcc +*LPS in psp6 format (local pseudopotential) +*mixing_type broyden-kerker +*mixing_beta 0.7 diff --git a/tests/integrate/101_PW_lps6_pseudopots/STRU b/tests/integrate/101_PW_lps6_pseudopots/STRU new file mode 100644 index 0000000000..b29be45f9c --- /dev/null +++ b/tests/integrate/101_PW_lps6_pseudopots/STRU @@ -0,0 +1,18 @@ +ATOMIC_SPECIES +Ag 26.98 ag_lps.cpi blps + +LATTICE_CONSTANT +7.50241114482312 // add lattice constant + +LATTICE_VECTORS +0.000000000000 0.500000000000 0.500000000000 +0.500000000000 0.000000000000 0.500000000000 +0.500000000000 0.500000000000 0.000000000000 + +ATOMIC_POSITIONS +Direct + +Ag +0 +1 + 0.000000000000 0.000000000000 0.000000000000 1 1 1 diff --git a/tests/integrate/101_PW_lps6_pseudopots/jd b/tests/integrate/101_PW_lps6_pseudopots/jd new file mode 100644 index 0000000000..d45db2488f --- /dev/null +++ b/tests/integrate/101_PW_lps6_pseudopots/jd @@ -0,0 +1 @@ +test LPS in psp6 format, symmetry=on diff --git a/tests/integrate/101_PW_lps6_pseudopots/result.ref b/tests/integrate/101_PW_lps6_pseudopots/result.ref new file mode 100644 index 0000000000..23550ae8fc --- /dev/null +++ b/tests/integrate/101_PW_lps6_pseudopots/result.ref @@ -0,0 +1,6 @@ +etotref -3860.058264329522 +etotperatomref -3860.0582643295 +pointgroupref O_h +spacegroupref O_h +nksibzref 1 +totaltimeref 0.20 diff --git a/tests/integrate/101_PW_lps8_pseudopots/INPUT b/tests/integrate/101_PW_lps8_pseudopots/INPUT new file mode 100644 index 0000000000..92ffb868c9 --- /dev/null +++ b/tests/integrate/101_PW_lps8_pseudopots/INPUT @@ -0,0 +1,27 @@ +INPUT_PARAMETERS +#Parameters (1.General) +suffix autotest +calculation scf + +nbands 3 +symmetry 1 +pseudo_dir ../../PP_ORB +pseudo_rcut 10 +out_element_info 1 + +#Parameters (2.Iteration) +ecutwfc 20 +scf_thr 1e-6 +scf_nmax 100 + + +#Parameters (3.Basis) +basis_type pw + +#Parameters (4.Smearing) +smearing_method gauss +smearing_sigma 0.002 +dft_functional pbe +#Parameters (5.Mixing) +mixing_type broyden +mixing_beta 0.7 diff --git a/tests/integrate/260_NO_15_PK_PU_AF/KPT b/tests/integrate/101_PW_lps8_pseudopots/KPT similarity index 100% rename from tests/integrate/260_NO_15_PK_PU_AF/KPT rename to tests/integrate/101_PW_lps8_pseudopots/KPT diff --git a/tests/integrate/101_PW_lps8_pseudopots/README b/tests/integrate/101_PW_lps8_pseudopots/README new file mode 100644 index 0000000000..f1b271c8b0 --- /dev/null +++ b/tests/integrate/101_PW_lps8_pseudopots/README @@ -0,0 +1,5 @@ +This test for: +*Al-fcc +*LPS in psp8 format (local pseudopotential) +*mixing_type broyden-kerker +*mixing_beta 0.7 diff --git a/tests/integrate/101_PW_lps8_pseudopots/STRU b/tests/integrate/101_PW_lps8_pseudopots/STRU new file mode 100644 index 0000000000..51c8570791 --- /dev/null +++ b/tests/integrate/101_PW_lps8_pseudopots/STRU @@ -0,0 +1,18 @@ +ATOMIC_SPECIES +Al 26.98 al_lps.cpi blps + +LATTICE_CONSTANT +7.50241114482312 // add lattice constant + +LATTICE_VECTORS +0.000000000000 0.500000000000 0.500000000000 +0.500000000000 0.000000000000 0.500000000000 +0.500000000000 0.500000000000 0.000000000000 + +ATOMIC_POSITIONS +Direct + +Al +0 +1 + 0.000000000000 0.000000000000 0.000000000000 1 1 1 diff --git a/tests/integrate/101_PW_lps8_pseudopots/jd b/tests/integrate/101_PW_lps8_pseudopots/jd new file mode 100644 index 0000000000..b78dc67939 --- /dev/null +++ b/tests/integrate/101_PW_lps8_pseudopots/jd @@ -0,0 +1 @@ +test LPS in psp8 format, symmetry=on diff --git a/tests/integrate/101_PW_lps8_pseudopots/result.ref b/tests/integrate/101_PW_lps8_pseudopots/result.ref new file mode 100644 index 0000000000..103eea089d --- /dev/null +++ b/tests/integrate/101_PW_lps8_pseudopots/result.ref @@ -0,0 +1,6 @@ +etotref -55.79955794430884 +etotperatomref -55.7995579443 +pointgroupref O_h +spacegroupref O_h +nksibzref 3 +totaltimeref 0.20 diff --git a/tests/integrate/260_NO_15_PK_PU_AF/result.ref b/tests/integrate/260_NO_15_PK_PU_AF/result.ref deleted file mode 100644 index 62f49c80fc..0000000000 --- a/tests/integrate/260_NO_15_PK_PU_AF/result.ref +++ /dev/null @@ -1,4 +0,0 @@ -etotref -7304.1083525045141869 -etotperatomref -1826.0270881261 -totaltimeref 29.0044 -28.78 diff --git a/tests/integrate/260_NO_DJ_PK_PU_FM/INPUT b/tests/integrate/260_NO_DJ_PK_PU_FM/INPUT new file mode 100644 index 0000000000..6fac450793 --- /dev/null +++ b/tests/integrate/260_NO_DJ_PK_PU_FM/INPUT @@ -0,0 +1,42 @@ +INPUT_PARAMETERS +suffix autotest +nbands 40 + +calculation scf +ecutwfc 20 +scf_thr 1.0e-4 +scf_nmax 50 +out_chg 0 + +#init_chg file +#out_dos 1 +#dos_sigma 0.05 +#out_band 1 + +smearing_method gaussian +smearing_sigma 0.01 + +cal_force 1 +cal_stress 1 +#force_thr_ev 0.01 +#relax_method cg +#relax_bfgs_init 0.5 + +mixing_type broyden +mixing_beta 0.4 +mixing_restart 1e-3 +mixing_dmr 1 +#mixing_gg0 1.0 + +ks_solver scalapack_gvx +basis_type lcao +gamma_only 0 +symmetry 0 +nspin 2 + +#Parameter DFT+U +dft_plus_u 1 +orbital_corr 2 -1 +hubbard_u 5.0 0.0 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB diff --git a/tests/integrate/260_NO_DJ_PK_PU_FM/KPT b/tests/integrate/260_NO_DJ_PK_PU_FM/KPT new file mode 100644 index 0000000000..f5f7f4ec34 --- /dev/null +++ b/tests/integrate/260_NO_DJ_PK_PU_FM/KPT @@ -0,0 +1,4 @@ +K_POINTS +0 +Gamma +2 2 2 0 0 0 diff --git a/tests/integrate/260_NO_15_PK_PU_AF/README b/tests/integrate/260_NO_DJ_PK_PU_FM/README similarity index 100% rename from tests/integrate/260_NO_15_PK_PU_AF/README rename to tests/integrate/260_NO_DJ_PK_PU_FM/README diff --git a/tests/integrate/260_NO_DJ_PK_PU_FM/STRU b/tests/integrate/260_NO_DJ_PK_PU_FM/STRU new file mode 100644 index 0000000000..7d70cfd365 --- /dev/null +++ b/tests/integrate/260_NO_DJ_PK_PU_FM/STRU @@ -0,0 +1,29 @@ +ATOMIC_SPECIES +Fe 1.000 Fe.upf +O 1.000 O_ONCV_PBE-1.0.upf + +NUMERICAL_ORBITAL +Fe_gga_6au_100Ry_4s2p2d1f.orb +O_gga_7au_100Ry_2s2p1d.orb + +LATTICE_CONSTANT +8.190 + +LATTICE_VECTORS + 1.00 0.50 0.50 + 0.50 1.00 0.50 + 0.50 0.50 1.00 +ATOMIC_POSITIONS +Direct + +Fe +0.0 +2 +0.00 0.00 0.00 mag 1.0 +0.51 0.51 0.51 mag 1.0 + +O +0.0 +2 +0.25 0.25 0.25 1 1 1 +0.75 0.75 0.75 1 1 1 diff --git a/tests/integrate/260_NO_15_PK_PU_AF/jd b/tests/integrate/260_NO_DJ_PK_PU_FM/jd similarity index 100% rename from tests/integrate/260_NO_15_PK_PU_AF/jd rename to tests/integrate/260_NO_DJ_PK_PU_FM/jd diff --git a/tests/integrate/260_NO_DJ_PK_PU_FM/result.ref b/tests/integrate/260_NO_DJ_PK_PU_FM/result.ref new file mode 100644 index 0000000000..ad76806290 --- /dev/null +++ b/tests/integrate/260_NO_DJ_PK_PU_FM/result.ref @@ -0,0 +1,5 @@ +etotref -7646.4666365104749275 +etotperatomref -1911.6166591276 +totalforceref 9.299706 +totalstressref 2653.482795 +totaltimeref 10.89 diff --git a/tests/integrate/260_NO_DJ_PK_PU_S1/INPUT b/tests/integrate/260_NO_DJ_PK_PU_S1/INPUT new file mode 100644 index 0000000000..98ffb30faa --- /dev/null +++ b/tests/integrate/260_NO_DJ_PK_PU_S1/INPUT @@ -0,0 +1,42 @@ +INPUT_PARAMETERS +suffix autotest +nbands 40 + +calculation scf +ecutwfc 20 +scf_thr 1.0e-4 +scf_nmax 50 +out_chg 0 + +#init_chg file +#out_dos 1 +#dos_sigma 0.05 +#out_band 1 + +smearing_method gaussian +smearing_sigma 0.01 + +cal_force 1 +cal_stress 1 +#force_thr_ev 0.01 +#relax_method cg +#relax_bfgs_init 0.5 + +mixing_type broyden +mixing_beta 0.4 +mixing_restart 1e-3 +mixing_dmr 1 +#mixing_gg0 1.0 + +ks_solver scalapack_gvx +basis_type lcao +gamma_only 0 +symmetry 0 +nspin 1 + +#Parameter DFT+U +dft_plus_u 1 +orbital_corr 2 -1 +hubbard_u 5.0 0.0 +pseudo_dir ../../PP_ORB +orbital_dir ../../PP_ORB diff --git a/tests/integrate/260_NO_DJ_PK_PU_S1/KPT b/tests/integrate/260_NO_DJ_PK_PU_S1/KPT new file mode 100644 index 0000000000..f5f7f4ec34 --- /dev/null +++ b/tests/integrate/260_NO_DJ_PK_PU_S1/KPT @@ -0,0 +1,4 @@ +K_POINTS +0 +Gamma +2 2 2 0 0 0 diff --git a/tests/integrate/260_NO_DJ_PK_PU_S1/README b/tests/integrate/260_NO_DJ_PK_PU_S1/README new file mode 100644 index 0000000000..a4e89d5a20 --- /dev/null +++ b/tests/integrate/260_NO_DJ_PK_PU_S1/README @@ -0,0 +1,6 @@ +FeO Ferromagnetic+LDA+U +NSPIN 2 +lcao +init magnet: up + up +SG15 + diff --git a/tests/integrate/260_NO_15_PK_PU_AF/STRU b/tests/integrate/260_NO_DJ_PK_PU_S1/STRU similarity index 84% rename from tests/integrate/260_NO_15_PK_PU_AF/STRU rename to tests/integrate/260_NO_DJ_PK_PU_S1/STRU index bc7df2227b..4feb58672b 100644 --- a/tests/integrate/260_NO_15_PK_PU_AF/STRU +++ b/tests/integrate/260_NO_DJ_PK_PU_S1/STRU @@ -3,7 +3,7 @@ Fe 1.000 Fe_ONCV_PBE-1.0.upf O 1.000 O_ONCV_PBE-1.0.upf NUMERICAL_ORBITAL -Fe_gga_9au_100Ry_4s2p2d1f.orb +Fe_gga_6au_100Ry_4s2p2d1f.orb O_gga_7au_100Ry_2s2p1d.orb LATTICE_CONSTANT @@ -20,7 +20,7 @@ Fe 0.0 2 0.00 0.00 0.00 mag 1.0 -0.50 0.50 0.50 mag -1.0 +0.51 0.51 0.51 mag 1.0 O 0.0 diff --git a/tests/integrate/260_NO_DJ_PK_PU_S1/jd b/tests/integrate/260_NO_DJ_PK_PU_S1/jd new file mode 100644 index 0000000000..54fb416637 --- /dev/null +++ b/tests/integrate/260_NO_DJ_PK_PU_S1/jd @@ -0,0 +1 @@ +DFTU + NSPIN1, Fe2O2, multi-k case diff --git a/tests/integrate/260_NO_DJ_PK_PU_S1/result.ref b/tests/integrate/260_NO_DJ_PK_PU_S1/result.ref new file mode 100644 index 0000000000..78caba2048 --- /dev/null +++ b/tests/integrate/260_NO_DJ_PK_PU_S1/result.ref @@ -0,0 +1,5 @@ +etotref -7135.2791416552263399 +etotperatomref -1783.8197854138 +totalforceref 102.447381 +totalstressref 2527.719597 +totaltimeref 7.11 diff --git a/tests/integrate/260_NO_15_PK_PU_AF/INPUT b/tests/integrate/260_NO_DJ_PK_PU_SO/INPUT similarity index 75% rename from tests/integrate/260_NO_15_PK_PU_AF/INPUT rename to tests/integrate/260_NO_DJ_PK_PU_SO/INPUT index 63b9f76acc..2473aed38b 100644 --- a/tests/integrate/260_NO_15_PK_PU_AF/INPUT +++ b/tests/integrate/260_NO_DJ_PK_PU_SO/INPUT @@ -3,9 +3,9 @@ suffix autotest nbands 40 calculation scf -ecutwfc 50 +ecutwfc 20 scf_thr 1.0e-4 -scf_nmax 3 +scf_nmax 50 out_chg 0 #init_chg file @@ -14,27 +14,28 @@ out_chg 0 #out_band 1 smearing_method gaussian -smearing_sigma 0.07 +smearing_sigma 0.01 -#cal_force 1 -#cal_stress 1 #force_thr_ev 0.01 #relax_method cg #relax_bfgs_init 0.5 mixing_type broyden mixing_beta 0.4 +mixing_restart 1e-3 +mixing_dmr 1 #mixing_gg0 1.0 ks_solver scalapack_gvx basis_type lcao gamma_only 0 symmetry 0 -nspin 2 +noncolin 1 +lspinorb 1 #Parameter DFT+U dft_plus_u 1 -orbital_corr 2 2 -1 -hubbard_u 5.0 5.0 0.0 +orbital_corr 2 +hubbard_u 5.0 pseudo_dir ../../PP_ORB orbital_dir ../../PP_ORB diff --git a/tests/integrate/260_NO_DJ_PK_PU_SO/KPT b/tests/integrate/260_NO_DJ_PK_PU_SO/KPT new file mode 100644 index 0000000000..f5f7f4ec34 --- /dev/null +++ b/tests/integrate/260_NO_DJ_PK_PU_SO/KPT @@ -0,0 +1,4 @@ +K_POINTS +0 +Gamma +2 2 2 0 0 0 diff --git a/tests/integrate/260_NO_DJ_PK_PU_SO/README b/tests/integrate/260_NO_DJ_PK_PU_SO/README new file mode 100644 index 0000000000..a4e89d5a20 --- /dev/null +++ b/tests/integrate/260_NO_DJ_PK_PU_SO/README @@ -0,0 +1,6 @@ +FeO Ferromagnetic+LDA+U +NSPIN 2 +lcao +init magnet: up + up +SG15 + diff --git a/tests/integrate/260_NO_DJ_PK_PU_SO/STRU b/tests/integrate/260_NO_DJ_PK_PU_SO/STRU new file mode 100644 index 0000000000..91021e0a69 --- /dev/null +++ b/tests/integrate/260_NO_DJ_PK_PU_SO/STRU @@ -0,0 +1,22 @@ +ATOMIC_SPECIES +Fe 1.000 Fe.upf + +NUMERICAL_ORBITAL +Fe_gga_6au_100Ry_4s2p2d1f.orb + +LATTICE_CONSTANT +8.190 + +LATTICE_VECTORS + 1.00 0.50 0.50 + 0.50 1.00 0.50 + 0.50 0.50 1.00 +ATOMIC_POSITIONS +Direct + +Fe +0.0 +2 +0.00 0.00 0.00 mag 1.0 1.0 1.0 +0.51 0.51 0.51 mag 1.0 1.0 1.0 + diff --git a/tests/integrate/260_NO_DJ_PK_PU_SO/jd b/tests/integrate/260_NO_DJ_PK_PU_SO/jd new file mode 100644 index 0000000000..a62963b97d --- /dev/null +++ b/tests/integrate/260_NO_DJ_PK_PU_SO/jd @@ -0,0 +1 @@ +DFTU + NSPIN2, Fe2O2, multi-k case diff --git a/tests/integrate/260_NO_DJ_PK_PU_SO/result.ref b/tests/integrate/260_NO_DJ_PK_PU_SO/result.ref new file mode 100644 index 0000000000..6d0b62f270 --- /dev/null +++ b/tests/integrate/260_NO_DJ_PK_PU_SO/result.ref @@ -0,0 +1,3 @@ +etotref -6773.0351159063984596 +etotperatomref -3386.5175579532 +totaltimeref 5.72 diff --git a/tests/integrate/601_NO_TDDFT_CO/INPUT b/tests/integrate/601_NO_TDDFT_CO/INPUT old mode 100755 new mode 100644 diff --git a/tests/integrate/601_NO_TDDFT_CO/KPT b/tests/integrate/601_NO_TDDFT_CO/KPT old mode 100755 new mode 100644 diff --git a/tests/integrate/601_NO_TDDFT_CO/STRU b/tests/integrate/601_NO_TDDFT_CO/STRU old mode 100755 new mode 100644 diff --git a/tests/integrate/601_NO_TDDFT_H2/INPUT b/tests/integrate/601_NO_TDDFT_H2/INPUT old mode 100755 new mode 100644 diff --git a/tests/integrate/601_NO_TDDFT_H2/KPT b/tests/integrate/601_NO_TDDFT_H2/KPT old mode 100755 new mode 100644 diff --git a/tests/integrate/601_NO_TDDFT_H2/STRU b/tests/integrate/601_NO_TDDFT_H2/STRU old mode 100755 new mode 100644 diff --git a/tests/integrate/907_OF_LPS/INPUT b/tests/integrate/907_OF_LPS/INPUT new file mode 100644 index 0000000000..3c0bc2e6c5 --- /dev/null +++ b/tests/integrate/907_OF_LPS/INPUT @@ -0,0 +1,28 @@ +INPUT_PARAMETERS +#Parameters (1.General) +suffix autotest +calculation scf +esolver_type ofdft + +symmetry 1 +pseudo_dir ../../PP_ORB +pseudo_rcut 10 +nspin 1 +cal_force 1 +test_force 1 +cal_stress 1 +test_stress 1 + +#Parameters (2.Iteration) +ecutwfc 20 +scf_nmax 50 + +#OFDFT +of_kinetic wt +of_method tn +of_conv energy +of_tole 2e-6 + +#Parameters (3.Basis) +basis_type pw + diff --git a/tests/integrate/907_OF_LPS/KPT b/tests/integrate/907_OF_LPS/KPT new file mode 100644 index 0000000000..c289c0158a --- /dev/null +++ b/tests/integrate/907_OF_LPS/KPT @@ -0,0 +1,4 @@ +K_POINTS +0 +Gamma +1 1 1 0 0 0 diff --git a/tests/integrate/907_OF_LPS/STRU b/tests/integrate/907_OF_LPS/STRU new file mode 100644 index 0000000000..51c8570791 --- /dev/null +++ b/tests/integrate/907_OF_LPS/STRU @@ -0,0 +1,18 @@ +ATOMIC_SPECIES +Al 26.98 al_lps.cpi blps + +LATTICE_CONSTANT +7.50241114482312 // add lattice constant + +LATTICE_VECTORS +0.000000000000 0.500000000000 0.500000000000 +0.500000000000 0.000000000000 0.500000000000 +0.500000000000 0.500000000000 0.000000000000 + +ATOMIC_POSITIONS +Direct + +Al +0 +1 + 0.000000000000 0.000000000000 0.000000000000 1 1 1 diff --git a/tests/integrate/907_OF_LPS/jd b/tests/integrate/907_OF_LPS/jd new file mode 100644 index 0000000000..094927fcbf --- /dev/null +++ b/tests/integrate/907_OF_LPS/jd @@ -0,0 +1 @@ +Test the energy, force, and stress of Wang-Teter (WT) kinetic energy functional (of_method = wt) with LPS in OFDFT, symmetry=on diff --git a/tests/integrate/907_OF_LPS/result.ref b/tests/integrate/907_OF_LPS/result.ref new file mode 100644 index 0000000000..db38ca5101 --- /dev/null +++ b/tests/integrate/907_OF_LPS/result.ref @@ -0,0 +1,8 @@ +etotref -55.9081453813626368 +etotperatomref -55.9081453814 +totalforceref 0.000000 +totalstressref 282.735417 +pointgroupref O_h +spacegroupref O_h +nksibzref 1 +totaltimeref 0.54 diff --git a/tests/integrate/Autotest.sh b/tests/integrate/Autotest.sh index ab7de6bc5b..fb29c11a30 100755 --- a/tests/integrate/Autotest.sh +++ b/tests/integrate/Autotest.sh @@ -193,6 +193,12 @@ if [ "$sanitize" == true ]; then fi for dir in $testdir; do + if [ ! -d $dir ];then + echo -e "\e[0;31m[ERROR ]\e[0m $dir is not a directory.\n" + let fatal++ + fatal_case_list+=$dir'\n' + continue + fi cd $dir echo -e "\e[0;32m[ RUN ]\e[0m $dir" TIMEFORMAT='[----------] Time elapsed: %R seconds' diff --git a/tests/integrate/CASES b/tests/integrate/CASES index c870faf59a..f82151cab6 100644 --- a/tests/integrate/CASES +++ b/tests/integrate/CASES @@ -5,6 +5,8 @@ 101_PW_15_pseudopots_LibxcLDA 101_PW_15_paw 101_PW_blps_pseudopots +101_PW_lps6_pseudopots +101_PW_lps8_pseudopots 101_PW_OU_pseudopots 101_PW_upf100_Al_pseudopots 101_PW_upf201_Al_pseudopots @@ -177,7 +179,9 @@ 250_NO_KP_CR_VDW3 250_NO_KP_CR_VDW3ABC 250_NO_KP_CR_VDW3BJ -260_NO_15_PK_PU_AF +260_NO_DJ_PK_PU_FM +260_NO_DJ_PK_PU_SO +260_NO_DJ_PK_PU_S1 270_NO_MD_1O 270_NO_MD_2O 281_NO_KP_HSE @@ -326,6 +330,7 @@ 905_OF_FFT_fullpwdim_2 905_OF_FFT_fullpw_off 906_OF_LibxcPBE +907_OF_LPS 920_OF_MD_LDA 920_OF_MD_LibxcPBE 921_OF_CR_LDA diff --git a/toolchain/Details.md b/toolchain/Details.md index 631d8b8bdf..202a492350 100644 --- a/toolchain/Details.md +++ b/toolchain/Details.md @@ -7,17 +7,11 @@ Inspired by cp2k-toolchain, still in improvement. ## Options -Before you use the toolchain installer, you SHOULD put it under the path of ABACUS - -```shell -> mv abacus_toolchain path/to/abacus/ -``` - To use the ABACUS toolchain installer, you may want to first follow the instructions given in installer help message: ```shell -> ./install_ABACUS_toolchain.sh --help +> ./install_abacus_toolchain.sh --help ``` ## Basic usage @@ -25,13 +19,30 @@ the instructions given in installer help message: If you are new to ABACUS, and want a basic ABACUS binary, then just calling ```shell -> ./install_ABACUS_toolchain.sh +> ./toolchain_gnu.sh +``` +to install ABACUS requirements by gcc-openmpi-openblas toolchain or +```shell +> ./toolchain_intel.sh ``` +to install ABACUS requirements by intel-mpi-mkl toolchain (intel-environments need to be loaded first) +may be enough. +The gcc-toolchain will use your system gcc, and mpi library (if +existing) and build scalapack, fftw, openblas, elpa and libxc from scratch, +and give you compiled libraries that allow you to compile ABACUS. +The intel-toolchain will use your system intel-mpi and mkl library environments +to build elpa and libxc from scratch, and give you compiled libraries that allow you to compile ABACUS. -may be enough. This will use your system gcc, and mpi library (if -existing) and build scalapack, fftw, openblas (MKL will be used -instead if MKLROOT env variable is found) and libxc from scratch, -and give you compiled libraries that allow you to compile ABACUS. +After finish the toolchain requirements installation, you can use the following command to compile ABACUS: + +```shell +> ./build_abacus_gnu.sh +``` +or +```shell +> ./build_abacus_intel.sh +``` +to get ABACUS binary file. ## Complete toolchain build @@ -40,7 +51,7 @@ For a complete toolchain build, with everything installed from scratch, use: ```shell -> ./install_ABACUS_toolchain.sh --install-all +> ./install_abacus_toolchain.sh --install-all ``` ### Package settings @@ -49,7 +60,7 @@ One can then change settings for some packages, by setting `--with-PKG` options after the `--install-all` option. e.g.: ```shell -> ./install_ABACUS_toolchain.sh --install-all --with-mkl=system +> ./install_abacus_toolchain.sh --install-all --with-mkl=system ``` will set the script to look for a system MKL library to link, while @@ -136,7 +147,7 @@ be installed separately by the user. ### Structure of the toolchain scripts -- `install_ABACUS_toolchain.sh` is the main script that will call all +- `install_abacus_toolchain.sh` is the main script that will call all other scripts. It contains default flag settings, user input parser, calls to each package installation scripts and the generator of the ABACUS arch files. @@ -151,7 +162,7 @@ be installed separately by the user. write to __two__ files: `build/setup_PKG` and `install/setup`. - The `build/setup_PKG` file contains all the instructions to set - the variables used by the `install_ABACUS_toolchain.sh` and other + the variables used by the `install_abacus_toolchain.sh` and other `script/install_PKG.sh` scripts in order for them to correctly compile the toolchain and set the correct library flags for the arch files. diff --git a/toolchain/README.md b/toolchain/README.md index 6d83fb6802..cf2d4830f2 100644 --- a/toolchain/README.md +++ b/toolchain/README.md @@ -35,12 +35,26 @@ and give setup files that you can use to compile ABACUS. ## Usage Online & Offline -Main script is `install_abacus_toolchain.sh`, -which will use scripts in `scripts` directory +Main script is *install_abacus_toolchain.sh*, +which will use scripts in *scripts* directory to compile install dependencies of ABACUS. You can just `./install_abacus_toolchain.sh -h` to get more help message. +There are also well-modified script to run *install_abacus_toolchain.sh* for `gnu-openblas` and `intel-mkl` toolchains dependencies. + +```shell +# for gnu-openblas +> ./toolchain_gnu.sh +# for intel-mkl +> ./toolchain_intel.sh +# for intel-mkl-mpich +> ./toolchain_intel-mpich.sh +``` +It is recommended to run them first to get a fast installation of ABACUS under certain environments. + +If you have a fresh environments and you have `sudo` permission, you can use *install_requirements.sh* to install system libraries and dependencies needed by toolchain. + **Notice: You SHOULD `source` or `module load` related environments before use toolchain method for installation, espacially for `gcc` or `intel-oneAPI` !!!! for example, `module load mkl mpi icc compiler`** **Notice: You SHOULD keep your environments systematic, for example, you CANNOT load `intel-OneAPI` environments while use gcc toolchain !!!** @@ -67,8 +81,8 @@ wget https://bohrium-api.dp.tech/ds-dl/abacus-deps-93wi-v2 -O abacus-deps-v2.zip If one want to install ABACUS by toolchain OFFLINE, one can manually download all the packages from [cp2k-static/download](https://www.cp2k.org/static/downloads) or official website -and put them in `build` directory by formatted name -like `fftw-3.3.10.tar.gz`, or `openmpi-4.1.5.tar.gz`, +and put them in *build* directory by formatted name +like *fftw-3.3.10.tar.gz*, or *openmpi-4.1.5.tar.gz*, then run this toolchain. All package will be detected and installed automatically. Also, one can install parts of packages OFFLINE and parts of packages ONLINE @@ -113,23 +127,12 @@ e.g.: mv v1.3.2.tar.gz build/cereal-1.3.2.tar.gz ``` -There are also well-modified script to run `install_abacus_toolchain.sh` for `gnu-openblas` and `intel-mkl` toolchains dependencies. - -```shell -# for gnu-openblas -> ./toolchain_gnu.sh -# for intel-mkl -> ./toolchain_intel.sh -# for intel-mkl-mpich -> ./toolchain_intel-mpich.sh -``` - Users can easily compile and install dependencies of ABACUS by running these scripts after loading `gcc` or `intel-mkl-mpi` environment. The toolchain installation process can be interrupted at anytime. -just re-run `install_abacus_toolchain.sh`, toolchain itself may fix it +just re-run *install_abacus_toolchain.sh*, toolchain itself may fix it If compliation is successful, a message will be shown like this: @@ -144,7 +147,7 @@ If compliation is successful, a message will be shown like this: > ./build_abacus_intel.sh > or you can modify the builder scripts to suit your needs. ``` -You can run `build_abacus_gnu.sh` or `build_abacus_intel.sh` to build ABACUS +You can run *build_abacus_gnu.sh* or *build_abacus_intel.sh* to build ABACUS by gnu-toolchain or intel-toolchain respectively, the builder scripts will automatically locate the environment and compile ABACUS. You can manually change the builder scripts to suit your needs. @@ -154,7 +157,7 @@ Then, after `source abacus_env.sh`, one can easily run builder scripts to build ABACUS binary software. If users want to use toolchain but lack of some system library -dependencies, `install_requirements.sh` scripts will help. +dependencies, *install_requirements.sh* scripts will help. If users want to re-install all the package, just do: ```shell @@ -189,7 +192,12 @@ or `permission denied` problem, you can simply run: ./pre_set.sh ``` And also, you can fix `permission denied` problem via `chmod +x` -if `pre_set.sh` have no execution permission. +if *pre_set.sh* have no execution permission; +if the *pre_set.sh* also have `/bin/bash^M` problem, you can run: +``` +> dos2unix pre_set.sh +``` +to fix it ### libtorch and deepks problem If deepks feature have problem, you can manually change libtorch version @@ -211,7 +219,6 @@ The best way is to change `icpx` to `icpc`, `icx` to `icc`. user can manually ch Notice: `icc` and `icpc` from Intel Classic Compiler of Intel-oneAPI is not supported for 2024.0 and newer version. - ### Intel-oneAPI problem Sometimes Intel-oneAPI have problem to link `mpirun`, which will always show in 2023.2.0 version of MPI in Intel-oneAPI. @@ -223,7 +230,6 @@ And will not occur in Intel-MPI before 2021.10.0 (Intel-oneAPI before 2023.2.0) More problem and possible solution can be accessed via [#2928](https://github.com/deepmodeling/abacus-develop/issues/2928) - ## Advanced Installation Usage 1. Users can move toolchain directory to anywhere you like, @@ -237,5 +243,4 @@ of each packages, which may let the installation more fiexible. ## More -More infomation can be read from `Details.md`, -which is merely easily refined from cp2k-toolchain README. \ No newline at end of file +More infomation can be read from `Details.md`. \ No newline at end of file diff --git a/toolchain/build_abacus_gnu.sh b/toolchain/build_abacus_gnu.sh index 1c825db895..724131bc23 100755 --- a/toolchain/build_abacus_gnu.sh +++ b/toolchain/build_abacus_gnu.sh @@ -69,6 +69,7 @@ cmake --install $BUILD_DIR 2>/dev/null # generate abacus_env.sh cat << EOF > "${TOOL}/abacus_env.sh" +#!/bin/bash source $INSTALL_DIR/setup export PATH="${PREFIX}/bin":\${PATH} EOF diff --git a/toolchain/build_abacus_intel-mpich.sh b/toolchain/build_abacus_intel-mpich.sh index aadd61316c..6eb476c215 100755 --- a/toolchain/build_abacus_intel-mpich.sh +++ b/toolchain/build_abacus_intel-mpich.sh @@ -60,6 +60,7 @@ cmake --install $BUILD_DIR 2>/dev/null # generate abacus_env.sh cat << EOF > "${TOOL}/abacus_env.sh" +#!/bin/bash source $INSTALL_DIR/setup export PATH="${PREFIX}/bin":\${PATH} EOF \ No newline at end of file diff --git a/toolchain/build_abacus_intel.sh b/toolchain/build_abacus_intel.sh index 0b5d17d676..4dde3bcce2 100755 --- a/toolchain/build_abacus_intel.sh +++ b/toolchain/build_abacus_intel.sh @@ -61,6 +61,7 @@ cmake --install $BUILD_DIR 2>/dev/null # generate abacus_env.sh cat << EOF > "${TOOL}/abacus_env.sh" +#!/bin/bash source $INSTALL_DIR/setup export PATH="${PREFIX}/bin":\${PATH} EOF diff --git a/toolchain/install_abacus_toolchain.sh b/toolchain/install_abacus_toolchain.sh index 68c7959ce1..e0d35eb06c 100755 --- a/toolchain/install_abacus_toolchain.sh +++ b/toolchain/install_abacus_toolchain.sh @@ -23,7 +23,6 @@ SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")" && pwd -P)" #> \history Created on Friday, 2023/08/18 # Update for Intel (18.08.2023, MK) #> \author Zhaoqing Liu quanmisaka@stu.pku.edu.cn -#> with the reference of Lianheng Tong (ltong) lianheng.tong@kcl.ac.uk # ***************************************************************************** # ------------------------------------------------------------------------ @@ -35,7 +34,6 @@ export BUILDDIR="${ROOTDIR}/build" export INSTALLDIR="${ROOTDIR}/install" export SETUPFILE="${INSTALLDIR}/setup" export SHA256_CHECKSUM="${SCRIPTDIR}/checksums.sha256" -export ARCH_FILE_TEMPLATE="${SCRIPTDIR}/arch_base.tmpl" # ------------------------------------------------------------------------ # Make a copy of all options for $SETUPFILE @@ -61,6 +59,11 @@ USAGE: $(basename $SCRIPT_NAME) [options] +Or a more RECOMMENDED way is to use it by pre-setting workflow scripts: +> gcc-openmpi-openblas environments: toolchain_gnu.sh +> intel-mkl-mpi environments: toolchain_intel.sh +> intel-mpich environments: toolchain_intel_mpich.sh + OPTIONS: -h, --help Show this message. @@ -110,7 +113,6 @@ OPTIONS: Default = 200 --target-cpu Compile for the specified target CPU (e.g. haswell or generic), i.e. do not optimize for the actual host system which is the default (native) ---no-arch-files Do not generate arch files --dry-run Write only config files, but don't actually build packages. The --enable-FEATURE options follow the rules: @@ -206,7 +208,7 @@ All packages to be installed locally will be downloaded and built inside Both ./build and ./install are safe to delete, as they contain only the files and directories that are generated by this script. However, -once all the packages are installed, and you compile ABACUS using the arch +once all the packages are installed, and you compile ABACUS using the setup files provided by this script, then you must keep ./install in exactly the same location as it was first created, as it contains tools and libraries your version of ABACUS binary will depend on. @@ -218,8 +220,8 @@ package it is working on. This is true even if you lose the content of the entire ./build directory. +----------------------------------------------------------------+ - | YOU SHOULD ALWAYS SOURCE ./install/setup BEFORE YOU RUN ABACUS | - | COMPILED WITH THIS TOOLCHAIN | + | YOU SHOULD ALWAYS SOURCE ./install/setup or ./abacus_env.sh | + | BEFORE YOU RUN ABACUS COMPILED WITH THIS TOOLCHAIN | +----------------------------------------------------------------+ EOF @@ -300,7 +302,6 @@ fi # default enable options dry_run="__FALSE__" -no_arch_files="__FALSE__" enable_tsan="__FALSE__" enable_opencl="__FALSE__" enable_cuda="__FALSE__" @@ -440,9 +441,6 @@ while [ $# -ge 1 ]; do user_input="${1#*=}" export LOG_LINES="${user_input}" ;; - --no-arch-files) - no_arch_files="__TRUE__" - ;; --dry-run) dry_run="__TRUE__" ;; @@ -676,12 +674,6 @@ fi mkdir -p ${INSTALLDIR} -# variables used for generating ABACUS ARCH file -export CP_DFLAGS="" -export CP_LIBS="" -export CP_CFLAGS="" -export CP_LDFLAGS="-Wl,--enable-new-dtags" - # ------------------------------------------------------------------------ # Start writing setup file # ------------------------------------------------------------------------ diff --git a/toolchain/install_requirements.sh b/toolchain/install_requirements.sh index 4e25b56844..0f4febc302 100755 --- a/toolchain/install_requirements.sh +++ b/toolchain/install_requirements.sh @@ -1,7 +1,5 @@ #!/bin/bash -e -# author: Ole Schuett - if (($# != 1)); then echo "Usage: install_requirements.sh " exit 1 diff --git a/toolchain/install_requirements_fedora.sh b/toolchain/install_requirements_fedora.sh index 8393fe043f..c31d504b0a 100755 --- a/toolchain/install_requirements_fedora.sh +++ b/toolchain/install_requirements_fedora.sh @@ -1,7 +1,5 @@ #!/bin/bash -e -# author: Ole Schuett - # Install Fedora packages required for the toolchain. echo "Installing Fedora packages..." diff --git a/toolchain/install_requirements_ubuntu.sh b/toolchain/install_requirements_ubuntu.sh index d5238f4398..aa60f4bfc4 100755 --- a/toolchain/install_requirements_ubuntu.sh +++ b/toolchain/install_requirements_ubuntu.sh @@ -1,7 +1,5 @@ #!/bin/bash -e -# author: Ole Schuett - # Install Ubuntu packages required for the toolchain. echo "Installing Ubuntu packages..." diff --git a/toolchain/scripts/arch_base.tmpl b/toolchain/scripts/arch_base.tmpl deleted file mode 100644 index 804b6b0178..0000000000 --- a/toolchain/scripts/arch_base.tmpl +++ /dev/null @@ -1,18 +0,0 @@ -CC = ${CC_arch} -CXX = ${CXX_arch} -AR = ar -r -FC = ${FC_arch} -LD = ${LD_arch} -# -DFLAGS = ${DFLAGS} -# -WFLAGS = ${WFLAGS} -# -FCDEBFLAGS = ${FCDEBFLAGS} -CFLAGS = ${CFLAGS} -FCFLAGS = ${FCFLAGS} -CXXFLAGS = ${CXXFLAGS} -# -LDFLAGS = ${LDFLAGS} -LDFLAGS_C = ${LDFLAGS_C} -LIBS = ${LIBS} diff --git a/toolchain/scripts/generate_arch_files.sh b/toolchain/scripts/generate_arch_files.sh deleted file mode 100755 index 022087196c..0000000000 --- a/toolchain/scripts/generate_arch_files.sh +++ /dev/null @@ -1,490 +0,0 @@ -#!/bin/bash -e - -# TODO: Review and if possible fix shellcheck errors. -# shellcheck disable=all - -[ "${BASH_SOURCE[0]}" ] && SCRIPT_NAME="${BASH_SOURCE[0]}" || SCRIPT_NAME=$0 -SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_NAME")" && pwd -P)" - -source "${SCRIPT_DIR}"/common_vars.sh -source "${SCRIPT_DIR}"/tool_kit.sh -source "${SCRIPT_DIR}"/signal_trap.sh -source "${INSTALLDIR}"/toolchain.conf -source "${INSTALLDIR}"/toolchain.env - -# ------------------------------------------------------------------------ -# generate arch file for compiling ABACUS -# ------------------------------------------------------------------------ - -echo "==================== generating arch files ====================" -echo "arch files can be found in the ${INSTALLDIR}/arch subdirectory" -! [ -f "${INSTALLDIR}/arch" ] && mkdir -p ${INSTALLDIR}/arch -cd ${INSTALLDIR}/arch - -# ------------------------- -# set compiler flags -# ------------------------- - -# need to switch between FC and MPICC etc in arch file, but cannot use -# same variable names, so use _arch suffix -CC_arch="IF_MPI(${MPICC}|${CC})" -CXX_arch="IF_MPI(${MPICXX}|${CXX})" -FC_arch="IF_MPI(${MPIFC}|${FC})" -LD_arch="IF_MPI(${MPIFC}|${FC})" - -# we always want good line information and backtraces -if [ "${with_intel}" != "__DONTUSE__" ]; then - if [ "${TARGET_CPU}" = "native" ]; then - BASEFLAGS="-fPIC -fp-model=precise -g -qopenmp -qopenmp-simd -traceback -xHost" - elif [ "${TARGET_CPU}" = "generic" ]; then - BASEFLAGS="-fPIC -fp-model=precise -g -mtune=$(TARGET_CPU) -qopenmp -qopenmp-simd -traceback" - else - BASEFLAGS="-fPIC -fp-model=precise -g -march=${TARGET_CPU} -mtune=$(TARGET_CPU) -qopenmp -qopenmp-simd -traceback" - fi - OPT_FLAGS="-O2 -funroll-loops" - LDFLAGS_C="-nofor-main" -else - BASEFLAGS="-fno-omit-frame-pointer -fopenmp -g -mtune=${TARGET_CPU} IF_ASAN(-fsanitize=address|)" - OPT_FLAGS="-O3 -funroll-loops" - LDFLAGS_C="" -fi - -NOOPT_FLAGS="-O1" - -# those flags that do not influence code generation are used always, the others if debug -if [ "${with_intel}" != "__DONTUSE__" ]; then - FCDEB_FLAGS="" - FCDEB_FLAGS_DEBUG="" -else - FCDEB_FLAGS="-fbacktrace -ffree-form -fimplicit-none -std=f2008" - FCDEB_FLAGS_DEBUG="-fsanitize=leak -fcheck=all,no-array-temps -ffpe-trap=invalid,zero,overflow -finit-derived -finit-real=snan -finit-integer=-42 -Werror=realloc-lhs -finline-matmul-limit=0" -fi - -# code coverage generation flags -COVERAGE_FLAGS="-O1 -coverage -fkeep-static-functions" -COVERAGE_DFLAGS="-D__NO_ABORT" - -# profile based optimization, see https://www.ABACUS.org/howto:pgo -PROFOPT_FLAGS="\$(PROFOPT)" - -# special flags for gfortran -# https://gcc.gnu.org/onlinedocs/gfortran/Error-and-Warning-Options.html -# we error out for these warnings (-Werror=uninitialized -Wno-maybe-uninitialized -> error on variables that must be used uninitialized) -WFLAGS_ERROR="-Werror=aliasing -Werror=ampersand -Werror=c-binding-type -Werror=intrinsic-shadow -Werror=intrinsics-std -Werror=line-truncation -Werror=tabs -Werror=target-lifetime -Werror=underflow -Werror=unused-but-set-variable -Werror=unused-variable -Werror=unused-dummy-argument -Werror=unused-parameter -Werror=unused-label -Werror=conversion -Werror=zerotrip -Wno-maybe-uninitialized" -# we just warn for those (that eventually might be promoted to WFLAGSERROR). It is useless to put something here with 100s of warnings. -WFLAGS_WARN="-Wuninitialized -Wuse-without-only" -# while here we collect all other warnings, some we'll ignore -# TODO: -Wpedantic with -std2008 requires an upgrade of the MPI interfaces from mpi to mpi_f08 -WFLAGS_WARNALL="-Wno-pedantic -Wall -Wextra -Wsurprising -Warray-temporaries -Wcharacter-truncation -Wconversion-extra -Wimplicit-interface -Wimplicit-procedure -Wreal-q-constant -Walign-commons -Wfunction-elimination -Wrealloc-lhs -Wcompare-reals -Wzerotrip" - -# IEEE_EXCEPTIONS dependency -IEEE_EXCEPTIONS_DFLAGS="-D__HAS_IEEE_EXCEPTIONS" - -# check all of the above flags, filter out incompatible flags for the -# current version of gcc in use -if [ "${with_intel}" == "__DONTUSE__" ]; then - OPT_FLAGS=$(allowed_gfortran_flags $OPT_FLAGS) - NOOPT_FLAGS=$(allowed_gfortran_flags $NOOPT_FLAGS) - FCDEB_FLAGS=$(allowed_gfortran_flags $FCDEB_FLAGS) - FCDEB_FLAGS_DEBUG=$(allowed_gfortran_flags $FCDEB_FLAGS_DEBUG) - COVERAGE_FLAGS=$(allowed_gfortran_flags $COVERAGE_FLAGS) - WFLAGS_ERROR=$(allowed_gfortran_flags $WFLAGS_ERROR) - WFLAGS_WARN=$(allowed_gfortran_flags $WFLAGS_WARN) - WFLAGS_WARNALL=$(allowed_gfortran_flags $WFLAGS_WARNALL) -else - WFLAGS_ERROR="" - WFLAGS_WARN="" - WFLAGS_WARNALL="" -fi - -# check if ieee_exeptions module is available for the current version -# of gfortran being used -if ! (check_gfortran_module ieee_exceptions); then - IEEE_EXCEPTIONS_DFLAGS="" -fi - -# concatenate the above flags into WFLAGS, FCDEBFLAGS, DFLAGS and -# finally into FCFLAGS and CFLAGS -WFLAGS="$WFLAGS_ERROR $WFLAGS_WARN IF_WARNALL(${WFLAGS_WARNALL}|)" -FCDEBFLAGS="$FCDEB_FLAGS IF_DEBUG($FCDEB_FLAGS_DEBUG|)" -DFLAGS="${CP_DFLAGS} IF_DEBUG($IEEE_EXCEPTIONS_DFLAGS -D__CHECK_DIAG|) IF_COVERAGE($COVERAGE_DFLAGS|)" -# language independent flags -G_CFLAGS="$BASEFLAGS" -G_CFLAGS="$G_CFLAGS IF_COVERAGE($COVERAGE_FLAGS|IF_DEBUG($NOOPT_FLAGS|$OPT_FLAGS))" -G_CFLAGS="$G_CFLAGS IF_DEBUG(|$PROFOPT_FLAGS)" -G_CFLAGS="$G_CFLAGS $CP_CFLAGS" -if [ "${with_intel}" == "__DONTUSE__" ]; then - # FCFLAGS, for gfortran - FCFLAGS="$G_CFLAGS \$(FCDEBFLAGS) \$(WFLAGS) \$(DFLAGS)" - FCFLAGS+=" IF_MPI($(allowed_gfortran_flags "-fallow-argument-mismatch")|)" -else - FCFLAGS="$G_CFLAGS \$(FCDEBFLAGS) \$(WFLAGS) \$(DFLAGS)" -fi -# CFLAGS, special flags for gcc - -# TODO: Remove -Wno-vla-parameter after upgrade to gcc 11.3. -# https://gcc.gnu.org/bugzilla//show_bug.cgi?id=101289 -if [ "${with_intel}" == "__DONTUSE__" ]; then - CFLAGS="$G_CFLAGS -std=c11 -Wall -Wextra -Werror -Wno-vla-parameter -Wno-deprecated-declarations \$(DFLAGS)" -else - CXXFLAGS="IF_MPI(-cxx=${I_MPI_CXX}|) $G_CFLAGS -std=c11 -Wall \$(DFLAGS)" - CFLAGS="IF_MPI(-cc=${I_MPI_CC}|) $G_CFLAGS -std=c11 -Wall \$(DFLAGS)" - FCFLAGS="IF_MPI(-fc=${I_MPI_FC}|) $FCFLAGS -diag-disable=8291 -diag-disable=8293 -fpp -fpscomp logicals -free" -fi - -# Linker flags -# About --whole-archive see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52590 -STATIC_FLAGS="-static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive" -# Get unfortunately ignored: -static-libgcc -static-libstdc++ -static-libgfortran -LDFLAGS="IF_STATIC(${STATIC_FLAGS}|) \$(FCFLAGS) ${CP_LDFLAGS}" - -# Library flags -# add standard libs -LIBS="${CP_LIBS} -lstdc++" - -if [ "${with_intel}" == "__DONTUSE__" ]; then - CXXFLAGS+=" --std=c++14 \$(DFLAGS) -Wno-deprecated-declarations" -else - CXXFLAGS+=" ${G_CFLAGS} --std=c++14 \$(DFLAGS)" -fi -# CUDA handling -if [ "${ENABLE_CUDA}" = __TRUE__ ] && [ "${GPUVER}" != no ]; then - CUDA_LIBS="-lcudart -lnvrtc -lcuda -lcufft -lcublas -lrt IF_DEBUG(-lnvToolsExt|)" - CUDA_DFLAGS="-D__OFFLOAD_CUDA -D__DBCSR_ACC IF_DEBUG(-D__OFFLOAD_PROFILING|)" - if [ "${with_cusolvermp}" != "__DONTUSE__" ]; then - CUDA_LIBS+=" -lcusolverMp -lcusolver -lcal -lnvidia-ml" - CUDA_DFLAGS+=" -D__CUSOLVERMP" - fi - LIBS="${LIBS} IF_CUDA(${CUDA_LIBS}|)" - DFLAGS="IF_CUDA(${CUDA_DFLAGS}|) ${DFLAGS}" - NVFLAGS="-g -arch sm_${ARCH_NUM} -O3 -allow-unsupported-compiler -Xcompiler='-fopenmp -Wall -Wextra -Werror' --std=c++11 \$(DFLAGS)" - check_command nvcc "cuda" - check_lib -lcudart "cuda" - check_lib -lnvrtc "cuda" - check_lib -lcuda "cuda" - check_lib -lcufft "cuda" - check_lib -lcublas "cuda" - - # Set include flags - CUDA_FLAGS="" - add_include_from_paths CUDA_FLAGS "cuda.h" $INCLUDE_PATHS - NVFLAGS+=" ${CUDA_FLAGS}" - NVCC_TOPDIR="$(dirname $(command -v nvcc))/.." - CUDA_PATH="${CUDA_PATH:-${CUDA_HOME:-${NVCC_TOPDIR:-/CUDA_HOME-notset}}}" - CFLAGS+=" IF_CUDA(-I${CUDA_PATH}/include|)" - CXXFLAGS+=" IF_CUDA(-I${CUDA_PATH}/include|)" - - # Set LD-flags - CUDA_LDFLAGS="" - add_lib_from_paths CUDA_LDFLAGS "libcudart.*" $LIB_PATHS - add_lib_from_paths CUDA_LDFLAGS "libnvrtc.*" $LIB_PATHS - add_lib_from_paths CUDA_LDFLAGS "libcuda.*" $LIB_PATHS - add_lib_from_paths CUDA_LDFLAGS "libcufft.*" $LIB_PATHS - add_lib_from_paths CUDA_LDFLAGS "libcublas.*" $LIB_PATHS - export CUDA_LDFLAGS="${CUDA_LDFLAGS}" - LDFLAGS+=" IF_CUDA(${CUDA_LDFLAGS}|)" -fi - -# HIP handling -if [ "${ENABLE_HIP}" = __TRUE__ ] && [ "${GPUVER}" != no ]; then - check_command hipcc "hip" - check_lib -lhipblas "hip" - add_lib_from_paths HIP_LDFLAGS "libhipblas.*" $LIB_PATHS - check_lib -lhipfft "hip" - add_lib_from_paths HIP_LDFLAGS "libhipfft.*" $LIB_PATHS - - HIP_INCLUDES="-I${ROCM_PATH}/include" - case "${GPUVER}" in - Mi50) - check_lib -lamdhip64 "hip" - add_lib_from_paths HIP_LDFLAGS "libamdhip64.*" $LIB_PATHS - check_lib -lhipfft "hip" - add_lib_from_paths HIP_LDFLAGS "libhipfft.*" $LIB_PATHS - check_lib -lrocblas "hip" - add_lib_from_paths HIP_LDFLAGS "librocblas.*" $LIB_PATHS - check_lib -lroctx64 "hip" - add_lib_from_paths HIP_LDFLAGS "libroctx64.*" $LIB_PATHS - check_lib -lroctracer64 "hip" - add_lib_from_paths HIP_LDFLAGS "libroctracer64.*" $LIB_PATHS - HIP_FLAGS+="-fPIE -D__HIP_PLATFORM_AMD__ -g --offload-arch=gfx906 -O3 --std=c++11 -Wall -Wextra -Werror \$(DFLAGS)" - LIBS+=" IF_HIP(-lamdhip64 -lhipfft -lhipblas -lrocblas IF_DEBUG(-lroctx64 -lroctracer64|)|)" - DFLAGS+=" IF_HIP(-D__HIP_PLATFORM_AMD__ -D__OFFLOAD_HIP IF_DEBUG(-D__OFFLOAD_PROFILING|)|) -D__DBCSR_ACC" - CXXFLAGS+=" -fopenmp -Wall -Wextra -Werror" - ;; - Mi100) - check_lib -lamdhip64 "hip" - add_lib_from_paths HIP_LDFLAGS "libamdhip64.*" $LIB_PATHS - check_lib -lhipfft "hip" - add_lib_from_paths HIP_LDFLAGS "libhipfft.*" $LIB_PATHS - check_lib -lrocblas "hip" - add_lib_from_paths HIP_LDFLAGS "librocblas.*" $LIB_PATHS - check_lib -lroctx64 "hip" - add_lib_from_paths HIP_LDFLAGS "libroctx64.*" $LIB_PATHS - check_lib -lroctracer64 "hip" - add_lib_from_paths HIP_LDFLAGS "libroctracer64.*" $LIB_PATHS - HIP_FLAGS+="-fPIE -D__HIP_PLATFORM_AMD__ -g --offload-arch=gfx908 -O3 --std=c++11 -Wall -Wextra -Werror \$(DFLAGS)" - LIBS+=" IF_HIP(-lamdhip64 -lhipfft -lhipblas -lrocblas IF_DEBUG(-lroctx64 -lroctracer64|)|)" - DFLAGS+=" IF_HIP(-D__HIP_PLATFORM_AMD__ -D__OFFLOAD_HIP IF_DEBUG(-D__OFFLOAD_PROFILING|)|) -D__DBCSR_ACC" - CXXFLAGS+=" -fopenmp -Wall -Wextra -Werror" - ;; - Mi250) - check_lib -lamdhip64 "hip" - add_lib_from_paths HIP_LDFLAGS "libamdhip64.*" $LIB_PATHS - check_lib -lhipfft "hip" - add_lib_from_paths HIP_LDFLAGS "libhipfft.*" $LIB_PATHS - check_lib -lrocblas "hip" - add_lib_from_paths HIP_LDFLAGS "librocblas.*" $LIB_PATHS - check_lib -lroctx64 "hip" - add_lib_from_paths HIP_LDFLAGS "libroctx64.*" $LIB_PATHS - check_lib -lroctracer64 "hip" - add_lib_from_paths HIP_LDFLAGS "libroctracer64.*" $LIB_PATHS - HIP_FLAGS+="-fPIE -D__HIP_PLATFORM_AMD__ -g --offload-arch=gfx90a -O3 --std=c++11 -Wall -Wextra -Werror \$(DFLAGS)" - LIBS+=" IF_HIP(-lamdhip64 -lhipfft -lhipblas -lrocblas IF_DEBUG(-lroctx64 -lroctracer64|)|)" - DFLAGS+=" IF_HIP(-D__HIP_PLATFORM_AMD__ -D__OFFLOAD_HIP IF_DEBUG(-D__OFFLOAD_PROFILING|)|) -D__DBCSR_ACC" - CXXFLAGS+=" -fopenmp -Wall -Wextra -Werror" - ;; - *) - check_command nvcc "cuda" - check_lib -lcudart "cuda" - check_lib -lnvrtc "cuda" - check_lib -lcuda "cuda" - check_lib -lcufft "cuda" - check_lib -lcublas "cuda" - DFLAGS+=" IF_HIP(-D__HIP_PLATFORM_NVIDIA__ -D__HIP_PLATFORM_NVCC__ -D__OFFLOAD_HIP |) -D__DBCSR_ACC" - HIP_FLAGS+=" -g -arch sm_${ARCH_NUM} -O3 -Xcompiler='-fopenmp -Wall -Wextra -Werror' --std=c++11 \$(DFLAGS)" - add_include_from_paths CUDA_CFLAGS "cuda.h" $INCLUDE_PATHS - HIP_INCLUDES+=" -I${CUDA_PATH:-${CUDA_HOME:-/CUDA_HOME-notset}}/include" - # GCC issues lots of warnings for hip/nvidia_detail/hip_runtime_api.h - CFLAGS+=" -Wno-error ${CUDA_CFLAGS}" - CXXFLAGS+=" -Wno-error ${CUDA_CFLAGS}" - # Set LD-flags - # Multiple definition because of hip/include/hip/nvidia_detail/nvidia_hiprtc.h - LDFLAGS+=" -Wl,--allow-multiple-definition" - LIBS+=" -lhipfft -lhipblas -lhipfft -lnvrtc -lcudart -lcufft -lcublas -lcuda" - add_lib_from_paths HIP_LDFLAGS "libcudart.*" $LIB_PATHS - add_lib_from_paths HIP_LDFLAGS "libnvrtc.*" $LIB_PATHS - add_lib_from_paths HIP_LDFLAGS "libcuda.*" $LIB_PATHS - add_lib_from_paths HIP_LDFLAGS "libcufft.*" $LIB_PATHS - add_lib_from_paths HIP_LDFLAGS "libcublas.*" $LIB_PATHS - ;; - esac - - LDFLAGS+=" ${HIP_LDFLAGS}" - CFLAGS+=" ${HIP_INCLUDES}" - CXXFLAGS+=" ${HIP_INCLUDES}" -fi - -# OpenCL handling (GPUVER is not a prerequisite) -if [ "${ENABLE_OPENCL}" = __TRUE__ ]; then - OPENCL_DFLAGS="-D__DBCSR_ACC" - # avoid duplicating FLAGS - if [[ "${GPUVER}" == no || ("${ENABLE_CUDA}" != __TRUE__ && "${ENABLE_HIP}" != __TRUE__) ]]; then - OPENCL_FLAGS="${CFLAGS} ${OPENCL_DFLAGS} ${DFLAGS}" - DFLAGS="IF_OPENCL(${OPENCL_DFLAGS} ${DFLAGS}|)" - # Set include flags - OPENCL_INCLUDES="" - add_include_from_paths -p OPENCL_INCLUDES "CL" $INCLUDE_PATHS - if [ -e "${OPENCL_INCLUDES}/CL/cl.h" ]; then - OPENCL_FLAGS+=" ${OPENCL_INCLUDES}" - fi - fi - # Append OpenCL library to LIBS - LIBOPENCL=$(ldconfig -p 2> /dev/null | grep -m1 OpenCL | rev | cut -d' ' -f1 | rev) - if [ -e "${LIBOPENCL}" ]; then - echo "Found library ${LIBOPENCL}" - LIBS+=" IF_OPENCL(${LIBOPENCL}|)" - else - LIBS+=" IF_OPENCL(-lOpenCL|)" - fi -fi - -# ------------------------- -# generate the arch files -# ------------------------- - -# generator for ABACUS ARCH files -gen_arch_file() { - # usage: gen_arch_file file_name flags - # - # If the flags are present they are assumed to be on, otherwise - # they switched off - require_env ARCH_FILE_TEMPLATE - local __filename=$1 - shift - local __flags=$@ - local __full_flag_list="MPI DEBUG CUDA WARNALL COVERAGE" - local __flag="" - for __flag in $__full_flag_list; do - eval "local __${__flag}=off" - done - for __flag in $__flags; do - eval "__${__flag}=on" - done - # generate initial arch file - cat $ARCH_FILE_TEMPLATE > $__filename - # add additional parts - if [ "$__CUDA" = "on" ]; then - cat << EOF >> $__filename -# -GPUVER = \${GPUVER} -OFFLOAD_CC = \${NVCC} -OFFLOAD_FLAGS = \${NVFLAGS} -OFFLOAD_TARGET = cuda -EOF - fi - - if [ "$__HIP" = "on" ]; then - cat << EOF >> $__filename -# -GPUVER = \${GPUVER} -OFFLOAD_CC = \${ROCM_PATH}/hip/bin/hipcc -OFFLOAD_FLAGS = \${HIP_FLAGS} \${HIP_INCLUDES} -OFFLOAD_TARGET = hip -EOF - fi - - if [ "$__OPENCL" = "on" ]; then - cat << EOF >> $__filename -# -override DBCSR_USE_ACCEL = opencl -EOF - if [ "${OPENCL_FLAGS}" ]; then - cat << EOF >> $__filename -OFFLOAD_FLAGS = \${OPENCL_FLAGS} -EOF - fi - fi - - if [ "$__WARNALL" = "on" ]; then - cat << EOF >> $__filename -# -SHELL := bash -FC := set -o pipefail && \\\${FC} -CC := set -o pipefail && \\\${CC} -CXX := set -o pipefail && \\\${CXX} -LD := set -o pipefail && \\\${LD} -FCLOGPIPE = 2>&1 | tee \\\$(notdir \\\$<).warn -EOF - fi - if [ "$with_gcc" != "__DONTUSE__" ]; then - cat << EOF >> $__filename -# -FYPPFLAGS = -n --line-marker-format=gfortran5 -EOF - fi - if [ "${with_intel}" != "__DONTUSE__" ]; then - cat << EOF >> $__filename -# -# Required due to memory leak that occurs if high optimisations are used -mp2_optimize_ri_basis.o: mp2_optimize_ri_basis.F - \\\$(FC) -c \\\$(subst -O2,-O0,\\\$(FCFLAGS)) \\\$< -# Required due to SEGFAULTS occurring for higher optimisation levels -paw_basis_types.o: paw_basis_types.F - \\\$(FC) -c \\\$(subst -O2,-O1,\\\$(FCFLAGS)) \\\$< -# Reduce compilation time -hfx_contraction_methods.o: hfx_contraction_methods.F - \\\$(FC) -c \\\$(subst -O2,-O1,\\\$(FCFLAGS)) \\\$< -EOF - fi - # replace variable values in output file using eval - local __TMPL=$(cat $__filename) - eval "printf \"${__TMPL}\n\"" > $__filename - # pass this to parsers to replace all of the IF_XYZ statements - "${SCRIPTDIR}/parse_if.py" -i -f "${__filename}" $__flags - echo "Wrote ${INSTALLDIR}/arch/$__filename" -} - -rm -f ${INSTALLDIR}/arch/local* -# normal production arch files -if [ "${with_intel}" != "__DONTUSE__" ]; then - gen_arch_file "local.ssmp" - gen_arch_file "local.sdbg" DEBUG -else - gen_arch_file "local.ssmp" - gen_arch_file "local_static.ssmp" STATIC - gen_arch_file "local.sdbg" DEBUG - gen_arch_file "local_asan.ssmp" ASAN - gen_arch_file "local_coverage.sdbg" COVERAGE -fi -arch_vers="ssmp sdbg" - -if [ "$MPI_MODE" != no ]; then - if [ "${with_intel}" != "__DONTUSE__" ]; then - gen_arch_file "local.psmp" MPI - gen_arch_file "local.pdbg" MPI DEBUG - else - gen_arch_file "local.psmp" MPI - gen_arch_file "local.pdbg" MPI DEBUG - gen_arch_file "local_asan.psmp" MPI ASAN - gen_arch_file "local_static.psmp" MPI STATIC - gen_arch_file "local_warn.psmp" MPI WARNALL - gen_arch_file "local_coverage.pdbg" MPI COVERAGE - fi - arch_vers="${arch_vers} psmp pdbg" -fi - -# opencl enabled arch files -if [ "$ENABLE_OPENCL" = __TRUE__ ]; then - gen_arch_file "local_opencl.ssmp" OPENCL - gen_arch_file "local_opencl.sdbg" OPENCL DEBUG - if [ "$MPI_MODE" != no ]; then - gen_arch_file "local_opencl.psmp" OPENCL MPI - gen_arch_file "local_opencl.pdbg" OPENCL MPI DEBUG - gen_arch_file "local_opencl_warn.psmp" OPENCL MPI WARNALL - gen_arch_file "local_coverage_opencl.pdbg" OPENCL MPI COVERAGE - fi - DBCSR_OPENCL=OPENCL -fi - -# cuda enabled arch files -if [ "$ENABLE_CUDA" = __TRUE__ ]; then - gen_arch_file "local_cuda.ssmp" CUDA ${DBCSR_OPENCL} - gen_arch_file "local_cuda.sdbg" CUDA ${DBCSR_OPENCL} DEBUG - if [ "$MPI_MODE" != no ]; then - gen_arch_file "local_cuda.psmp" CUDA ${DBCSR_OPENCL} MPI - gen_arch_file "local_cuda.pdbg" CUDA ${DBCSR_OPENCL} MPI DEBUG - gen_arch_file "local_cuda_warn.psmp" CUDA ${DBCSR_OPENCL} MPI WARNALL - gen_arch_file "local_coverage_cuda.pdbg" CUDA ${DBCSR_OPENCL} MPI COVERAGE - fi -fi - -# hip enabled arch files -if [ "$ENABLE_HIP" = __TRUE__ ]; then - gen_arch_file "local_hip.ssmp" HIP - gen_arch_file "local_hip.sdbg" HIP DEBUG - if [ "$MPI_MODE" != no ]; then - gen_arch_file "local_hip.psmp" HIP MPI - gen_arch_file "local_hip.pdbg" HIP MPI DEBUG - gen_arch_file "local_hip_warn.psmp" HIP MPI WARNALL - gen_arch_file "local_coverage_hip.pdbg" HIP MPI COVERAGE - fi -fi - -cd "${ROOTDIR}" - -# ------------------------- -# print out user instructions -# ------------------------- - -cat << EOF -========================== usage ========================= -Done! -Now copy: - cp ${INSTALLDIR}/arch/* to the ABACUS/arch/ directory -To use the installed tools and libraries and ABACUS version -compiled with it you will first need to execute at the prompt: - source ${SETUPFILE} -To build ABACUS you should change directory: - cd ABACUS/ - make -j $(get_nprocs) ARCH=local VERSION="${arch_vers}" - -arch files for GPU enabled CUDA versions are named "local_cuda.*" -arch files for GPU enabled HIP versions are named "local_hip.*" -arch files for OpenCL (GPU) versions are named "local_opencl.*" -arch files for coverage versions are named "local_coverage.*" - -Note that these pre-built arch files are for the GNU compiler, users have to adapt them for other compilers. -It is possible to use the provided ABACUS arch files as guidance. -EOF - -#EOF