From 4b31a92be60ceadef068c87b13611f735f1b13eb Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Wed, 24 May 2023 19:10:22 +0200 Subject: [PATCH 01/25] Implement approximate average local potential --- slateratom/lib/CMakeLists.txt | 1 + slateratom/lib/avgpot.f90 | 450 ++++++++++++++++++++++++++++++++++ slateratom/lib/globals.f90 | 8 + slateratom/lib/output.f90 | 40 ++- slateratom/lib/utilities.f90 | 77 ++++++ slateratom/prog/main.f90 | 16 +- 6 files changed, 590 insertions(+), 2 deletions(-) create mode 100644 slateratom/lib/avgpot.f90 diff --git a/slateratom/lib/CMakeLists.txt b/slateratom/lib/CMakeLists.txt index fd7dc432..df11f24f 100644 --- a/slateratom/lib/CMakeLists.txt +++ b/slateratom/lib/CMakeLists.txt @@ -1,4 +1,5 @@ set(sources-f90 + avgpot.f90 broyden.f90 core_overlap.f90 coulomb_hfex.f90 diff --git a/slateratom/lib/avgpot.f90 b/slateratom/lib/avgpot.f90 new file mode 100644 index 00000000..dba95332 --- /dev/null +++ b/slateratom/lib/avgpot.f90 @@ -0,0 +1,450 @@ +!> Module to calculate the approximate average potential and effective orbital energies proposed in: +!! Baer R, Livshits E, Salzner U. Tuned range-separated hybrids in density functional theory. +!! Annual review of physical chemistry. 2010 May 5;61:85-109. +module average_potential + + use common_accuracy, only : dp, mc + use common_constants, only : pi + use common_message, only : error + + use utilities, only : index_heap_sort + use density, only : wavefunction, wavefunction_1st, wavefunction_2nd + + implicit none + private + + public :: getAveragePotential + + +contains + + + !> Tries to infer the energy of the highest occupied atomic orbital (HOAO) and the associated + !! principal and angular quantum number from the eigenvalues and occupations handed over. + !! + !! The effort made here would be an argument for moving this functionality to the sktools + !! sometime in the future. + subroutine getHoaoOrLowestNl(eigval, occ, max_l, num_alpha, poly_order, hoaoN, hoaoL, eHoao) + + !> Eigenvalues of selected spin-channel + real(dp), intent(in) :: eigval(0:, :) + + !> Occupation numbers of selected spin-channel + real(dp), intent(in) :: occ(0:, :) + + !> Maximum angular momentum + integer, intent(in) :: max_l + + !> Number of exponents in each shell + integer, intent(in) :: num_alpha(0:) + + !> Highest polynomial order + l in each shell + integer, intent(in) :: poly_order(0:) + + !> Principal and angular quantum number of HOAO eigenvalue + integer, intent(out) :: hoaoN, hoaoL + + !> Energy of highest occupied atomic orbital + real(dp), intent(out) :: eHoao + + !! Flattened, one-dimensional versions of occupations and eigenvalues + real(dp), allocatable :: occFlat(:), eigvalFlat(:) + + !! Index array that sorts the flattened eigenvalues + integer, allocatable :: eigvalFlatSortInds(:) + + !! True, if all occupations of current spin channel are below threshold + logical :: isUnoccupied + + !! Auxiliary variables + integer :: ll, nn, iDummy1, iDummy2, iHoao, ii, ind + + eigvalFlat = reshape(eigval, [size(eigval)]) + occFlat = reshape(occ, [size(occ)]) + + allocate(eigvalFlatSortInds(size(eigvalFlat))) + call index_heap_sort(eigvalFlatSortInds, eigvalFlat) + + ! reverse order, since we would like to iterate over the eigenvalues from unoccupied to occupied + eigvalFlatSortInds(:) = eigvalFlatSortInds(size(eigvalFlatSortInds):1:-1) + + isUnoccupied = all(occFlat < 1.0e-08_dp) + + if (isUnoccupied) then + iHoao = eigvalFlatSortInds(1) + else + lpIndx: do ii = 1, size(eigvalFlatSortInds) + ind = eigvalFlatSortInds(ii) + if (occFlat(ind) >= 1.0e-08_dp) then + iHoao = ind + exit lpIndx + end if + end do lpIndx + end if + + eHoao = eigvalFlat(iHoao) + + lpAng: do ll = 0, max_l + nn = 0 + do iDummy1 = 1, num_alpha(ll) + do iDummy2 = 1, poly_order(ll) + nn = nn + 1 + + if (abs(eigval(ll, nn) - eHoao) < 1e-10_dp) then + hoaoN = nn + hoaoL = ll + exit lpAng + end if + + end do + end do + end do lpAng + + end subroutine getHoaoOrLowestNl + + + !> Determines an approximate, average, local potential and associated effective orbital energies + !! by minimizing the deviance from local Schrödinger equations. + !! + !! See the following reference for full details: + !! + !! Roi Baer, Ester Livshits, and Ulrike Salzner. + !! “Tuned Range-Separated Hybrids in Density Functional Theory”. + !! In: Annu. Rev. Phys. Chem. 61.1 (2010), pp. 85–109. + !! DOI: 10.1146/annurev.physchem.012809.103321 + subroutine getAveragePotential(cof, eigval, occ, abcissa, weights, max_l, num_alpha, alpha,& + & poly_order, problemsize, scftol, maxiter, avgPot, kinetic_energy_ref) + + !> wavefunction coefficients + real(dp), intent(in) :: cof(:, 0:, :,:) + + !> eigenvalues + real(dp), intent(in) :: eigval(:, 0:, :) + + !> occupation numbers + real(dp), intent(in) :: occ(:, 0:, :) + + !> numerical integration abcissas + real(dp), intent(in) :: abcissa(:) + + !> numerical integration weights + real(dp), intent(in) :: weights(:) + + !> maximum angular momentum + integer, intent(in) :: max_l + + !> number of exponents in each shell + integer, intent(in) :: num_alpha(0:) + + !> basis exponents + real(dp), intent(in) :: alpha(0:,:) + + !> highest polynomial order + l in each shell + integer, intent(in) :: poly_order(0:) + + !> maximum size of the eigenproblem + integer, intent(in) :: problemsize + + !> Tolerance for self-consistency + real(dp), intent(in) :: scftol + + !> Maximum number of self-consistency iterations + integer, intent(in) :: maxiter + + !> Average local, effective potential + real(dp), intent(out) :: avgPot(:,:) + + !> Reference kinetic energy + real(dp), intent(in), optional :: kinetic_energy_ref + + !! HOAO shift required to resolve the ambiguity caused by the common constant + real(dp) :: hoaoShift(2) + + !! Maximum change in effective orbital energies + real(dp) :: change_max + + !! Wave function and 2nd derivative + real(dp), allocatable :: rad(:,:,:,:), radp(:,:,:,:), radpp(:,:,:,:) + + !! Effective orbital energies of current and previous SC iteration + real(dp), allocatable :: eps(:,:,:), epsLast(:,:,:) + + !! Electron density + real(dp), allocatable :: rho(:,:) + + !! Self-consitent iteration + integer :: iSC + + !! Iterates over radial grid points + integer :: iRad + + !! Principal quantum number + integer :: nn + + !! Angular quantum number + integer :: ll + + !! Dummy loop indices + integer :: iDummy1, iDummy2 + + !! Number of radial integration points + integer :: nRadial + + !! Principal and angular quantum number of HOAO + integer :: hoaoN(2), hoaoL(2) + + !! HOAO eigenvalues + real(dp) :: eHoao(2) + + !! Spin index and number of spin channels + integer :: iSpin, nSpin + + !! True, if SC loop reached convergency + logical :: tConverged + + !! Number of electrons by integrating up density + real(dp) :: electron_number + + !! Kinetic energy is evaluated with quantities from this module + real(dp) :: kinetic_energy + + tConverged = .false. + + nRadial = size(abcissa) + nSpin = size(occ, dim=1) + + do iSpin = 1, nSpin + call getHoaoOrLowestNl(eigval(iSpin, 0:, :), occ(iSpin, 0:, :), max_l, num_alpha,& + & poly_order, hoaoN(iSpin), hoaoL(iSpin), eHoao(iSpin)) + end do + + allocate(rad(nRadial, problemsize, 0:max_l, nSpin), source=0.0_dp) + allocate(radp(nRadial, problemsize, 0:max_l, nSpin), source=0.0_dp) + allocate(radpp(nRadial, problemsize, 0:max_l, nSpin), source=0.0_dp) + + allocate(eps, mold=eigval) + eps(:, 0:, :) = 0.0_dp + allocate(epsLast, mold=eigval) + epsLast(:, 0:, :) = 0.0_dp + + allocate(rho(nRadial, nSpin), source=0.0_dp) + + ! Build radial orbitals on Becke's Gauss-Chebyschev mesh + do iSpin = 1, nSpin + do ll = 0, max_l + nn = 0 + do iDummy1 = 1, num_alpha(ll) + do iDummy2 = 1, poly_order(ll) + nn = nn + 1 + + do iRad = 1, nRadial + rad(iRad, nn, ll, iSpin) = wavefunction(cof(iSpin, ll, :, nn), alpha, num_alpha,& + & poly_order, ll, abcissa(iRad)) + radp(iRad, nn, ll, iSpin) = wavefunction_1st(cof(iSpin, ll, :, nn), alpha, num_alpha,& + & poly_order, ll, abcissa(iRad)) + radpp(iRad, nn, ll, iSpin) = wavefunction_2nd(cof(iSpin, ll, :, nn), alpha,& + & num_alpha, poly_order, ll, abcissa(iRad)) + end do + + ! Electron density as occupation-weighted absolute squares of the orbitals + rho(:, iSpin) = rho(:, iSpin) + occ(iSpin, ll, nn) * rad(:, nn, ll, iSpin)**2 + + end do + end do + end do + end do + + ! Check if established density integrates up to the correct number of electrons + electron_number = sum(weights * (rho(:, 1) + rho(:, 2)) * abcissa**2) + if (abs(sum(occ) - electron_number) > 1.0e-08_dp) then + call error("Average-potential: Mismatch in number of electrons.") + end if + + ! Optionally check if the original kinetic energy is reproduced by the local quantities + if (present(kinetic_energy_ref)) then + kinetic_energy = getKineticEnergy(occ, abcissa, weights, max_l, num_alpha, poly_order, rad,& + & radp, radpp) + if (abs(kinetic_energy - kinetic_energy_ref) > 1.0e-06_dp) then + call error("Average-potential: Mismatch in kinetic energy.") + end if + end if + + ! As an initial guess for the effective orbital energies we may just use the eigenvalues from + ! the converged GKS calculation: + eps(:, 0:, :) = eigval(:, 0:, :) + epsLast(:, 0:, :) = eps(:, 0:, :) + + ! Start self-consistency iterations + lpSC: do iSC = 1, maxiter + + ! Build average potential + avgPot(:,:) = 0.0_dp + do iSpin = 1, nSpin + do ll = 0, max_l + nn = 0 + do iDummy1 = 1, num_alpha(ll) + do iDummy2 = 1, poly_order(ll) + nn = nn + 1 + + ! uses +laplace / 2 + avgPot(:, iSpin) = avgPot(:, iSpin) + occ(iSpin, ll, nn)& + & * (epsLast(iSpin, ll, nn) * rad(:, nn, ll, iSpin)**2& + & + rad(:, nn, ll, iSpin) * (0.5_dp * radpp(:, nn, ll, iSpin)& + & + radp(:, nn, ll, iSpin) / abcissa - 0.5_dp * ll * (ll + 1) / abcissa**2& + & * rad(:, nn, ll, iSpin))) + end do + end do + end do + end do + + ! Divide by the density, but try to avoid singular terms + do iSpin = 1, nSpin + where (rho(:, iSpin) > 0.0_dp) + avgPot(:, iSpin) = avgPot(:, iSpin) / rho(:, iSpin) + end where + end do + + ! Build effective orbital energies + do iSpin = 1, nSpin + do ll = 0, max_l + nn = 0 + do iDummy1 = 1, num_alpha(ll) + do iDummy2 = 1, poly_order(ll) + nn = nn + 1 + ! uses -laplace / 2 + eps(iSpin, ll, nn)& + & = sum(weights * abcissa**2 * (rad(:, nn, ll, iSpin) * (-0.5_dp& + & * radpp(:, nn, ll, iSpin) - radp(:, nn, ll, iSpin) / abcissa& + & + 0.5_dp * ll * (ll + 1) / abcissa**2 * rad(:, nn, ll, iSpin)& + & + avgPot(:, iSpin) * rad(:, nn, ll, iSpin)))) + end do + end do + end do + end do + + ! Shift current effective orbital energies so that HOAO agrees with GKS calculation + do iSpin = 1, nSpin + hoaoShift(iSpin) = eHoao(iSpin) - eps(iSpin, hoaoL(iSpin), hoaoN(iSpin)) + do ll = 0, max_l + nn = 0 + do iDummy1 = 1, num_alpha(ll) + do iDummy2 = 1, poly_order(ll) + nn = nn + 1 + eps(iSpin, ll, nn) = eps(iSpin, ll, nn) + hoaoShift(iSpin) + end do + end do + end do + end do + + ! Probe convergence + change_max = 0.0_dp + do iSpin = 1, nSpin + do ll = 0, max_l + nn = 0 + do iDummy1 = 1, num_alpha(ll) + do iDummy2 = 1, poly_order(ll) + nn = nn + 1 + change_max = max(change_max, abs(eps(iSpin, ll, nn) - epsLast(iSpin, ll, nn))) + end do + end do + end do + end do + + tConverged = change_max <= scftol + + ! If self-consistency is reached, exit loop + if (tConverged) exit lpSC + + do iSpin = 1, nSpin + do ll = 0, max_l + nn = 0 + do iDummy1 = 1, num_alpha(ll) + do iDummy2 = 1, poly_order(ll) + nn = nn + 1 + epsLast(iSpin, ll, nn) = eps(iSpin, ll, nn) + end do + end do + end do + end do + + end do lpSC + + ! Handle non-converged calculations + if (.not. tConverged) then + call error('Average potential NOT converged, maximal SC iterations exceeded.') + end if + + ! Clean up and deal with numerical instability + do iSpin = 1, nSpin + where (abs(rho(:, iSpin)) < 1.0e-20_dp) + avgPot(:, iSpin) = 0.0_dp + end where + end do + + end subroutine getAveragePotential + + + !> Calculates the kinetic energy contribution based on the properties present in the average + !! potential module. The result should always match the one obtained from the kinetic supervector. + !! While this calculation is not strictly required, it is an important sanity-check. + pure function getKineticEnergy(occ, abcissa, weights, max_l, num_alpha, poly_order, rad, radp,& + & radpp) result(kinetic_energy) + + !> Occupation numbers + real(dp), intent(in) :: occ(:, 0:, :) + + !> Numerical integration abcissas + real(dp), intent(in) :: abcissa(:) + + !> Numerical integration weights + real(dp), intent(in) :: weights(:) + + !> Maximum angular momentum + integer, intent(in) :: max_l + + !> Number of exponents in each shell + integer, intent(in) :: num_alpha(0:) + + !> Highest polynomial order + l in each shell + integer, intent(in) :: poly_order(0:) + + !! Wave function, 1st and 2nd derivative + real(dp), intent(in) :: rad(:,:, 0:, :), radp(:,:, 0:, :), radpp(:,:, 0: ,:) + + !> Kinetic energy + real(dp) :: kinetic_energy + + !! Spin index and number of spin channels + integer :: iSpin, nSpin + + !! Principal quantum number + integer :: nn + + !! Angular quantum number + integer :: ll + + !! Dummy loop indices + integer :: iDummy1, iDummy2 + + nSpin = size(occ, dim=1) + + kinetic_energy = 0.0_dp + + do iSpin = 1, nSpin + do ll = 0, max_l + nn = 0 + do iDummy1 = 1, num_alpha(ll) + do iDummy2 = 1, poly_order(ll) + nn = nn + 1 + kinetic_energy = kinetic_energy& + & + occ(iSpin, ll, nn) * sum(weights * (rad(:, nn, ll, iSpin) * (-0.5_dp& + & * radpp(:, nn, ll, iSpin) - radp(:, nn, ll, iSpin) / abcissa& + & + 0.5_dp * ll * (ll + 1) / abcissa**2 * rad(:, nn, ll, iSpin))) * abcissa**2) + end do + end do + end do + end do + + end function getKineticEnergy + +end module average_potential diff --git a/slateratom/lib/globals.f90 b/slateratom/lib/globals.f90 index acd2970c..1e18142a 100644 --- a/slateratom/lib/globals.f90 +++ b/slateratom/lib/globals.f90 @@ -152,6 +152,9 @@ module globals !> exc energy density on grid real(dp), allocatable :: exc(:) + !> average local, effective potential + real(dp), allocatable :: avgPot(:,:) + !> generate alphas automatically logical :: tAutoAlphas @@ -167,6 +170,9 @@ module globals !> true, if Broyden mixing is desired, otherwise simple mixing is applied logical :: tBroyden + !> true, if average local, effective potential should be calculated + logical :: tAvgPot + !> mixing factor real(dp) :: mixing_factor @@ -231,6 +237,8 @@ subroutine allocate_globals() cof(:,:,:,:) = 0.0_dp pp(:,:,:,:) = 0.0_dp + if (tAvgPot) allocate(avgPot(num_mesh_points, 2), source=0.0_dp) + end subroutine allocate_globals end module globals diff --git a/slateratom/lib/output.f90 b/slateratom/lib/output.f90 index e05c5360..31affd5e 100644 --- a/slateratom/lib/output.f90 +++ b/slateratom/lib/output.f90 @@ -1,7 +1,7 @@ !> Module that provides basic routines to write out various results. module output - use common_accuracy, only : dp + use common_accuracy, only : dp, mc use common_constants, only : pi use core_overlap, only : moments use density, only : wavefunction, wavefunction_1st, wavefunction_2nd, density_at_point,& @@ -17,6 +17,7 @@ module output public :: write_potentials_file_standard, write_densities_file_standard public :: write_waves_file_standard, cusp_values, write_energies_tagged public :: write_wave_coeffs_file + public :: writeAveragePotential character(len=1), parameter :: orbnames(0:4) = ["s", "p", "d", "f", "g"] @@ -408,6 +409,43 @@ subroutine write_waves_file_standard(num_mesh_points, abcissa, weight, alpha, nu end subroutine write_waves_file_standard + !> Writes average potential to disk. + subroutine writeAveragePotential(abcissa, avgPot) + + !> Numerical integration abcissas + real(dp), intent(in) :: abcissa(:) + + !! Average local, effective potential + real(dp), intent(in) :: avgPot(:,:) + + !! Number of numerical integration points + integer :: num_mesh_points + + !! Iterates over radial grid points + integer :: iRad + + !! File name and identifier + character(mc) :: fname + integer :: fp + + fname = "avgpot.dat" + num_mesh_points = size(abcissa) + + open(newunit=fp, file=fname, status="replace", action="write") + + write(fp, "(A)") "# 1st line: number of mesh points" + write(fp, "(A)") "# abcissa avgpot_up avgpot_down" + write(fp, "(I0)") num_mesh_points + + do iRad = 1, size(avgPot, dim=1) + write(fp, "(3ES21.12E3)") abcissa(iRad), avgPot(iRad, 1), avgPot(iRad, 2) + end do + + close(fp) + + end subroutine writeAveragePotential + + subroutine cusp_values(max_l, cof, p, alpha, num_alpha, poly_order) integer, intent(in) :: max_l, num_alpha(0:), poly_order(0:) diff --git a/slateratom/lib/utilities.f90 b/slateratom/lib/utilities.f90 index 1b1f8a66..b73b37a4 100644 --- a/slateratom/lib/utilities.f90 +++ b/slateratom/lib/utilities.f90 @@ -8,6 +8,13 @@ module utilities public :: check_convergence, check_electron_number public :: vector_length, fak, zeroOutCpotOfEmptyDensitySpinChannels + public :: index_heap_sort + + + !> Heap sort returning an index array. + interface index_heap_sort + module procedure index_heap_sort_real + end interface contains @@ -182,4 +189,74 @@ pure function fak(nn) end function fak + + !> Real case heap sort returning an index array. + !> based on Numerical Recipes Software 1986-92 + subroutine index_heap_sort_real(indx, array, tolerance) + + !> Indexing array on return + integer, intent(out) :: indx(:) + + !> Array of values to be sorted + real(dp), intent(in) :: array(:) + + !> Tolerance for equality of two elements + real(dp), intent(in), optional :: tolerance + + integer :: nn, ir, ij, il, ii, ik + integer :: indxTmp + real(dp) :: arrayTmp, tol + + if (present(tolerance)) then + tol = tolerance + else + tol = epsilon(0.0_dp) + end if + + do ii = 1, size(indx) + indx(ii) = ii + end do + + nn = size(array) + + if (nn <= 1) return + il = nn / 2 + 1 + ir = nn + ik = 1 + do while (ik == 1) + if (il .gt. 1) then + il = il - 1 + indxTmp = indx(il) + arrayTmp = array(indxTmp) + else + indxTmp = indx(ir) + arrayTmp = array(indxTmp) + indx(ir) = indx(1) + ir = ir - 1 + if (ir .lt. 1) then + indx(1) = indxTmp + return + end if + end if + ii = il + ij = 2 * il + do while (ij <= ir) + if (ij < ir) then + if (array(indx(ij)) < array(indx(ij+1)) - tol) then + ij = ij + 1 + end if + end if + if(arrayTmp < array(indx(ij)) - tol) then + indx(ii) = indx(ij) + ii = ij + ij = 2 * ij + else + ij = ir + 1 + end if + end do + indx(ii) = indxTmp + end do + + end subroutine index_heap_sort_real + end module utilities diff --git a/slateratom/prog/main.f90 b/slateratom/prog/main.f90 index 8a19b087..440110f8 100644 --- a/slateratom/prog/main.f90 +++ b/slateratom/prog/main.f90 @@ -11,7 +11,7 @@ program HFAtom use diagonalizations, only : diagonalize, diagonalize_overlap use output, only : write_eigvec, write_eigval, write_moments, write_energies,& & write_energies_tagged, write_potentials_file_standard, write_densities_file_standard,& - & write_waves_file_standard, write_wave_coeffs_file, cusp_values + & write_waves_file_standard, write_wave_coeffs_file, cusp_values, writeAveragePotential use totalenergy, only : getTotalEnergy, getTotalEnergyZora use dft, only : check_accuracy, dft_start_pot, density_grid use utilities, only : check_electron_number, check_convergence @@ -19,6 +19,7 @@ program HFAtom use cmdargs, only : parse_command_arguments use common_poisson, only : TBeckeGridParams use xcfunctionals, only : xcFunctional + use average_potential, only : getAveragePotential use globals implicit none @@ -42,9 +43,15 @@ program HFAtom !! CAM beta parameter real(dp) :: camBeta + !! Kinetic energy reference for average potential calculation + real(dp), allocatable :: kinetic_energy_ref + !! holds parameters, defining a Becke integration grid type(TBeckeGridParams) :: grid_params + ! deactivate average potential calculation for now + tAvgPot = .false. + call parse_command_arguments() call read_input_1(nuc, max_l, occ_shells, maxiter, scftol, poly_order, min_alpha, max_alpha,& & num_alpha, tAutoAlphas, alpha, conf_r0, conf_power, num_occ, num_power, num_alphas, xcnr,& @@ -227,4 +234,11 @@ program HFAtom call write_wave_coeffs_file(max_l, num_alpha, poly_order, cof, alpha, occ, qnvalorbs) + if (tAvgPot) then + if (.not. tZora) kinetic_energy_ref = kinetic_energy + call getAveragePotential(cof, eigval, occ, abcissa, weight, max_l, num_alpha, alpha,& + & poly_order, problemsize, scftol, maxiter, avgPot, kinetic_energy_ref=kinetic_energy_ref) + call writeAveragePotential(abcissa, avgPot) + end if + end program HFAtom From 48fbc0e2261ec10dd7dc6478eb5e84c07ff04fcd Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Mon, 10 Jul 2023 12:06:17 +0200 Subject: [PATCH 02/25] Apply feedback of code review --- slateratom/lib/avgpot.f90 | 102 ++++++++++++++--------------------- slateratom/lib/globals.f90 | 6 +-- slateratom/lib/output.f90 | 2 +- slateratom/lib/utilities.f90 | 77 -------------------------- slateratom/prog/main.f90 | 4 +- 5 files changed, 46 insertions(+), 145 deletions(-) diff --git a/slateratom/lib/avgpot.f90 b/slateratom/lib/avgpot.f90 index dba95332..6ec7ab66 100644 --- a/slateratom/lib/avgpot.f90 +++ b/slateratom/lib/avgpot.f90 @@ -1,13 +1,14 @@ -!> Module to calculate the approximate average potential and effective orbital energies proposed in: -!! Baer R, Livshits E, Salzner U. Tuned range-separated hybrids in density functional theory. -!! Annual review of physical chemistry. 2010 May 5;61:85-109. +!> Module to calculate the approximate average potential and effective orbital energies as proposed +!! in: +!! Baer R, Livshits E, Salzner U. “Tuned Range-Separated Hybrids in Density Functional Theory”. +!! In: Annu. Rev. Phys. Chem. 61.1 (2010), pp. 85–109. +!! DOI: 10.1146/annurev.physchem.012809.103321 module average_potential - use common_accuracy, only : dp, mc + use common_accuracy, only : rsp, dp, mc use common_constants, only : pi use common_message, only : error - use utilities, only : index_heap_sort use density, only : wavefunction, wavefunction_1st, wavefunction_2nd implicit none @@ -18,12 +19,8 @@ module average_potential contains - !> Tries to infer the energy of the highest occupied atomic orbital (HOAO) and the associated !! principal and angular quantum number from the eigenvalues and occupations handed over. - !! - !! The effort made here would be an argument for moving this functionality to the sktools - !! sometime in the future. subroutine getHoaoOrLowestNl(eigval, occ, max_l, num_alpha, poly_order, hoaoN, hoaoL, eHoao) !> Eigenvalues of selected spin-channel @@ -41,48 +38,29 @@ subroutine getHoaoOrLowestNl(eigval, occ, max_l, num_alpha, poly_order, hoaoN, h !> Highest polynomial order + l in each shell integer, intent(in) :: poly_order(0:) - !> Principal and angular quantum number of HOAO eigenvalue + !> Principal and angular quantum numbers of the HOAO eigenvalue integer, intent(out) :: hoaoN, hoaoL !> Energy of highest occupied atomic orbital real(dp), intent(out) :: eHoao - !! Flattened, one-dimensional versions of occupations and eigenvalues - real(dp), allocatable :: occFlat(:), eigvalFlat(:) - - !! Index array that sorts the flattened eigenvalues - integer, allocatable :: eigvalFlatSortInds(:) - !! True, if all occupations of current spin channel are below threshold logical :: isUnoccupied !! Auxiliary variables - integer :: ll, nn, iDummy1, iDummy2, iHoao, ii, ind - - eigvalFlat = reshape(eigval, [size(eigval)]) - occFlat = reshape(occ, [size(occ)]) - - allocate(eigvalFlatSortInds(size(eigvalFlat))) - call index_heap_sort(eigvalFlatSortInds, eigvalFlat) - - ! reverse order, since we would like to iterate over the eigenvalues from unoccupied to occupied - eigvalFlatSortInds(:) = eigvalFlatSortInds(size(eigvalFlatSortInds):1:-1) + integer :: ll, nn, iDummy1, iDummy2, loc(2) - isUnoccupied = all(occFlat < 1.0e-08_dp) + isUnoccupied = all(occ < 1.0e-08_dp) if (isUnoccupied) then - iHoao = eigvalFlatSortInds(1) - else - lpIndx: do ii = 1, size(eigvalFlatSortInds) - ind = eigvalFlatSortInds(ii) - if (occFlat(ind) >= 1.0e-08_dp) then - iHoao = ind - exit lpIndx - end if - end do lpIndx + loc(:) = minloc(eigval) + hoaoN = loc(2) + hoaoL = loc(1) + eHoao = eigval(hoaoL, hoaoN) + return end if - eHoao = eigvalFlat(iHoao) + eHoao = -huge(1.0_dp) lpAng: do ll = 0, max_l nn = 0 @@ -90,10 +68,10 @@ subroutine getHoaoOrLowestNl(eigval, occ, max_l, num_alpha, poly_order, hoaoN, h do iDummy2 = 1, poly_order(ll) nn = nn + 1 - if (abs(eigval(ll, nn) - eHoao) < 1e-10_dp) then + if (eigval(ll, nn) > eHoao .and. occ(ll, nn) > 0.0_dp) then + eHoao = eigval(ll, nn) hoaoN = nn hoaoL = ll - exit lpAng end if end do @@ -104,7 +82,7 @@ end subroutine getHoaoOrLowestNl !> Determines an approximate, average, local potential and associated effective orbital energies - !! by minimizing the deviance from local Schrödinger equations. + !! by minimizing the deviation from a local potential Schrödinger equation. !! !! See the following reference for full details: !! @@ -112,7 +90,7 @@ end subroutine getHoaoOrLowestNl !! “Tuned Range-Separated Hybrids in Density Functional Theory”. !! In: Annu. Rev. Phys. Chem. 61.1 (2010), pp. 85–109. !! DOI: 10.1146/annurev.physchem.012809.103321 - subroutine getAveragePotential(cof, eigval, occ, abcissa, weights, max_l, num_alpha, alpha,& + subroutine getAveragePotential(cof, eigval, occ, abscissa, weights, max_l, num_alpha, alpha,& & poly_order, problemsize, scftol, maxiter, avgPot, kinetic_energy_ref) !> wavefunction coefficients @@ -124,8 +102,8 @@ subroutine getAveragePotential(cof, eigval, occ, abcissa, weights, max_l, num_al !> occupation numbers real(dp), intent(in) :: occ(:, 0:, :) - !> numerical integration abcissas - real(dp), intent(in) :: abcissa(:) + !> numerical integration abscissae + real(dp), intent(in) :: abscissa(:) !> numerical integration weights real(dp), intent(in) :: weights(:) @@ -157,7 +135,7 @@ subroutine getAveragePotential(cof, eigval, occ, abcissa, weights, max_l, num_al !> Reference kinetic energy real(dp), intent(in), optional :: kinetic_energy_ref - !! HOAO shift required to resolve the ambiguity caused by the common constant + !! HOAO shift required to resolve the ambiguity of the effective orbital energies real(dp) :: hoaoShift(2) !! Maximum change in effective orbital energies @@ -210,7 +188,7 @@ subroutine getAveragePotential(cof, eigval, occ, abcissa, weights, max_l, num_al tConverged = .false. - nRadial = size(abcissa) + nRadial = size(abscissa) nSpin = size(occ, dim=1) do iSpin = 1, nSpin @@ -239,11 +217,11 @@ subroutine getAveragePotential(cof, eigval, occ, abcissa, weights, max_l, num_al do iRad = 1, nRadial rad(iRad, nn, ll, iSpin) = wavefunction(cof(iSpin, ll, :, nn), alpha, num_alpha,& - & poly_order, ll, abcissa(iRad)) + & poly_order, ll, abscissa(iRad)) radp(iRad, nn, ll, iSpin) = wavefunction_1st(cof(iSpin, ll, :, nn), alpha, num_alpha,& - & poly_order, ll, abcissa(iRad)) + & poly_order, ll, abscissa(iRad)) radpp(iRad, nn, ll, iSpin) = wavefunction_2nd(cof(iSpin, ll, :, nn), alpha,& - & num_alpha, poly_order, ll, abcissa(iRad)) + & num_alpha, poly_order, ll, abscissa(iRad)) end do ! Electron density as occupation-weighted absolute squares of the orbitals @@ -255,14 +233,14 @@ subroutine getAveragePotential(cof, eigval, occ, abcissa, weights, max_l, num_al end do ! Check if established density integrates up to the correct number of electrons - electron_number = sum(weights * (rho(:, 1) + rho(:, 2)) * abcissa**2) + electron_number = sum(weights * (rho(:, 1) + rho(:, 2)) * abscissa**2) if (abs(sum(occ) - electron_number) > 1.0e-08_dp) then call error("Average-potential: Mismatch in number of electrons.") end if ! Optionally check if the original kinetic energy is reproduced by the local quantities if (present(kinetic_energy_ref)) then - kinetic_energy = getKineticEnergy(occ, abcissa, weights, max_l, num_alpha, poly_order, rad,& + kinetic_energy = getKineticEnergy(occ, abscissa, weights, max_l, num_alpha, poly_order, rad,& & radp, radpp) if (abs(kinetic_energy - kinetic_energy_ref) > 1.0e-06_dp) then call error("Average-potential: Mismatch in kinetic energy.") @@ -290,7 +268,7 @@ subroutine getAveragePotential(cof, eigval, occ, abcissa, weights, max_l, num_al avgPot(:, iSpin) = avgPot(:, iSpin) + occ(iSpin, ll, nn)& & * (epsLast(iSpin, ll, nn) * rad(:, nn, ll, iSpin)**2& & + rad(:, nn, ll, iSpin) * (0.5_dp * radpp(:, nn, ll, iSpin)& - & + radp(:, nn, ll, iSpin) / abcissa - 0.5_dp * ll * (ll + 1) / abcissa**2& + & + radp(:, nn, ll, iSpin) / abscissa - 0.5_dp * ll * (ll + 1) / abscissa**2& & * rad(:, nn, ll, iSpin))) end do end do @@ -301,6 +279,8 @@ subroutine getAveragePotential(cof, eigval, occ, abcissa, weights, max_l, num_al do iSpin = 1, nSpin where (rho(:, iSpin) > 0.0_dp) avgPot(:, iSpin) = avgPot(:, iSpin) / rho(:, iSpin) + elsewhere + avgPot(:, iSpin) = 0.0_dp end where end do @@ -313,9 +293,9 @@ subroutine getAveragePotential(cof, eigval, occ, abcissa, weights, max_l, num_al nn = nn + 1 ! uses -laplace / 2 eps(iSpin, ll, nn)& - & = sum(weights * abcissa**2 * (rad(:, nn, ll, iSpin) * (-0.5_dp& - & * radpp(:, nn, ll, iSpin) - radp(:, nn, ll, iSpin) / abcissa& - & + 0.5_dp * ll * (ll + 1) / abcissa**2 * rad(:, nn, ll, iSpin)& + & = sum(weights * abscissa**2 * (rad(:, nn, ll, iSpin) * (-0.5_dp& + & * radpp(:, nn, ll, iSpin) - radp(:, nn, ll, iSpin) / abscissa& + & + 0.5_dp * ll * (ll + 1) / abscissa**2 * rad(:, nn, ll, iSpin)& & + avgPot(:, iSpin) * rad(:, nn, ll, iSpin)))) end do end do @@ -376,9 +356,7 @@ subroutine getAveragePotential(cof, eigval, occ, abcissa, weights, max_l, num_al ! Clean up and deal with numerical instability do iSpin = 1, nSpin - where (abs(rho(:, iSpin)) < 1.0e-20_dp) - avgPot(:, iSpin) = 0.0_dp - end where + where (abs(rho(:, iSpin)) < 1.0e-20_dp) avgPot(:, iSpin) = 0.0_dp end do end subroutine getAveragePotential @@ -387,14 +365,14 @@ end subroutine getAveragePotential !> Calculates the kinetic energy contribution based on the properties present in the average !! potential module. The result should always match the one obtained from the kinetic supervector. !! While this calculation is not strictly required, it is an important sanity-check. - pure function getKineticEnergy(occ, abcissa, weights, max_l, num_alpha, poly_order, rad, radp,& + pure function getKineticEnergy(occ, abscissa, weights, max_l, num_alpha, poly_order, rad, radp,& & radpp) result(kinetic_energy) !> Occupation numbers real(dp), intent(in) :: occ(:, 0:, :) - !> Numerical integration abcissas - real(dp), intent(in) :: abcissa(:) + !> Numerical integration abscissae + real(dp), intent(in) :: abscissa(:) !> Numerical integration weights real(dp), intent(in) :: weights(:) @@ -438,8 +416,8 @@ pure function getKineticEnergy(occ, abcissa, weights, max_l, num_alpha, poly_ord nn = nn + 1 kinetic_energy = kinetic_energy& & + occ(iSpin, ll, nn) * sum(weights * (rad(:, nn, ll, iSpin) * (-0.5_dp& - & * radpp(:, nn, ll, iSpin) - radp(:, nn, ll, iSpin) / abcissa& - & + 0.5_dp * ll * (ll + 1) / abcissa**2 * rad(:, nn, ll, iSpin))) * abcissa**2) + & * radpp(:, nn, ll, iSpin) - radp(:, nn, ll, iSpin) / abscissa& + & + 0.5_dp * ll * (ll + 1) / abscissa**2 * rad(:, nn, ll, iSpin))) * abscissa**2) end do end do end do diff --git a/slateratom/lib/globals.f90 b/slateratom/lib/globals.f90 index 1e18142a..d7ea616d 100644 --- a/slateratom/lib/globals.f90 +++ b/slateratom/lib/globals.f90 @@ -152,7 +152,7 @@ module globals !> exc energy density on grid real(dp), allocatable :: exc(:) - !> average local, effective potential + !> average local effective potential equivalent to non-local GKS potential (if present) real(dp), allocatable :: avgPot(:,:) !> generate alphas automatically @@ -171,7 +171,7 @@ module globals logical :: tBroyden !> true, if average local, effective potential should be calculated - logical :: tAvgPot + logical :: isAvgPotNeeded !> mixing factor real(dp) :: mixing_factor @@ -237,7 +237,7 @@ subroutine allocate_globals() cof(:,:,:,:) = 0.0_dp pp(:,:,:,:) = 0.0_dp - if (tAvgPot) allocate(avgPot(num_mesh_points, 2), source=0.0_dp) + if (isAvgPotNeeded) allocate(avgPot(num_mesh_points, 2), source=0.0_dp) end subroutine allocate_globals diff --git a/slateratom/lib/output.f90 b/slateratom/lib/output.f90 index 31affd5e..c24d7ae5 100644 --- a/slateratom/lib/output.f90 +++ b/slateratom/lib/output.f90 @@ -409,7 +409,7 @@ subroutine write_waves_file_standard(num_mesh_points, abcissa, weight, alpha, nu end subroutine write_waves_file_standard - !> Writes average potential to disk. + !> Writes average local potential to disk. subroutine writeAveragePotential(abcissa, avgPot) !> Numerical integration abcissas diff --git a/slateratom/lib/utilities.f90 b/slateratom/lib/utilities.f90 index b73b37a4..1b1f8a66 100644 --- a/slateratom/lib/utilities.f90 +++ b/slateratom/lib/utilities.f90 @@ -8,13 +8,6 @@ module utilities public :: check_convergence, check_electron_number public :: vector_length, fak, zeroOutCpotOfEmptyDensitySpinChannels - public :: index_heap_sort - - - !> Heap sort returning an index array. - interface index_heap_sort - module procedure index_heap_sort_real - end interface contains @@ -189,74 +182,4 @@ pure function fak(nn) end function fak - - !> Real case heap sort returning an index array. - !> based on Numerical Recipes Software 1986-92 - subroutine index_heap_sort_real(indx, array, tolerance) - - !> Indexing array on return - integer, intent(out) :: indx(:) - - !> Array of values to be sorted - real(dp), intent(in) :: array(:) - - !> Tolerance for equality of two elements - real(dp), intent(in), optional :: tolerance - - integer :: nn, ir, ij, il, ii, ik - integer :: indxTmp - real(dp) :: arrayTmp, tol - - if (present(tolerance)) then - tol = tolerance - else - tol = epsilon(0.0_dp) - end if - - do ii = 1, size(indx) - indx(ii) = ii - end do - - nn = size(array) - - if (nn <= 1) return - il = nn / 2 + 1 - ir = nn - ik = 1 - do while (ik == 1) - if (il .gt. 1) then - il = il - 1 - indxTmp = indx(il) - arrayTmp = array(indxTmp) - else - indxTmp = indx(ir) - arrayTmp = array(indxTmp) - indx(ir) = indx(1) - ir = ir - 1 - if (ir .lt. 1) then - indx(1) = indxTmp - return - end if - end if - ii = il - ij = 2 * il - do while (ij <= ir) - if (ij < ir) then - if (array(indx(ij)) < array(indx(ij+1)) - tol) then - ij = ij + 1 - end if - end if - if(arrayTmp < array(indx(ij)) - tol) then - indx(ii) = indx(ij) - ii = ij - ij = 2 * ij - else - ij = ir + 1 - end if - end do - indx(ii) = indxTmp - end do - - end subroutine index_heap_sort_real - end module utilities diff --git a/slateratom/prog/main.f90 b/slateratom/prog/main.f90 index 440110f8..04b6fde9 100644 --- a/slateratom/prog/main.f90 +++ b/slateratom/prog/main.f90 @@ -50,7 +50,7 @@ program HFAtom type(TBeckeGridParams) :: grid_params ! deactivate average potential calculation for now - tAvgPot = .false. + isAvgPotNeeded = .false. call parse_command_arguments() call read_input_1(nuc, max_l, occ_shells, maxiter, scftol, poly_order, min_alpha, max_alpha,& @@ -234,7 +234,7 @@ program HFAtom call write_wave_coeffs_file(max_l, num_alpha, poly_order, cof, alpha, occ, qnvalorbs) - if (tAvgPot) then + if (isAvgPotNeeded) then if (.not. tZora) kinetic_energy_ref = kinetic_energy call getAveragePotential(cof, eigval, occ, abcissa, weight, max_l, num_alpha, alpha,& & poly_order, problemsize, scftol, maxiter, avgPot, kinetic_energy_ref=kinetic_energy_ref) From f5dda665b7a5851a6955368aa2d757e21feb69f0 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Tue, 4 Jul 2023 09:00:28 +0200 Subject: [PATCH 03/25] Add instructions to compile libXC from source --- README.rst | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 39c18294..9b2867ca 100644 --- a/README.rst +++ b/README.rst @@ -46,7 +46,7 @@ Follow the usual CMake build workflow: CMake) or the ``PKG_CONFIG_PATH`` environment variable (if libXC was built with autotools) in order to guide the library search:: - CMAKE_PREFIX_PATH=YOUR_LIBXC_INSTALL_FOLDER FC=gfortan cmake [...] + CMAKE_PREFIX_PATH=$HOME/opt/libxc FC=gfortan cmake [...] PKG_CONFIG_PATH=FOLDER_WITH_LIBXC_PC_FILES FC=gfortran cmake [...] @@ -65,6 +65,39 @@ Follow the usual CMake build workflow: cmake --install _build +Obtaining libXC +--------------- + +Follow the usual CMake build workflow: + +* Clone the official libXC repository and checkout the latest release tag, e.g. + ``6.2.2``:: + + git clone https://gitlab.com/libxc/libxc.git libxc + cd libxc/ + git checkout 6.2.2 + +* Configure the project, specify your compilers (e.g. ``gfortran`` and ``gcc``), + the install location (e.g. ``$HOME/opt/libxc``) and the build directory + (e.g. ``_build``):: + + FC=gfortran CC=gcc cmake -DENABLE_FORTRAN=True -DCMAKE_INSTALL_PREFIX=$HOME/opt/libxc -B _build . + +* If the configuration was successful, build the code :: + + cmake --build _build -- -j + +* After successful build, you should test the code by running :: + + pushd _build + ctest -j + popd + +* If the tests were successful, install the package via :: + + cmake --install _build + + Advanced build configuration ============================ @@ -85,7 +118,7 @@ variable. If you want to load an external toolchain file instead of one from the source tree, you can specify the file path with the ``-DTOOLCHAIN_FILE`` option :: - -DTOOLCHAIN_FILE=/some/path/myintel.cmake + -DTOOLCHAIN_FILE=/path/to/myintel.cmake or with the ``SKPROGS_TOOLCHAIN_FILE`` environment variable. From df878721e399a1c4e37c7b6544ae60a55717b536 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Mon, 10 Jul 2023 12:37:55 +0200 Subject: [PATCH 04/25] Apply feedback of code review --- README.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index 9b2867ca..7f71d9b0 100644 --- a/README.rst +++ b/README.rst @@ -36,17 +36,17 @@ Building the code Follow the usual CMake build workflow: * Configure the project, specify your compilers (e.g. ``gfortran``), - the install location (e.g. ``$HOME/opt/skprogs``) and the build directory - (e.g. ``_build``):: + the install location (i.e. path stored in ``YOUR_SKPROGS_INSTALL_FOLDER``, + e.g. ``$HOME/opt/skprogs``) and the build directory (e.g. ``_build``):: - FC=gfortran cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt/skprogs -B _build . + FC=gfortran cmake -DCMAKE_INSTALL_PREFIX=YOUR_SKPROGS_INSTALL_FOLDER -B _build . If libXC is installed in a non-standard location, you may need to specify either the ``CMAKE_PREFIX_PATH`` environment variable (if libXC was built with CMake) or the ``PKG_CONFIG_PATH`` environment variable (if libXC was built with autotools) in order to guide the library search:: - CMAKE_PREFIX_PATH=$HOME/opt/libxc FC=gfortan cmake [...] + CMAKE_PREFIX_PATH=YOUR_LIBXC_INSTALL_FOLDER FC=gfortan cmake [...] PKG_CONFIG_PATH=FOLDER_WITH_LIBXC_PC_FILES FC=gfortran cmake [...] @@ -78,10 +78,10 @@ Follow the usual CMake build workflow: git checkout 6.2.2 * Configure the project, specify your compilers (e.g. ``gfortran`` and ``gcc``), - the install location (e.g. ``$HOME/opt/libxc``) and the build directory - (e.g. ``_build``):: + the install location (i.e. path stored in ``YOUR_LIBXC_INSTALL_FOLDER``, e.g. + ``$HOME/opt/libxc``) and the build directory (e.g. ``_build``):: - FC=gfortran CC=gcc cmake -DENABLE_FORTRAN=True -DCMAKE_INSTALL_PREFIX=$HOME/opt/libxc -B _build . + FC=gfortran CC=gcc cmake -DENABLE_FORTRAN=True -DCMAKE_INSTALL_PREFIX=YOUR_LIBXC_INSTALL_FOLDER -B _build . * If the configuration was successful, build the code :: From b1708f03bc28b2697b4dcaf3e2c764dd97096906 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Wed, 9 Aug 2023 15:35:00 +0200 Subject: [PATCH 05/25] Add instructions covering the Conda packages --- README.rst | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index 7f71d9b0..2ce0e3e5 100644 --- a/README.rst +++ b/README.rst @@ -11,8 +11,8 @@ robust. Make sure, you check results as careful as possible. Use at your own risk! -Installing -========== +Installation +============ |build status| @@ -30,8 +30,34 @@ Prerequisites * libXC library with f03 interface (version >=6.0.0) -Building the code ------------------ +Obtaining via Conda +------------------- + +The preferred way of obtaining SkProgs is to install it via the conda package +management framework using `Miniconda +`_ or `Anaconda +`_. Make sure to add/enable the +``conda-forge`` channel in order to be able to access SkProgs:: + + conda config --add channels conda-forge + conda config --set channel_priority strict + +We recommend to set up a dedicated conda environment and to use the +`mamba solver `_ :: + + conda create --name skprogs + conda activate skprogs + conda install conda-libmamba-solver + conda config --set solver libmamba + +to install the latest stable release of SkProgs (Fortran and Python +components):: + + mamba install skprogs skprogs-python + + +Building from source +-------------------- Follow the usual CMake build workflow: @@ -65,8 +91,8 @@ Follow the usual CMake build workflow: cmake --install _build -Obtaining libXC ---------------- +Building libXC from source +-------------------------- Follow the usual CMake build workflow: @@ -134,9 +160,10 @@ Generating SK-files The basic steps of generating the electronic part of the SK-tables are as follows: -* Initialize the necessary environment variables by sourceing the - ``skprogs-activate.sh`` script (provided you have BASH or compatible shell, - otherwise inspect the script and set up the environment variables manually):: +* If you have build SkProgs from source, initialize the necessary environment + variables by sourceing the ``skprogs-activate.sh`` script (provided you have + BASH or a compatible shell, otherwise inspect the script and set up the + environment variables manually):: source /bin/skprogs-activate.sh From 3349344ff331de964c460e00081e6676b5650954 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Thu, 26 Oct 2023 19:54:25 +0200 Subject: [PATCH 06/25] Handle valence shell configuration errors more gracefully (#66) --- sktools/src/sktools/skdef.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sktools/src/sktools/skdef.py b/sktools/src/sktools/skdef.py index 078e6e04..b85e3f59 100644 --- a/sktools/src/sktools/skdef.py +++ b/sktools/src/sktools/skdef.py @@ -198,6 +198,19 @@ def __init__(self, atomicnumber, mass, occupations, valenceshells, # Sort valenceshells (and occupations) by ascending nn and ll tmp = [nn * (sc.MAX_ANGMOM + 1) + ll for nn, ll in valenceshells] self.valenceshells = [valenceshells[ii] for ii in np.argsort(tmp)] + + # check for uniqueness and continuity of angular quantum numbers + angmom = sorted([tpl[1] for tpl in self.valenceshells]) + unique_and_continuous = all(ii + 1 == jj + for ii, jj in zip(angmom, angmom[1:])) + if not unique_and_continuous: + shell_str = ' '.join([sc.shell_ind_to_name(nn, ll) + for nn, ll in self.valenceshells]) + raise sc.SkgenException( + "Invalid valence shell configuration '" + shell_str \ + + "' found:\nDuplicate angular momenta and/or omitting " + \ + "intermediate shells is not supported by the SK-file format.") + # Sort occshells by ascending nn and ll tmp = [qn[0] * (sc.MAX_ANGMOM + 1) + qn[1] for qn, occ in occshells] self.occshells = [occshells[ii] for ii in np.argsort(tmp)] From c318a7487d07a7300108dbd071ac30e76cbc8b2e Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Fri, 27 Oct 2023 15:13:22 +0200 Subject: [PATCH 07/25] Substitute distutils in regression testing infrastructure --- test/prog/sktable/bin/testwithworkdir | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/prog/sktable/bin/testwithworkdir b/test/prog/sktable/bin/testwithworkdir index ad596f5d..e0f669d5 100644 --- a/test/prog/sktable/bin/testwithworkdir +++ b/test/prog/sktable/bin/testwithworkdir @@ -14,7 +14,6 @@ import sys import shutil import subprocess import argparse -from distutils.dir_util import copy_tree from argparse import RawTextHelpFormatter sys.path.append(os.path.abspath('../../../../sktools/src/')) @@ -43,8 +42,8 @@ def main(cmdlineargs=None): args = parse_cmdline_args(cmdlineargs) - copy_tree(os.path.join(args.templateroot, args.test), - os.path.join(args.workdir, args.test)) + shutil.copytree(os.path.join(args.templateroot, args.test), + os.path.join(args.workdir, args.test), dirs_exist_ok=True) cwd = os.path.join(args.workdir, args.test) From ec9073ea6554bd4cab7af568c5509b22a30c20a1 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Fri, 27 Oct 2023 14:27:23 +0200 Subject: [PATCH 08/25] Remove reference to non-existent README file --- sktools/setup.cfg | 2 -- 1 file changed, 2 deletions(-) diff --git a/sktools/setup.cfg b/sktools/setup.cfg index e0d83810..6e1a34fa 100644 --- a/sktools/setup.cfg +++ b/sktools/setup.cfg @@ -4,8 +4,6 @@ version = 0.2 author = DFTB+ developers url = http://www.dftbplus.org description = Tools to Generate Electronic SK-parameters -long_description = file: README.rst -long_description_content_type = text/x-rst license = LGPL-3.0-or-later license_files = ../COPYING From 5aaf03bb98b5eedc1e1b275c22bba95043737b15 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Fri, 8 Dec 2023 11:21:12 +0100 Subject: [PATCH 09/25] Switch to LLVM compilers and LibXC 6.2.2 (#71) --- .github/workflows/build.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1be9c699..22ed4157 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -110,14 +110,14 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - fc: [ifort] - cc: [icc] + fc: [ifx] + cc: [icx] env: FC: ${{ matrix.fc }} CC: ${{ matrix.cc }} APT_PACKAGES: >- intel-oneapi-compiler-fortran - intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic + intel-oneapi-compiler-dpcpp-cpp intel-oneapi-mkl intel-oneapi-mkl-devel CMAKE_OPTIONS: >- @@ -135,10 +135,8 @@ jobs: - name: Add Intel repository if: contains(matrix.os, 'ubuntu') run: | - wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB - sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB - rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB - echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null + echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list sudo apt-get update - name: Install Intel oneAPI compiler @@ -154,7 +152,7 @@ jobs: run: | git clone https://gitlab.com/libxc/libxc.git cd libxc/ - git checkout 6.1.0 + git checkout 6.2.2 cmake -H. -B ${BUILD_DIR} -DENABLE_FORTRAN=True -DCMAKE_INSTALL_PREFIX=${PWD}/${BUILD_DIR}/${INSTALL_DIR} cd ${BUILD_DIR} make -j From 69b245ee0448ca88650035fa056232715154c0fa Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Fri, 8 Dec 2023 18:34:52 +0100 Subject: [PATCH 10/25] Prevent parsing multiple config files due to broken backend (#70) --- sktools/src/sktools/scripts/skgen.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sktools/src/sktools/scripts/skgen.py b/sktools/src/sktools/scripts/skgen.py index c9adcb30..5d22a852 100644 --- a/sktools/src/sktools/scripts/skgen.py +++ b/sktools/src/sktools/scripts/skgen.py @@ -168,9 +168,9 @@ def setup_parser_main(parser): help='directory to include in the search for calculation ' '(default: build directory only)') parser.add_argument( - '-c', '--config-file', action='append', dest='configfiles', - default=['skdef.hsd',], - help='config file(s) to be parsed (default: ./skdef.hsd)' + '-c', '--config-file', default='skdef.hsd', dest='configfiles', + metavar='CONFIGFILE', + help='config file to be parsed (default: ./skdef.hsd)' ) parser.add_argument( '-b', '--build-dir', default='_build', dest='builddir', @@ -241,6 +241,7 @@ def setup_parser_sktable(subparsers, twocnt_common, target_function): def parse_command_line_and_run_subcommand(parser, cmdlineargs=None): args = parser.parse_args(args=cmdlineargs) + args.configfiles = [args.configfiles,] args.func(args) From fe94a7e445f7b0f15b33fa3d4136e04a640aacaa Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Thu, 18 Jan 2024 09:42:20 +0100 Subject: [PATCH 11/25] Add script to facilitate the generation of STO exponents --- sktools/setup.cfg | 1 + sktools/src/sktools/scripts/skexp.py | 104 +++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 sktools/src/sktools/scripts/skexp.py diff --git a/sktools/setup.cfg b/sktools/setup.cfg index 6e1a34fa..e52fc62b 100644 --- a/sktools/setup.cfg +++ b/sktools/setup.cfg @@ -29,6 +29,7 @@ console_scripts = collectspinw = sktools.scripts.collectspinw:main collectwavecoeffs = sktools.scripts.collectwavecoeffs:main skdiff = sktools.scripts.skdiff:main + skexp = sktools.scripts.skexp:main skgen = sktools.scripts.skgen:main skmanip = sktools.scripts.skmanip:main diff --git a/sktools/src/sktools/scripts/skexp.py b/sktools/src/sktools/scripts/skexp.py new file mode 100644 index 00000000..f7df144f --- /dev/null +++ b/sktools/src/sktools/scripts/skexp.py @@ -0,0 +1,104 @@ +#!/usr/bin/env python3 + +''' +Prints STO exponents according to the usual geometric series. +(see for example DOI: 10.1063/1.1679962) +''' + +import argparse +import numpy as np + + +USAGE = \ + ''' + Prints a set of Slater-type orbital exponents, following the usual geometric + series for a given atomic number. + ''' + + +def main(cmdlineargs=None): + '''Main driver routine.''' + + args = parseargs(cmdlineargs) + + exponents = get_exponents( + args.atnum, args.nexp, a0=args.a0, extra=args.extra) + + print(((args.nexp + int(args.extra)) * ' {:.4f}').format(*exponents)) + + +def parseargs(cmdlineargs): + '''Parses command line arguments and returns the parser instance.''' + + parser = argparse.ArgumentParser(description=USAGE) + + msg = 'atomic number of element to parametrize' + parser.add_argument('atnum', metavar='Z', type=int, help=msg) + + msg = 'number of exponents' + parser.add_argument('nexp', metavar='N', type=int, help=msg) + + msg = 'smallest exponent (default: 0.5)' + parser.add_argument('-s', '--start', metavar='a0', dest='a0', + default=0.5, type=float, help=msg) + + msg = 'adds one additional exponent beyond the atomic number, proved to' + \ + ' be useful for large atoms like e.g. Au (default: False)' + parser.add_argument( + '-e', '--extra', dest='extra', action='store_true', help=msg) + + args = parser.parse_args(args=cmdlineargs) + + # check input consistence + if args.atnum < 1 or args.atnum > 118: + raise ValueError('Invalid atomic number, choose 0 < Z < 119.') + + if args.nexp < 1: + raise ValueError('Invalid number of STO exponents, choose N > 0.') + + if args.a0 <= 0.0: + raise ValueError('Invalid smallest exponents, choose positive a0.') + + return args + + +def get_exponents(atnum, nexp, a0=0.5, extra=False): + '''Generates Slater exponents according to geometric series. + + a0, a0*r, a0*r**2, a0*r**3, a0*r**4, ... + + Args: + + atnum (int): atomic number + nexp (int): number of exponents (excluding extra one) + a0 (float): smallest exponent, usually 0.5 or similar + extra (bool): add one more exponent beyond atomic number, + proved to useful for larger atoms like e.g. Au + + Returns: + + exponents (1darray): generated STO exponents + + ''' + + rr = (a0 / float(atnum))**(1.0 / float((nexp - 1))) + + if extra: + nn = nexp + 1 + else: + nn = nexp + + exponents = np.empty(nn, dtype=float) + + if extra: + for iexp in range(nn): + exponents[nn - iexp - 1] = atnum * rr**float(iexp - 1) + else: + for iexp in range(nn): + exponents[nn - iexp - 1] = atnum * rr**float(iexp) + + return exponents + + +if __name__ == '__main__': + main() From b877218f0c181589eafe33c4ca78afecee978855 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Fri, 19 Apr 2024 14:02:13 +0200 Subject: [PATCH 12/25] Fix collectwavecoeffs parsing bug --- sktools/src/sktools/scripts/collectwavecoeffs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sktools/src/sktools/scripts/collectwavecoeffs.py b/sktools/src/sktools/scripts/collectwavecoeffs.py index 49a1d841..37039f99 100644 --- a/sktools/src/sktools/scripts/collectwavecoeffs.py +++ b/sktools/src/sktools/scripts/collectwavecoeffs.py @@ -136,9 +136,9 @@ def setup_parser_main(parser): '(default: build directory only)') parser.add_argument( - '-c', '--config-file', action='append', dest='configfiles', - default=['skdef.hsd',], - help='config file(s) to be parsed (default: skdef.hsd)') + '-c', '--config-file', default='skdef.hsd', dest='configfiles', + metavar='CONFIGFILE', + help='config file to be parsed (default: ./skdef.hsd)') parser.add_argument( '-b', '--build-dir', default='_build', dest='builddir', From c8807b9f00449391dfe41f690ef82ee68c17b8b6 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Fri, 22 Mar 2024 10:56:13 +0100 Subject: [PATCH 13/25] Fix bug in sktwocnt for the global hybrid B3LYP --- sktwocnt/lib/twocnt.f90 | 14 ++-- sktwocnt/prog/input.f90 | 4 + slateratom/lib/xcfunctionals.f90 | 2 + .../HYB-B3LYP/Non-Relativistic/_C-C.skf | 80 +++++++++---------- .../HYB-B3LYP/Non-Relativistic/_C-N.skf | 80 +++++++++---------- .../HYB-B3LYP/Non-Relativistic/_N-C.skf | 80 +++++++++---------- .../HYB-B3LYP/Non-Relativistic/_N-N.skf | 80 +++++++++---------- 7 files changed, 171 insertions(+), 169 deletions(-) diff --git a/sktwocnt/lib/twocnt.f90 b/sktwocnt/lib/twocnt.f90 index db0725b8..a3420957 100644 --- a/sktwocnt/lib/twocnt.f90 +++ b/sktwocnt/lib/twocnt.f90 @@ -253,7 +253,9 @@ subroutine get_twocenter_integrals(inp, imap, skham, skover) call xc_f03_func_init(xcfunc_c, XC_GGA_C_PBE, XC_UNPOLARIZED) elseif (inp%iXC == 7) then call xc_f03_func_init(xcfunc_xc, XC_HYB_GGA_XC_B3LYP, XC_UNPOLARIZED) - call xc_f03_func_set_ext_params(xcfunc_xc, [0.20_dp, 0.72_dp, 0.81_dp]) + ! Adjustable fraction of Fock-type exchange, otherwise standard parametrization taken from + ! J. Phys. Chem. 1994, 98, 45, 11623-11627; DOI: 10.1021/j100096a001 + call xc_f03_func_set_ext_params(xcfunc_xc, [inp%camAlpha, 0.72_dp, 0.81_dp]) elseif (inp%iXC == 8) then call xc_f03_func_init(xcfunc_xc, XC_HYB_GGA_XC_CAMY_B3LYP, XC_UNPOLARIZED) call xc_f03_func_set_ext_params(xcfunc_xc, [0.81_dp, inp%camAlpha + inp%camBeta,& @@ -657,17 +659,11 @@ subroutine getskintegrals(beckeInt, radialHFQuadrature, nRad, nAng, atom1, atom2 ! total density: \int (|\phi_1|^2 + |\phi_2|^2) dens = getDensity(radval1(:, i1), radval2(:, i2), spherval1, spherval2, weights) - if (iXC == xcFunctional%HYB_B3LYP) then - ! full-range Hartree-Fock exchange contribution - frx = 0.5_dp * getFullRangeHFContribution(radialHFQuadrature%xx, rr3, ll_max, atom1, atom2,& - & imap, ii, r1, theta1, r2, theta2, weights) - ! add up full-range exchange to the Hamiltonian - integ1 = integ1 - frx - elseif (iXC == xcFunctional%HYB_PBE0) then + if (iXC == xcFunctional%HYB_PBE0 .or. iXC == xcFunctional%HYB_B3LYP) then ! full-range Hartree-Fock exchange contribution frx = 0.5_dp * camAlpha * getFullRangeHFContribution(radialHFQuadrature%xx, rr3, ll_max,& & atom1, atom2, imap, ii, r1, theta1, r2, theta2, weights) - ! add up full-/long-range exchange to the Hamiltonian + ! add up full-range exchange to the Hamiltonian integ1 = integ1 - frx elseif (tLC) then ! long-range Hartree-Fock exchange contribution diff --git a/sktwocnt/prog/input.f90 b/sktwocnt/prog/input.f90 index f1038db9..8f8a90d3 100644 --- a/sktwocnt/prog/input.f90 +++ b/sktwocnt/prog/input.f90 @@ -113,10 +113,14 @@ subroutine readInput(inp, fname) inp%iXC = iXC if (inp%iXC == xcFunctional%HYB_B3LYP) then + ! 20% HFX hard-coded at the moment + inp%camAlpha = 0.2_dp + inp%camBeta = 0.0_dp call nextline_(fp, iLine, line) read(line, *, iostat=iErr) inp%nRadial, inp%nAngular, inp%ll_max, inp%rm call checkerror_(fname, line, iLine, iErr) elseif (inp%iXC == xcFunctional%HYB_PBE0) then + inp%camBeta = 0.0_dp call nextline_(fp, iLine, line) ! currently only HYB-PBE0 does support arbitrary HFX portions (HYB-B3LYP does not) read(line, *, iostat=iErr) inp%camAlpha diff --git a/slateratom/lib/xcfunctionals.f90 b/slateratom/lib/xcfunctionals.f90 index 62fb287a..8ef864b0 100644 --- a/slateratom/lib/xcfunctionals.f90 +++ b/slateratom/lib/xcfunctionals.f90 @@ -772,6 +772,8 @@ subroutine getExcVxc_HYB_B3LYP(abcissa, dz, dzdr, rho, drho, sigma, exc, vxc) vxcsigma(:,:) = 0.0_dp call xc_f03_func_init(xcfunc_xc, XC_HYB_GGA_XC_B3LYP, XC_POLARIZED) + ! Standard parametrization of B3LYP taken from + ! J. Phys. Chem. 1994, 98, 45, 11623-11627; DOI: 10.1021/j100096a001 call xc_f03_func_set_ext_params(xcfunc_xc, [0.20_dp, 0.72_dp, 0.81_dp]) ! exchange + correlation diff --git a/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_C-C.skf b/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_C-C.skf index 134f770f..19226abe 100644 --- a/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_C-C.skf +++ b/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_C-C.skf @@ -30,46 +30,46 @@ 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.014660078063E+00 -1.730435726199E+00 0.000000000000E+00 1.083267126147E-02 -1.933834463299E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.730575293974E-01 8.833514209299E-01 0.000000000000E+00 -2.066130535735E-01 8.637212319443E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -9.635450298845E-01 -1.706374973300E+00 0.000000000000E+00 4.178710061361E-02 -1.904031482324E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.545519820831E-01 8.762698805200E-01 0.000000000000E+00 -2.150454730913E-01 8.581093738214E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -9.130454363524E-01 -1.682230479896E+00 0.000000000000E+00 7.296480046770E-02 -1.876544250523E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.358319705205E-01 8.690492221564E-01 0.000000000000E+00 -2.234826282269E-01 8.525386537950E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -8.632210014702E-01 -1.658029644630E+00 0.000000000000E+00 1.042536783951E-01 -1.851203595973E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.169221745275E-01 8.616959691211E-01 0.000000000000E+00 -2.319128077761E-01 8.470091878369E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -8.141253140431E-01 -1.633798279619E+00 0.000000000000E+00 1.355501493361E-01 -1.827845767665E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.978467961892E-01 8.542165961621E-01 0.000000000000E+00 -2.403244566820E-01 8.415204770493E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.658062128754E-01 -1.609560668144E+00 0.000000000000E+00 1.667588044733E-01 -1.806313036872E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.786295368592E-01 8.466175224429E-01 0.000000000000E+00 -2.487062150596E-01 8.360714839051E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.183061415054E-01 -1.585339622885E+00 0.000000000000E+00 1.977920619438E-01 -1.786454139731E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.592935768386E-01 8.389051050646E-01 0.000000000000E+00 -2.570469525959E-01 8.306607033117E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.716624912930E-01 -1.561156544280E+00 0.000000000000E+00 2.285698057992E-01 -1.768124585899E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.398615574923E-01 8.310856331235E-01 0.000000000000E+00 -2.653357986848E-01 8.252862286264E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.259079319724E-01 -1.537031478640E+00 0.000000000000E+00 2.590190185885E-01 -1.751186854673E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.203555655867E-01 8.231653222660E-01 0.000000000000E+00 -2.735621686364E-01 8.199458127835E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.810707291668E-01 -1.512983175838E+00 0.000000000000E+00 2.890734121052E-01 -1.735510496864E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.007971196524E-01 8.151503097055E-01 0.000000000000E+00 -2.817157862878E-01 8.146369247170E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.371750480813E-01 -1.489029146147E+00 0.000000000000E+00 3.186730599610E-01 -1.720972158287E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.812071582033E-01 8.070466496700E-01 0.000000000000E+00 -2.897867033223E-01 8.093568012766E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.942412431705E-01 -1.465185716207E+00 0.000000000000E+00 3.477640350809E-01 -1.707455538530E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.616060296542E-01 7.988603092489E-01 0.000000000000E+00 -2.977653155862E-01 8.041024948477E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.522861335562E-01 -1.441468083844E+00 0.000000000000E+00 3.762980546134E-01 -1.694851296611E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.420134838059E-01 7.905971646128E-01 0.000000000000E+00 -3.056423766739E-01 7.988709168880E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.113232642084E-01 -1.417890371570E+00 0.000000000000E+00 4.042321342588E-01 -1.683056913631E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.224486647754E-01 7.822629975788E-01 0.000000000000E+00 -3.134090090295E-01 7.936588775992E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.713631529744E-01 -1.394465678781E+00 0.000000000000E+00 4.315282535804E-01 -1.671976521076E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.029301052671E-01 7.738634924994E-01 0.000000000000E+00 -3.210567127987E-01 7.884631219482E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.324135236943E-01 -1.371206132390E+00 0.000000000000E+00 4.581530334667E-01 -1.661520702117E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.834757220934E-01 7.654042334536E-01 0.000000000000E+00 -3.285773726416E-01 7.832803622510E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.944795257454E-01 -1.348122935916E+00 0.000000000000E+00 4.840774265924E-01 -1.651606272282E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.641028128620E-01 7.568907017185E-01 0.000000000000E+00 -3.359632627046E-01 7.781073075267E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.575639404937E-01 -1.325226416970E+00 0.000000000000E+00 5.092764214225E-01 -1.642156044879E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.448280537589E-01 7.483282735057E-01 0.000000000000E+00 -3.432070499280E-01 7.729406898243E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.216673751691E-01 -1.302526073021E+00 0.000000000000E+00 5.337287600358E-01 -1.633098585676E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.256674983633E-01 7.397222179456E-01 0.000000000000E+00 -3.503017958541E-01 7.677772877178E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.867884448831E-01 -1.280030615467E+00 0.000000000000E+00 5.574166698236E-01 -1.624367960717E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.066365774385E-01 7.310776953040E-01 0.000000000000E+00 -3.572409570839E-01 7.626139471559E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.529239434284E-01 -1.257748011915E+00 0.000000000000E+00 5.803256089218E-01 -1.615903480425E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.877500996463E-01 7.223997554175E-01 0.000000000000E+00 -3.640183845176E-01 7.574475998488E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.200690034241E-01 -1.235685526766E+00 0.000000000000E+00 6.024440251481E-01 -1.607649442687E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.690222531415E-01 7.136933363364E-01 0.000000000000E+00 -3.706283215027E-01 7.522752793619E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -8.821724616650E-02 -1.213849759963E+00 0.000000000000E+00 6.237631281614E-01 -1.599554877077E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.504666080023E-01 7.049632631624E-01 0.000000000000E+00 -3.770654010002E-01 7.470941350823E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.736092163908E-02 -1.192246683950E+00 0.000000000000E+00 6.442766744853E-01 -1.591573292068E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.320961194590E-01 6.962142470719E-01 0.000000000000E+00 -3.833246418701E-01 7.419014442118E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.749103946315E-02 -1.170881678906E+00 0.000000000000E+00 6.639807648841E-01 -1.583662426676E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.139231318854E-01 6.874508845140E-01 0.000000000000E+00 -3.894014443691E-01 7.366946219368E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.402508621608E-03 -1.149759566192E+00 0.000000000000E+00 6.828736535516E-01 -1.575784007661E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.959593835164E-01 6.786776565756E-01 0.000000000000E+00 -3.952915849422E-01 7.314712299133E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.933083489059E-02 -1.128884640088E+00 0.000000000000E+00 7.009555688282E-01 -1.567903513272E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.782160118617E-01 6.698989285054E-01 0.000000000000E+00 -4.009912103842E-01 7.262289831995E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.630595056754E-02 -1.108260697868E+00 0.000000000000E+00 7.182285452447E-01 -1.559989944425E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.607035597815E-01 6.611189493879E-01 0.000000000000E+00 -4.064968314406E-01 7.209657557625E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 8.234066887015E-02 -1.087891068233E+00 0.000000000000E+00 7.346962663732E-01 -1.552015603854E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.434319821948E-01 6.523418519623E-01 0.000000000000E+00 -4.118053159083E-01 7.156795846746E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.074485153646E-01 -1.067778638183E+00 0.000000000000E+00 7.503639178793E-01 -1.543955883626E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.264106533890E-01 6.435716525784E-01 0.000000000000E+00 -4.169138812949E-01 7.103686731125E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.316436457694E-01 -1.047925878437E+00 0.000000000000E+00 7.652380505355E-01 -1.535789061423E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.096483749003E-01 6.348122512828E-01 0.000000000000E+00 -4.218200870870E-01 7.050313922625E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.549407711704E-01 -1.028334867449E+00 0.000000000000E+00 7.793264529299E-01 -1.527496105868E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 9.315338393588E-02 6.260674320317E-01 0.000000000000E+00 -4.265218266751E-01 6.996662822291E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.773550896725E-01 -1.009007314087E+00 0.000000000000E+00 7.926380332116E-01 -1.519060490921E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 7.693336230690E-02 6.173408630218E-01 0.000000000000E+00 -4.310173189789E-01 6.942720520413E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.989022238297E-01 -9.899445790859E-01 0.000000000000E+00 8.051827093029E-01 -1.510468019340E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.099544584226E-02 6.086360971359E-01 0.000000000000E+00 -4.353050998126E-01 6.888475788405E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.195981635802E-01 -9.711476953681E-01 0.000000000000E+00 8.169713071738E-01 -1.501706655135E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.534623425383E-02 5.999565724975E-01 0.000000000000E+00 -4.393840130259E-01 6.833919063321E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.394592139781E-01 -9.526173872866E-01 0.000000000000E+00 8.280154665789E-01 -1.492766364861E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.999180142234E-02 5.913056131289E-01 0.000000000000E+00 -4.432532014563E-01 6.779042425759E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.585019470186E-01 -9.343540888692E-01 0.000000000000E+00 8.383275536323E-01 -1.483638967439E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.493770607413E-02 5.826864297088E-01 0.000000000000E+00 -4.469120977219E-01 6.723839571869E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.767431570760E-01 -9.163579611498E-01 0.000000000000E+00 8.479205796979E-01 -1.474317992274E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.890028185773E-04 5.741021204234E-01 0.000000000000E+00 -4.503604148854E-01 6.668305780105E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.941998194418E-01 -8.986289086506E-01 0.000000000000E+00 8.568081260515E-01 -1.464798545307E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.424974648369E-02 5.655556719080E-01 0.000000000000E+00 -4.535981370146E-01 6.612437873357E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.108890515188E-01 -8.811665950631E-01 0.000000000000E+00 8.650042738051E-01 -1.455077182665E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.837446105178E-02 5.570499602733E-01 0.000000000000E+00 -4.566255096662E-01 6.556234177024E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.152031075253E-01 -1.177408871280E+00 0.000000000000E+00 -1.155878536671E-01 -9.771530178189E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.730575293974E-01 8.833514209299E-01 0.000000000000E+00 -2.066130535735E-01 8.637212319443E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.768465372590E-01 -1.158507508569E+00 0.000000000000E+00 -9.313886937838E-02 -9.566818922757E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.545519820831E-01 8.762698805200E-01 0.000000000000E+00 -2.150454730913E-01 8.581093738214E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.391940291234E-01 -1.139600070503E+00 0.000000000000E+00 -7.051308436959E-02 -9.381842217152E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.358319705205E-01 8.690492221564E-01 0.000000000000E+00 -2.234826282269E-01 8.525386537950E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.022900446780E-01 -1.120709348584E+00 0.000000000000E+00 -4.780433858471E-02 -9.215070410229E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.169221745275E-01 8.616959691211E-01 0.000000000000E+00 -2.319128077761E-01 8.470091878369E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.661732398390E-01 -1.101856646086E+00 0.000000000000E+00 -2.509885720687E-02 -9.065032939989E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.978467961892E-01 8.542165961621E-01 0.000000000000E+00 -2.403244566820E-01 8.415204770493E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.308768200180E-01 -1.083061830383E+00 0.000000000000E+00 -2.475549019535E-03 -8.930322428043E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.786295368592E-01 8.466175224429E-01 0.000000000000E+00 -2.487062150596E-01 8.360714839051E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.964288896723E-01 -1.064343386519E+00 0.000000000000E+00 1.999367771678E-02 -8.809597486943E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.592935768386E-01 8.389051050646E-01 0.000000000000E+00 -2.570469525959E-01 8.306607033117E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.628527944410E-01 -1.045718471561E+00 0.000000000000E+00 4.224358732801E-02 -8.701584445783E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.398615574923E-01 8.310856331235E-01 0.000000000000E+00 -2.653357986848E-01 8.252862286264E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.301674543349E-01 -1.027202969390E+00 0.000000000000E+00 6.421528142171E-02 -8.605078169894E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.203555655867E-01 8.231653222660E-01 0.000000000000E+00 -2.735621686364E-01 8.199458127835E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.983876868478E-01 -1.008811545653E+00 0.000000000000E+00 8.585586028382E-02 -8.518942125534E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.007971196524E-01 8.151503097055E-01 0.000000000000E+00 -2.817157862878E-01 8.146369247170E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.675245186064E-01 -9.905577024679E-01 0.000000000000E+00 1.071180843431E-01 -8.442107820250E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.812071582033E-01 8.070466496700E-01 0.000000000000E+00 -2.897867033223E-01 8.093568012766E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.375854847917E-01 -9.724538327811E-01 0.000000000000E+00 1.279600386366E-01 -8.373573732088E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.616060296542E-01 7.988603092489E-01 0.000000000000E+00 -2.977653155862E-01 8.041024948477E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.085749155952E-01 -9.545112740514E-01 0.000000000000E+00 1.483448027146E-01 -8.312403823748E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.420134838059E-01 7.905971646128E-01 0.000000000000E+00 -3.056423766739E-01 7.988709168880E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.804942092526E-01 -9.367403610400E-01 0.000000000000E+00 1.682401280116E-01 -8.257725725566E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.224486647754E-01 7.822629975788E-01 0.000000000000E+00 -3.134090090295E-01 7.936588775992E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.533420913269E-01 -9.191504776782E-01 0.000000000000E+00 1.876181243306E-01 -8.208728659747E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.029301052671E-01 7.738634924994E-01 0.000000000000E+00 -3.210567127987E-01 7.884631219482E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.271148601128E-01 -9.017501076785E-01 0.000000000000E+00 2.064549567332E-01 -8.164661167054E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.834757220934E-01 7.654042334536E-01 0.000000000000E+00 -3.285773726416E-01 7.832803622510E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.018066181904E-01 -8.845468838722E-01 0.000000000000E+00 2.247305538311E-01 -8.124828689517E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.641028128620E-01 7.568907017185E-01 0.000000000000E+00 -3.359632627046E-01 7.781073075267E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.740949034189E-02 -8.675476361654E-01 0.000000000000E+00 2.424283281927E-01 -8.088591054201E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.448280537589E-01 7.483282735057E-01 0.000000000000E+00 -3.432070499280E-01 7.729406898243E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.391382812376E-02 -8.507584379449E-01 0.000000000000E+00 2.595349093119E-01 -8.055359895931E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.256674983633E-01 7.397222179456E-01 0.000000000000E+00 -3.503017958541E-01 7.677772877178E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.130840163560E-02 -8.341846509162E-01 0.000000000000E+00 2.760398893693E-01 -8.024596051481E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.066365774385E-01 7.310776953040E-01 0.000000000000E+00 -3.572409570839E-01 7.626139471559E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -9.580578984552E-03 -8.178309682500E-01 0.000000000000E+00 2.919355818123E-01 -7.995806951454E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.877500996463E-01 7.223997554175E-01 0.000000000000E+00 -3.640183845176E-01 7.574475998488E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.128350609779E-02 -8.017014560861E-01 0.000000000000E+00 3.072167926858E-01 -7.968544032410E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.690222531415E-01 7.136933363364E-01 0.000000000000E+00 -3.706283215027E-01 7.522752793619E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.129879819951E-02 -7.857995932243E-01 0.000000000000E+00 3.218806045799E-01 -7.942400186955E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.504666080023E-01 7.049632631624E-01 0.000000000000E+00 -3.770654010002E-01 7.470941350823E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.048117532744E-02 -7.701283090278E-01 0.000000000000E+00 3.359261729703E-01 -7.917007266915E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.320961194590E-01 6.962142470719E-01 0.000000000000E+00 -3.833246418701E-01 7.419014442118E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.884731440208E-02 -7.546900195717E-01 0.000000000000E+00 3.493545345653E-01 -7.892033651369E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.139231318854E-01 6.874508845140E-01 0.000000000000E+00 -3.894014443691E-01 7.366946219368E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 8.641456656088E-02 -7.394866619626E-01 0.000000000000E+00 3.621684272230E-01 -7.867181888061E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.959593835164E-01 6.786776565756E-01 0.000000000000E+00 -3.952915849422E-01 7.314712299133E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.032008423979E-01 -7.245197268736E-01 0.000000000000E+00 3.743721212506E-01 -7.842186416182E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.782160118617E-01 6.698989285054E-01 0.000000000000E+00 -4.009912103842E-01 7.262289831995E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.192245072946E-01 -7.097902893461E-01 0.000000000000E+00 3.859712619632E-01 -7.816811377204E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.607035597815E-01 6.611189493879E-01 0.000000000000E+00 -4.064968314406E-01 7.209657557625E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.345042861108E-01 -6.952990378517E-01 0.000000000000E+00 3.969727230473E-01 -7.790848517684E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.434319821948E-01 6.523418519623E-01 0.000000000000E+00 -4.118053159083E-01 7.156795846746E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.490591763795E-01 -6.810463016939E-01 0.000000000000E+00 4.073844701779E-01 -7.764115186321E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.264106533890E-01 6.435716525784E-01 0.000000000000E+00 -4.169138812949E-01 7.103686731125E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.629083700844E-01 -6.670320768463E-01 0.000000000000E+00 4.172154346915E-01 -7.736452427905E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.096483749003E-01 6.348122512828E-01 0.000000000000E+00 -4.218200870870E-01 7.050313922625E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.760711839152E-01 -6.532560502708E-01 0.000000000000E+00 4.264753970801E-01 -7.707723175713E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 9.315338393588E-02 6.260674320317E-01 0.000000000000E+00 -4.265218266751E-01 6.996662822291E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.885669969544E-01 -6.397176227817E-01 0.000000000000E+00 4.351748796692E-01 -7.677810541526E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 7.693336230690E-02 6.173408630218E-01 0.000000000000E+00 -4.310173189789E-01 6.942720520413E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.004151950640E-01 -6.264159305649E-01 0.000000000000E+00 4.433250479246E-01 -7.646616201956E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.099544584226E-02 6.086360971359E-01 0.000000000000E+00 -4.353050998126E-01 6.888475788405E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.116351216217E-01 -6.133498654386E-01 0.000000000000E+00 4.509376199883E-01 -7.614058879744E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.534623425383E-02 5.999565724975E-01 0.000000000000E+00 -4.393840130259E-01 6.833919063321E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.222460338223E-01 -6.005180939185E-01 0.000000000000E+00 4.580247838427E-01 -7.580072917181E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.999180142234E-02 5.913056131289E-01 0.000000000000E+00 -4.432532014563E-01 6.779042425759E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.322670637662E-01 -5.879190751653E-01 0.000000000000E+00 4.645991214744E-01 -7.544606938145E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.493770607413E-02 5.826864297088E-01 0.000000000000E+00 -4.469120977219E-01 6.723839571869E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.417171837790E-01 -5.755510779025E-01 0.000000000000E+00 4.706735395005E-01 -7.507622595277E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.890028185773E-04 5.741021204234E-01 0.000000000000E+00 -4.503604148854E-01 6.668305780105E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.506151753748E-01 -5.634121963718E-01 0.000000000000E+00 4.762612057015E-01 -7.469093398276E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.424974648369E-02 5.655556719080E-01 0.000000000000E+00 -4.535981370146E-01 6.612437873357E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.589796013523E-01 -5.515003653788E-01 0.000000000000E+00 4.813754909329E-01 -7.429003619112E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.837446105178E-02 5.570499602733E-01 0.000000000000E+00 -4.566255096662E-01 6.556234177024E-01 Spline diff --git a/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_C-N.skf b/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_C-N.skf index 531b9f0d..b058e1d0 100644 --- a/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_C-N.skf +++ b/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_C-N.skf @@ -29,46 +29,46 @@ 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.101706788670E+00 -2.069198895714E+00 0.000000000000E+00 -1.636063298629E-01 -2.160266691709E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.198877710650E-01 8.540221258752E-01 0.000000000000E+00 -1.581415787584E-01 8.356555452289E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.035604037164E+00 -2.036769166663E+00 0.000000000000E+00 -1.226921489858E-01 -2.131574442006E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.997812468949E-01 8.461455950426E-01 0.000000000000E+00 -1.661509452276E-01 8.300725581625E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -9.706079780336E-01 -2.004318457157E+00 0.000000000000E+00 -8.153899146338E-02 -2.105415198511E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.795074839176E-01 8.381303291264E-01 0.000000000000E+00 -1.742097893211E-01 8.245377470251E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -9.067874847378E-01 -1.971883433061E+00 0.000000000000E+00 -4.030853407517E-02 -2.081557842129E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.590953946863E-01 8.299843125438E-01 0.000000000000E+00 -1.823025801840E-01 8.190488712626E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -8.442026466260E-01 -1.939498306597E+00 0.000000000000E+00 8.512762740886E-04 -2.059782508249E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.385731237420E-01 8.217154294984E-01 0.000000000000E+00 -1.904140537824E-01 8.136031383811E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.829053979450E-01 -1.907194946685E+00 0.000000000000E+00 4.180554939420E-02 -2.039880956802E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.179680271387E-01 8.133314560523E-01 0.000000000000E+00 -1.985292621255E-01 8.081972974981E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.229401182989E-01 -1.875002988276E+00 0.000000000000E+00 8.243176706023E-02 -2.021656753635E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.973066554219E-01 8.048400529989E-01 0.000000000000E+00 -2.066336159603E-01 8.028277250052E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.643442037081E-01 -1.842949939918E+00 0.000000000000E+00 1.226190961265E-01 -2.004925297399E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.766147397098E-01 7.962487594750E-01 0.000000000000E+00 -2.147129215316E-01 7.974905026976E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.071486077453E-01 -1.811061289285E+00 0.000000000000E+00 1.622677072158E-01 -1.989513721130E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.559171805702E-01 7.875649872517E-01 0.000000000000E+00 -2.227534119615E-01 7.921814887481E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.513783525983E-01 -1.779360606278E+00 0.000000000000E+00 2.012881051359E-01 -1.975260693279E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.352380394179E-01 7.787960156523E-01 0.000000000000E+00 -2.307417737596E-01 7.868963819185E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.970530102772E-01 -1.747869643240E+00 0.000000000000E+00 2.396004758497E-01 -1.962016139145E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.146005321960E-01 7.699489870455E-01 0.000000000000E+00 -2.386651689345E-01 7.816307794010E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.441871545069E-01 -1.716608432041E+00 0.000000000000E+00 2.771340537261E-01 -1.949640900445E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.940270251297E-01 7.610309028704E-01 0.000000000000E+00 -2.465112531375E-01 7.763802286849E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.927907841194E-01 -1.685595377914E+00 0.000000000000E+00 3.138265118418E-01 -1.938006348021E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.735390323723E-01 7.520486201506E-01 0.000000000000E+00 -2.542681902297E-01 7.711402738348E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.428697189705E-01 -1.654847349867E+00 0.000000000000E+00 3.496233772629E-01 -1.926993960213E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.531572153805E-01 7.430088484609E-01 0.000000000000E+00 -2.619246636316E-01 7.659064965583E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.944259695495E-01 -1.624379767490E+00 0.000000000000E+00 3.844774725330E-01 -1.916494877419E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.329013838828E-01 7.339181473111E-01 0.000000000000E+00 -2.694698847749E-01 7.606745524286E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.474580815300E-01 -1.594206684073E+00 0.000000000000E+00 4.183483840520E-01 -1.906409441514E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.127904983165E-01 7.247829239176E-01 0.000000000000E+00 -2.768935989505E-01 7.554402026128E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.019614565234E-01 -1.564340865998E+00 0.000000000000E+00 4.512019575646E-01 -1.896646727373E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.928426736271E-01 7.156094313324E-01 0.000000000000E+00 -2.841860888160E-01 7.501993414432E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.579286502828E-01 -1.534793868420E+00 0.000000000000E+00 4.830098206152E-01 -1.887124072370E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.730751843347E-01 7.064037669067E-01 0.000000000000E+00 -2.913381757987E-01 7.449480201500E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.153496493831E-01 -1.505576107211E+00 0.000000000000E+00 5.137489316297E-01 -1.877766608665E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.535044707834E-01 6.971718710638E-01 0.000000000000E+00 -2.983412196096E-01 7.396824670622E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.421212753325E-02 -1.476696927167E+00 0.000000000000E+00 5.434011550113E-01 -1.868506802155E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.341461464973E-01 6.879195263612E-01 0.000000000000E+00 -3.051871160602E-01 7.343991045617E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.450168297205E-02 -1.448164666600E+00 0.000000000000E+00 5.719528615548E-01 -1.859284001246E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.150150065746E-01 6.786523568233E-01 0.000000000000E+00 -3.118682933561E-01 7.290945630637E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.797943117486E-03 -1.419986718341E+00 0.000000000000E+00 5.993945536251E-01 -1.850043997902E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.961250370568E-01 6.693758275266E-01 0.000000000000E+00 -3.183777070242E-01 7.237656922794E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.070466585334E-02 -1.392169587376E+00 0.000000000000E+00 6.257205142622E-01 -1.840738602949E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.774894252136E-01 6.600952444216E-01 0.000000000000E+00 -3.247088336155E-01 7.184095699993E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 7.623787258378E-02 -1.364718945139E+00 0.000000000000E+00 6.509284792731E-01 -1.831325237084E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.591205706885E-01 6.508157543776E-01 0.000000000000E+00 -3.308556633109E-01 7.130235086244E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.104182544628E-01 -1.337639680751E+00 0.000000000000E+00 6.750193314891E-01 -1.821766538712E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.410300974541E-01 6.415423454360E-01 0.000000000000E+00 -3.368126915474E-01 7.076050596556E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.432676526761E-01 -1.310935949231E+00 0.000000000000E+00 6.979968161365E-01 -1.812029989284E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.232288665238E-01 6.322798472609E-01 0.000000000000E+00 -3.425749097699E-01 7.021520163365E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.748089180800E-01 -1.284611216994E+00 0.000000000000E+00 7.198672763164E-01 -1.802087556599E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.057269893745E-01 6.230329317742E-01 0.000000000000E+00 -3.481377954055E-01 6.966624146366E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.050657830411E-01 -1.258668304726E+00 0.000000000000E+00 7.406394073837E-01 -1.791915356184E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 8.853384202950E-02 6.138061139657E-01 0.000000000000E+00 -3.534973011486E-01 6.911345327431E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.340627441576E-01 -1.233109427810E+00 0.000000000000E+00 7.603240290213E-01 -1.781493330645E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 7.165807975695E-02 6.046037528669E-01 0.000000000000E+00 -3.586498436375E-01 6.855668892221E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.618249545466E-01 -1.207936234600E+00 0.000000000000E+00 7.789338738370E-01 -1.770804946713E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.510765233715E-02 5.954300526809E-01 0.000000000000E+00 -3.635922915978E-01 6.799582399973E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.883781246208E-01 -1.183149842540E+00 0.000000000000E+00 7.964833911778E-01 -1.759836909514E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.888981985235E-02 5.862890640569E-01 0.000000000000E+00 -3.683219535213E-01 6.743075742827E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.137484302454E-01 -1.158750872332E+00 0.000000000000E+00 8.129885650081E-01 -1.748578893506E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.301116895474E-02 5.771846855033E-01 0.000000000000E+00 -3.728365649436E-01 6.686141095966E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.379624273348E-01 -1.134739480375E+00 0.000000000000E+00 8.284667447637E-01 -1.737023289459E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 7.477629567375E-03 5.681206649291E-01 0.000000000000E+00 -3.771342753806E-01 6.628772859753E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.610469721872E-01 -1.111115389457E+00 0.000000000000E+00 8.429364880824E-01 -1.725164966775E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.705508026197E-03 5.591006013071E-01 0.000000000000E+00 -3.812136349785E-01 6.570967594935E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.830291469310E-01 -1.087877917895E+00 0.000000000000E+00 8.564174145150E-01 -1.713001050444E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.253357574764E-02 5.501279464514E-01 0.000000000000E+00 -3.850735809285E-01 6.512723951928E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.039361896505E-01 -1.065026007159E+00 0.000000000000E+00 8.689300693731E-01 -1.700530711972E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.700250998808E-02 5.412060069005E-01 0.000000000000E+00 -3.887134236955E-01 6.454042595106E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.237954288748E-01 -1.042558248204E+00 0.000000000000E+00 8.804957970034E-01 -1.687754973595E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.110883361384E-02 5.323379459005E-01 0.000000000000E+00 -3.921328331034E-01 6.394926122924E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.426342221681E-01 -1.020472906398E+00 0.000000000000E+00 8.911366228308E-01 -1.674676525094E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.484963775560E-02 5.235267854812E-01 0.000000000000E+00 -3.953318243218E-01 6.335378984673E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.604798986576E-01 -9.987679452420E-01 0.000000000000E+00 9.008751436704E-01 -1.661299552608E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.822256342234E-02 5.147754086174E-01 0.000000000000E+00 -3.983107437920E-01 6.275407394557E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.773597054833E-01 -9.774410488615E-01 0.000000000000E+00 9.097344257530E-01 -1.647629578851E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -9.122578298032E-02 5.060865614705E-01 0.000000000000E+00 -4.010702551290E-01 6.215019243757E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.499709631961E-01 -1.407804825609E+00 0.000000000000E+00 -2.510048745846E-01 -1.126831899443E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.198877710650E-01 8.540221258752E-01 0.000000000000E+00 -1.581415787584E-01 8.356555452289E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.008852700350E-01 -1.382412534970E+00 0.000000000000E+00 -2.199526740669E-01 -1.107682349992E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.997812468949E-01 8.461455950426E-01 0.000000000000E+00 -1.661509452276E-01 8.300725581625E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.529689987448E-01 -1.357092246711E+00 0.000000000000E+00 -1.887780769118E-01 -1.090690459998E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.795074839176E-01 8.381303291264E-01 0.000000000000E+00 -1.742097893211E-01 8.245377470251E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.062684693850E-01 -1.331873731374E+00 0.000000000000E+00 -1.576158689824E-01 -1.075649572727E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.590953946863E-01 8.299843125438E-01 0.000000000000E+00 -1.823025801840E-01 8.190488712626E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.608218156857E-01 -1.306784462535E+00 0.000000000000E+00 -1.265882489580E-01 -1.062364322767E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.385731237420E-01 8.217154294984E-01 0.000000000000E+00 -1.904140537824E-01 8.136031383811E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.166596137006E-01 -1.281849721824E+00 0.000000000000E+00 -9.580547193356E-02 -1.050650804506E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.179680271387E-01 8.133314560523E-01 0.000000000000E+00 -1.985292621255E-01 8.081972974981E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.738054868131E-01 -1.257092703887E+00 0.000000000000E+00 -6.536650556075E-02 -1.040336586807E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.973066554219E-01 8.048400529989E-01 0.000000000000E+00 -2.066336159603E-01 8.028277250052E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.322766851831E-01 -1.232534620460E+00 0.000000000000E+00 -3.535968989159E-02 -1.031260602735E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.766147397098E-01 7.962487594750E-01 0.000000000000E+00 -2.147129215316E-01 7.974905026976E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.920846381198E-01 -1.208194803229E+00 0.000000000000E+00 -5.863393542995E-03 -1.023272938992E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.559171805702E-01 7.875649872517E-01 0.000000000000E+00 -2.227534119615E-01 7.921814887481E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.532354783245E-01 -1.184090804972E+00 0.000000000000E+00 2.305333985374E-02 -1.016234545981E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.352380394179E-01 7.787960156523E-01 0.000000000000E+00 -2.307417737596E-01 7.868963819185E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.157305374049E-01 -1.160238498472E+00 0.000000000000E+00 5.133015978410E-02 -1.010016886243E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.146005321960E-01 7.699489870455E-01 0.000000000000E+00 -2.386651689345E-01 7.816307794010E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.795668124859E-01 -1.136652172828E+00 0.000000000000E+00 7.891479543787E-02 -1.004501536295E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.940270251297E-01 7.610309028704E-01 0.000000000000E+00 -2.465112531375E-01 7.763802286849E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.447374041136E-01 -1.113344626992E+00 0.000000000000E+00 1.057624637450E-01 -9.995797546006E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.735390323723E-01 7.520486201506E-01 0.000000000000E+00 -2.542681902297E-01 7.711402738348E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.112319259529E-01 -1.090327260242E+00 0.000000000000E+00 1.318353010497E-01 -9.951520263076E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.531572153805E-01 7.430088484609E-01 0.000000000000E+00 -2.619246636316E-01 7.659064965583E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.903688701712E-02 -1.067610159349E+00 0.000000000000E+00 1.571018199339E-01 -9.911275936453E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.329013838828E-01 7.339181473111E-01 0.000000000000E+00 -2.694698847749E-01 7.606745524286E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.813604733215E-02 -1.045202182271E+00 0.000000000000E+00 1.815363921589E-01 -9.874239793403E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.127904983165E-01 7.247829239176E-01 0.000000000000E+00 -2.768935989505E-01 7.554402026128E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.851074802691E-02 -1.023111038266E+00 0.000000000000E+00 2.051187582182E-01 -9.839665091175E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.928426736271E-01 7.156094313324E-01 0.000000000000E+00 -2.841860888160E-01 7.501993414432E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 9.859783096210E-03 -1.001343364382E+00 0.000000000000E+00 2.278335636174E-01 -9.806878382189E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.730751843347E-01 7.064037669067E-01 0.000000000000E+00 -2.913381757987E-01 7.449480201500E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.699814962345E-02 -9.799047982348E-01 0.000000000000E+00 2.496699217688E-01 -9.775274859164E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.535044707834E-01 6.971718710638E-01 0.000000000000E+00 -2.983412196096E-01 7.396824670622E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.292852714334E-02 -9.588000470434E-01 0.000000000000E+00 2.706210030944E-01 -9.744313811922E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.341461464973E-01 6.879195263612E-01 0.000000000000E+00 -3.051871160602E-01 7.343991045617E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 8.767642499606E-02 -9.380329529798E-01 0.000000000000E+00 2.906836498102E-01 -9.713514221308E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.150150065746E-01 6.786523568233E-01 0.000000000000E+00 -3.118682933561E-01 7.290945630637E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.112684692112E-01 -9.176065548416E-01 0.000000000000E+00 3.098580159820E-01 -9.682450509584E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.961250370568E-01 6.693758275266E-01 0.000000000000E+00 -3.183777070242E-01 7.237656922794E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.337322052708E-01 -8.975231462280E-01 0.000000000000E+00 3.281472321246E-01 -9.650748462424E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.774894252136E-01 6.600952444216E-01 0.000000000000E+00 -3.247088336155E-01 7.184095699993E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.550959196516E-01 -8.777843302313E-01 0.000000000000E+00 3.455570934873E-01 -9.618081333030E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.591205706885E-01 6.508157543776E-01 0.000000000000E+00 -3.308556633109E-01 7.130235086244E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.753884790128E-01 -8.583910709037E-01 0.000000000000E+00 3.620957712608E-01 -9.584166135860E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.410300974541E-01 6.415423454360E-01 0.000000000000E+00 -3.368126915474E-01 7.076050596556E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.946391859265E-01 -8.393437415203E-01 0.000000000000E+00 3.777735456845E-01 -9.548760133736E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.232288665238E-01 6.322798472609E-01 0.000000000000E+00 -3.425749097699E-01 7.021520163365E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.128776497862E-01 -8.206421699263E-01 0.000000000000E+00 3.926025600596E-01 -9.511657519940E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.057269893745E-01 6.230329317742E-01 0.000000000000E+00 -3.481377954055E-01 6.966624146366E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.301336715492E-01 -8.022856810801E-01 0.000000000000E+00 4.065965944492E-01 -9.472686293891E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 8.853384202950E-02 6.138061139657E-01 0.000000000000E+00 -3.534973011486E-01 6.911345327431E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.464371408557E-01 -7.842731369374E-01 0.000000000000E+00 4.197708578339E-01 -9.431705327070E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 7.165807975695E-02 6.046037528669E-01 0.000000000000E+00 -3.586498436375E-01 6.855668892221E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.618179440648E-01 -7.666029739804E-01 0.000000000000E+00 4.321417975117E-01 -9.388601614266E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.510765233715E-02 5.954300526809E-01 0.000000000000E+00 -3.635922915978E-01 6.799582399973E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.763058819881E-01 -7.492732384016E-01 0.000000000000E+00 4.437269243840E-01 -9.343287703559E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.888981985235E-02 5.862890640569E-01 0.000000000000E+00 -3.683219535213E-01 6.743075742827E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.899305960721E-01 -7.322816191373E-01 0.000000000000E+00 4.545446529126E-01 -9.295699297630E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.301116895474E-02 5.771846855033E-01 0.000000000000E+00 -3.728365649436E-01 6.686141095966E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.027215019468E-01 -7.156254789791E-01 0.000000000000E+00 4.646141545926E-01 -9.245793018689E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 7.477629567375E-03 5.681206649291E-01 0.000000000000E+00 -3.771342753806E-01 6.628772859753E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.147077295069E-01 -6.993018837688E-01 0.000000000000E+00 4.739552237659E-01 -9.193544328406E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.705508026197E-03 5.591006013071E-01 0.000000000000E+00 -3.812136349785E-01 6.570967594935E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.259180687675E-01 -6.833076298556E-01 0.000000000000E+00 4.825881548037E-01 -9.138945594615E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.253357574764E-02 5.501279464514E-01 0.000000000000E+00 -3.850735809285E-01 6.512723951928E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.363809209404E-01 -6.676392698838E-01 0.000000000000E+00 4.905336297320E-01 -9.082004296773E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.700250998808E-02 5.412060069005E-01 0.000000000000E+00 -3.887134236955E-01 6.454042595106E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.461242542967E-01 -6.522931371295E-01 0.000000000000E+00 4.978126155119E-01 -9.022741362373E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.110883361384E-02 5.323379459005E-01 0.000000000000E+00 -3.921328331034E-01 6.394926122924E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.551755644448E-01 -6.372653682894E-01 0.000000000000E+00 5.044462702348E-01 -8.961189626391E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.484963775560E-02 5.235267854812E-01 0.000000000000E+00 -3.953318243218E-01 6.335378984673E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.635618387563E-01 -6.225519249351E-01 0.000000000000E+00 5.104558576542E-01 -8.897392406824E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.822256342234E-02 5.147754086174E-01 0.000000000000E+00 -3.983107437920E-01 6.275407394557E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.713095248301E-01 -6.081486136134E-01 0.000000000000E+00 5.158626694224E-01 -8.831402189642E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -9.122578298032E-02 5.060865614705E-01 0.000000000000E+00 -4.010702551290E-01 6.215019243757E-01 Spline diff --git a/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_N-C.skf b/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_N-C.skf index 5530d5b4..63c0aa96 100644 --- a/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_N-C.skf +++ b/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_N-C.skf @@ -29,46 +29,46 @@ 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.101706788670E+00 -2.069198895714E+00 0.000000000000E+00 4.147329888337E-01 -2.160266691709E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.198877710650E-01 8.540221258752E-01 0.000000000000E+00 -2.875941234784E-01 8.356555452289E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.035604037164E+00 -2.036769166663E+00 0.000000000000E+00 4.560089172684E-01 -2.131574442006E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.997812468949E-01 8.461455950426E-01 0.000000000000E+00 -2.976317873632E-01 8.300725581625E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -9.706079780336E-01 -2.004318457157E+00 0.000000000000E+00 4.968349799574E-01 -2.105415198511E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.795074839176E-01 8.381303291264E-01 0.000000000000E+00 -3.075671899710E-01 8.245377470251E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -9.067874847378E-01 -1.971883433061E+00 0.000000000000E+00 5.370960385677E-01 -2.081557842129E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.590953946863E-01 8.299843125438E-01 0.000000000000E+00 -3.173872390115E-01 8.190488712626E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -8.442026466260E-01 -1.939498306597E+00 0.000000000000E+00 5.766887767813E-01 -2.059782508249E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.385731237420E-01 8.217154294984E-01 0.000000000000E+00 -3.270792957787E-01 8.136031383811E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.829053979450E-01 -1.907194946685E+00 0.000000000000E+00 6.155210251269E-01 -2.039880956802E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.179680271387E-01 8.133314560523E-01 0.000000000000E+00 -3.366312077494E-01 8.081972974981E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.229401182989E-01 -1.875002988276E+00 0.000000000000E+00 6.535110857705E-01 -2.021656753635E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.973066554219E-01 8.048400529989E-01 0.000000000000E+00 -3.460313353389E-01 8.028277250052E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.643442037081E-01 -1.842949939918E+00 0.000000000000E+00 6.905870648545E-01 -2.004925297399E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.766147397098E-01 7.962487594750E-01 0.000000000000E+00 -3.552685733560E-01 7.974905026976E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.071486077453E-01 -1.811061289285E+00 0.000000000000E+00 7.266862184728E-01 -1.989513721130E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.559171805702E-01 7.875649872517E-01 0.000000000000E+00 -3.643323676720E-01 7.921814887481E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.513783525983E-01 -1.779360606278E+00 0.000000000000E+00 7.617543170819E-01 -1.975260693279E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.352380394179E-01 7.787960156523E-01 0.000000000000E+00 -3.732127275833E-01 7.868963819185E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.970530102772E-01 -1.747869643240E+00 0.000000000000E+00 7.957450320351E-01 -1.962016139145E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.146005321960E-01 7.699489870455E-01 0.000000000000E+00 -3.819002343166E-01 7.816307794010E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.441871545069E-01 -1.716608432041E+00 0.000000000000E+00 8.286193469467E-01 -1.949640900445E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.940270251297E-01 7.610309028704E-01 0.000000000000E+00 -3.903860460917E-01 7.763802286849E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.927907841194E-01 -1.685595377914E+00 0.000000000000E+00 8.603449957500E-01 -1.938006348021E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.735390323723E-01 7.520486201506E-01 0.000000000000E+00 -3.986619001258E-01 7.711402738348E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.428697189705E-01 -1.654847349867E+00 0.000000000000E+00 8.908959286081E-01 -1.926993960213E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.531572153805E-01 7.430088484609E-01 0.000000000000E+00 -4.067201119280E-01 7.659064965583E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.944259695495E-01 -1.624379767490E+00 0.000000000000E+00 9.202518062507E-01 -1.916494877419E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.329013838828E-01 7.339181473111E-01 0.000000000000E+00 -4.145535722080E-01 7.606745524286E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.474580815300E-01 -1.594206684073E+00 0.000000000000E+00 9.483975228141E-01 -1.906409441514E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.127904983165E-01 7.247829239176E-01 0.000000000000E+00 -4.221557416876E-01 7.554402026128E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.019614565234E-01 -1.564340865998E+00 0.000000000000E+00 9.753227569043E-01 -1.896646727373E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.928426736271E-01 7.156094313324E-01 0.000000000000E+00 -4.295206440825E-01 7.501993414432E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.579286502828E-01 -1.534793868420E+00 0.000000000000E+00 1.001021550323E+00 -1.887124072370E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.730751843347E-01 7.064037669067E-01 0.000000000000E+00 -4.366428574925E-01 7.449480201500E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.153496493831E-01 -1.505576107211E+00 0.000000000000E+00 1.025491913624E+00 -1.877766608665E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.535044707834E-01 6.971718710638E-01 0.000000000000E+00 -4.435175044156E-01 7.396824670622E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.421212753325E-02 -1.476696927167E+00 0.000000000000E+00 1.048735457666E+00 -1.868506802155E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.341461464973E-01 6.879195263612E-01 0.000000000000E+00 -4.501402405821E-01 7.343991045617E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.450168297205E-02 -1.448164666600E+00 0.000000000000E+00 1.070757050398E+00 -1.859284001246E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.150150065746E-01 6.786523568233E-01 0.000000000000E+00 -4.565072427798E-01 7.290945630637E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.797943117486E-03 -1.419986718341E+00 0.000000000000E+00 1.091564497623E+00 -1.850043997902E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.961250370568E-01 6.693758275266E-01 0.000000000000E+00 -4.626151958303E-01 7.237656922794E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.070466585334E-02 -1.392169587376E+00 0.000000000000E+00 1.111168246875E+00 -1.840738602949E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.774894252136E-01 6.600952444216E-01 0.000000000000E+00 -4.684612788514E-01 7.184095699993E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 7.623787258378E-02 -1.364718945139E+00 0.000000000000E+00 1.129581113368E+00 -1.831325237084E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.591205706885E-01 6.508157543776E-01 0.000000000000E+00 -4.740431509346E-01 7.130235086244E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.104182544628E-01 -1.337639680751E+00 0.000000000000E+00 1.146818026880E+00 -1.821766538712E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.410300974541E-01 6.415423454360E-01 0.000000000000E+00 -4.793589363441E-01 7.076050596556E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.432676526761E-01 -1.310935949231E+00 0.000000000000E+00 1.162895798465E+00 -1.812029989284E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.232288665238E-01 6.322798472609E-01 0.000000000000E+00 -4.844072093403E-01 7.021520163365E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.748089180800E-01 -1.284611216994E+00 0.000000000000E+00 1.177832905786E+00 -1.802087556599E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.057269893745E-01 6.230329317742E-01 0.000000000000E+00 -4.891869787115E-01 6.966624146366E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.050657830411E-01 -1.258668304726E+00 0.000000000000E+00 1.191649295860E+00 -1.791915356184E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 8.853384202950E-02 6.138061139657E-01 0.000000000000E+00 -4.936976720950E-01 6.911345327431E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.340627441576E-01 -1.233109427810E+00 0.000000000000E+00 1.204366203915E+00 -1.781493330645E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 7.165807975695E-02 6.046037528669E-01 0.000000000000E+00 -4.979391201548E-01 6.855668892221E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.618249545466E-01 -1.207936234600E+00 0.000000000000E+00 1.216005987059E+00 -1.770804946713E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.510765233715E-02 5.954300526809E-01 0.000000000000E+00 -5.019115406776E-01 6.799582399973E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.883781246208E-01 -1.183149842540E+00 0.000000000000E+00 1.226591971566E+00 -1.759836909514E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.888981985235E-02 5.862890640569E-01 0.000000000000E+00 -5.056155226427E-01 6.743075742827E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.137484302454E-01 -1.158750872332E+00 0.000000000000E+00 1.236148312574E+00 -1.748578893506E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.301116895474E-02 5.771846855033E-01 0.000000000000E+00 -5.090520103117E-01 6.686141095966E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.379624273348E-01 -1.134739480375E+00 0.000000000000E+00 1.244699865064E+00 -1.737023289459E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 7.477629567375E-03 5.681206649291E-01 0.000000000000E+00 -5.122222873828E-01 6.628772859753E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.610469721872E-01 -1.111115389457E+00 0.000000000000E+00 1.252272065156E+00 -1.725164966775E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.705508026197E-03 5.591006013071E-01 0.000000000000E+00 -5.151279612474E-01 6.570967594935E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.830291469310E-01 -1.087877917895E+00 0.000000000000E+00 1.258890820784E+00 -1.713001050444E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.253357574764E-02 5.501279464514E-01 0.000000000000E+00 -5.177709473807E-01 6.512723951928E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.039361896505E-01 -1.065026007159E+00 0.000000000000E+00 1.264582410995E+00 -1.700530711972E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.700250998808E-02 5.412060069005E-01 0.000000000000E+00 -5.201534538983E-01 6.454042595106E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.237954288748E-01 -1.042558248204E+00 0.000000000000E+00 1.269373393148E+00 -1.687754973595E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.110883361384E-02 5.323379459005E-01 0.000000000000E+00 -5.222779663036E-01 6.394926122924E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.426342221681E-01 -1.020472906398E+00 0.000000000000E+00 1.273290517449E+00 -1.674676525094E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.484963775560E-02 5.235267854812E-01 0.000000000000E+00 -5.241472324499E-01 6.335378984673E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.604798986576E-01 -9.987679452420E-01 0.000000000000E+00 1.276360648280E+00 -1.661299552608E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.822256342234E-02 5.147754086174E-01 0.000000000000E+00 -5.257642477376E-01 6.275407394557E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.773597054833E-01 -9.774410488615E-01 0.000000000000E+00 1.278610691904E+00 -1.647629578851E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -9.122578298032E-02 5.060865614705E-01 0.000000000000E+00 -5.271322405648E-01 6.215019243757E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.499709631961E-01 -1.407804825609E+00 0.000000000000E+00 1.550541298113E-01 -1.126831899443E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.198877710650E-01 8.540221258752E-01 0.000000000000E+00 -2.875941234784E-01 8.356555452289E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.008852700350E-01 -1.382412534970E+00 0.000000000000E+00 1.846719714440E-01 -1.107682349992E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.997812468949E-01 8.461455950426E-01 0.000000000000E+00 -2.976317873632E-01 8.300725581625E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.529689987448E-01 -1.357092246711E+00 0.000000000000E+00 2.139544507595E-01 -1.090690459998E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.795074839176E-01 8.381303291264E-01 0.000000000000E+00 -3.075671899710E-01 8.245377470251E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.062684693850E-01 -1.331873731374E+00 0.000000000000E+00 2.428069346189E-01 -1.075649572727E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.590953946863E-01 8.299843125438E-01 0.000000000000E+00 -3.173872390115E-01 8.190488712626E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.608218156857E-01 -1.306784462535E+00 0.000000000000E+00 2.711452125295E-01 -1.062364322767E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.385731237420E-01 8.217154294984E-01 0.000000000000E+00 -3.270792957787E-01 8.136031383811E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.166596137006E-01 -1.281849721824E+00 0.000000000000E+00 2.988948834058E-01 -1.050650804506E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.179680271387E-01 8.133314560523E-01 0.000000000000E+00 -3.366312077494E-01 8.081972974981E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.738054868131E-01 -1.257092703887E+00 0.000000000000E+00 3.259907411874E-01 -1.040336586807E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.973066554219E-01 8.048400529989E-01 0.000000000000E+00 -3.460313353389E-01 8.028277250052E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.322766851831E-01 -1.232534620460E+00 0.000000000000E+00 3.523761660673E-01 -1.031260602735E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.766147397098E-01 7.962487594750E-01 0.000000000000E+00 -3.552685733560E-01 7.974905026976E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.920846381198E-01 -1.208194803229E+00 0.000000000000E+00 3.780025268718E-01 -1.023272938992E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.559171805702E-01 7.875649872517E-01 0.000000000000E+00 -3.643323676720E-01 7.921814887481E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.532354783245E-01 -1.184090804972E+00 0.000000000000E+00 4.028285990763E-01 -1.016234545981E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.352380394179E-01 7.787960156523E-01 0.000000000000E+00 -3.732127275833E-01 7.868963819185E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.157305374049E-01 -1.160238498472E+00 0.000000000000E+00 4.268200020011E-01 -1.010016886243E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.146005321960E-01 7.699489870455E-01 0.000000000000E+00 -3.819002343166E-01 7.816307794010E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.795668124859E-01 -1.136652172828E+00 0.000000000000E+00 4.499486578785E-01 -1.004501536295E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.940270251297E-01 7.610309028704E-01 0.000000000000E+00 -3.903860460917E-01 7.763802286849E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.447374041136E-01 -1.113344626992E+00 0.000000000000E+00 4.721922747359E-01 -9.995797546006E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.735390323723E-01 7.520486201506E-01 0.000000000000E+00 -3.986619001258E-01 7.711402738348E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.112319259529E-01 -1.090327260242E+00 0.000000000000E+00 4.935338543984E-01 -9.951520263076E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.531572153805E-01 7.430088484609E-01 0.000000000000E+00 -4.067201119280E-01 7.659064965583E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.903688701712E-02 -1.067610159349E+00 0.000000000000E+00 5.139612263679E-01 -9.911275936453E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.329013838828E-01 7.339181473111E-01 0.000000000000E+00 -4.145535722080E-01 7.606745524286E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.813604733215E-02 -1.045202182271E+00 0.000000000000E+00 5.334666078691E-01 -9.874239793403E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.127904983165E-01 7.247829239176E-01 0.000000000000E+00 -4.221557416876E-01 7.554402026128E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.851074802691E-02 -1.023111038266E+00 0.000000000000E+00 5.520461900009E-01 -9.839665091175E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.928426736271E-01 7.156094313324E-01 0.000000000000E+00 -4.295206440825E-01 7.501993414432E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 9.859783096210E-03 -1.001343364382E+00 0.000000000000E+00 5.696997496575E-01 -9.806878382189E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.730751843347E-01 7.064037669067E-01 0.000000000000E+00 -4.366428574925E-01 7.449480201500E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.699814962345E-02 -9.799047982348E-01 0.000000000000E+00 5.864302865963E-01 -9.775274859164E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.535044707834E-01 6.971718710638E-01 0.000000000000E+00 -4.435175044156E-01 7.396824670622E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.292852714334E-02 -9.588000470434E-01 0.000000000000E+00 6.022436850352E-01 -9.744313811922E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.341461464973E-01 6.879195263612E-01 0.000000000000E+00 -4.501402405821E-01 7.343991045617E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 8.767642499606E-02 -9.380329529798E-01 0.000000000000E+00 6.171483991755E-01 -9.713514221308E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.150150065746E-01 6.786523568233E-01 0.000000000000E+00 -4.565072427798E-01 7.290945630637E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.112684692112E-01 -9.176065548416E-01 0.000000000000E+00 6.311551616090E-01 -9.682450509584E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.961250370568E-01 6.693758275266E-01 0.000000000000E+00 -4.626151958303E-01 7.237656922794E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.337322052708E-01 -8.975231462280E-01 0.000000000000E+00 6.442767138489E-01 -9.650748462424E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.774894252136E-01 6.600952444216E-01 0.000000000000E+00 -4.684612788514E-01 7.184095699993E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.550959196516E-01 -8.777843302313E-01 0.000000000000E+00 6.565275581137E-01 -9.618081333030E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.591205706885E-01 6.508157543776E-01 0.000000000000E+00 -4.740431509346E-01 7.130235086244E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.753884790128E-01 -8.583910709037E-01 0.000000000000E+00 6.679237293238E-01 -9.584166135860E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.410300974541E-01 6.415423454360E-01 0.000000000000E+00 -4.793589363441E-01 7.076050596556E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.946391859265E-01 -8.393437415203E-01 0.000000000000E+00 6.784825863091E-01 -9.548760133736E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.232288665238E-01 6.322798472609E-01 0.000000000000E+00 -4.844072093403E-01 7.021520163365E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.128776497862E-01 -8.206421699263E-01 0.000000000000E+00 6.882226210923E-01 -9.511657519940E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.057269893745E-01 6.230329317742E-01 0.000000000000E+00 -4.891869787115E-01 6.966624146366E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.301336715492E-01 -8.022856810801E-01 0.000000000000E+00 6.971632851174E-01 -9.472686293891E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 8.853384202950E-02 6.138061139657E-01 0.000000000000E+00 -4.936976720950E-01 6.911345327431E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.464371408557E-01 -7.842731369374E-01 0.000000000000E+00 7.053248311741E-01 -9.431705327070E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 7.165807975695E-02 6.046037528669E-01 0.000000000000E+00 -4.979391201548E-01 6.855668892221E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.618179440648E-01 -7.666029739804E-01 0.000000000000E+00 7.127281697446E-01 -9.388601614266E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.510765233715E-02 5.954300526809E-01 0.000000000000E+00 -5.019115406776E-01 6.799582399973E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.763058819881E-01 -7.492732384016E-01 0.000000000000E+00 7.193947386303E-01 -9.343287703559E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.888981985235E-02 5.862890640569E-01 0.000000000000E+00 -5.056155226427E-01 6.743075742827E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.899305960721E-01 -7.322816191373E-01 0.000000000000E+00 7.253463846543E-01 -9.295699297630E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.301116895474E-02 5.771846855033E-01 0.000000000000E+00 -5.090520103117E-01 6.686141095966E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.027215019468E-01 -7.156254789791E-01 0.000000000000E+00 7.306052563308E-01 -9.245793018689E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 7.477629567375E-03 5.681206649291E-01 0.000000000000E+00 -5.122222873828E-01 6.628772859753E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.147077295069E-01 -6.993018837688E-01 0.000000000000E+00 7.351937065363E-01 -9.193544328406E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.705508026197E-03 5.591006013071E-01 0.000000000000E+00 -5.151279612474E-01 6.570967594935E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.259180687675E-01 -6.833076298556E-01 0.000000000000E+00 7.391342042584E-01 -9.138945594615E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.253357574764E-02 5.501279464514E-01 0.000000000000E+00 -5.177709473807E-01 6.512723951928E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.363809209404E-01 -6.676392698838E-01 0.000000000000E+00 7.424492546381E-01 -9.082004296773E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.700250998808E-02 5.412060069005E-01 0.000000000000E+00 -5.201534538983E-01 6.454042595106E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.461242542967E-01 -6.522931371295E-01 0.000000000000E+00 7.451613265942E-01 -9.022741362373E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.110883361384E-02 5.323379459005E-01 0.000000000000E+00 -5.222779663036E-01 6.394926122924E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.551755644448E-01 -6.372653682894E-01 0.000000000000E+00 7.472927874446E-01 -8.961189626391E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.484963775560E-02 5.235267854812E-01 0.000000000000E+00 -5.241472324499E-01 6.335378984673E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.635618387563E-01 -6.225519249351E-01 0.000000000000E+00 7.488658439668E-01 -8.897392406824E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.822256342234E-02 5.147754086174E-01 0.000000000000E+00 -5.257642477376E-01 6.275407394557E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.713095248301E-01 -6.081486136134E-01 0.000000000000E+00 7.499024894687E-01 -8.831402189642E-01 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -9.122578298032E-02 5.060865614705E-01 0.000000000000E+00 -5.271322405648E-01 6.215019243757E-01 Spline diff --git a/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_N-N.skf b/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_N-N.skf index f020b5de..daa9db7b 100644 --- a/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_N-N.skf +++ b/test/prog/sktable/HYB-B3LYP/Non-Relativistic/_N-N.skf @@ -30,46 +30,46 @@ 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.149363512315E+00 -2.460131078390E+00 0.000000000000E+00 2.961042403064E-01 -2.496708407806E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.779962733466E-01 8.457774438375E-01 0.000000000000E+00 -2.491001891901E-01 8.394645231493E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.064172728119E+00 -2.416309635984E+00 0.000000000000E+00 3.490707786496E-01 -2.466584350100E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.556239548434E-01 8.367788259385E-01 0.000000000000E+00 -2.588843615927E-01 8.333510629348E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -9.808702383195E-01 -2.372595382599E+00 0.000000000000E+00 4.013651599257E-01 -2.439182432810E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.331470612983E-01 8.276417618551E-01 0.000000000000E+00 -2.685905881998E-01 8.272857695048E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -8.995306484745E-01 -2.329037013268E+00 0.000000000000E+00 4.528248903253E-01 -2.414201414265E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.105999006627E-01 8.183761914374E-01 0.000000000000E+00 -2.782017862842E-01 8.212643949920E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -8.202160646392E-01 -2.285679461566E+00 0.000000000000E+00 5.033059889868E-01 -2.391359235380E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.880156017489E-01 8.089918768978E-01 0.000000000000E+00 -2.877015385349E-01 8.152822396725E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.429771353375E-01 -2.242564099063E+00 0.000000000000E+00 5.526817607001E-01 -2.370392940175E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.654261002934E-01 7.994983942891E-01 0.000000000000E+00 -2.970741307313E-01 8.093342622178E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.678540317960E-01 -2.199728930064E+00 0.000000000000E+00 6.008415935481E-01 -2.351058386094E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.428621293022E-01 7.899051260750E-01 0.000000000000E+00 -3.063045813917E-01 8.034151786986E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.948773667210E-01 -2.157208780839E+00 0.000000000000E+00 6.476897917036E-01 -2.333129789971E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.203532131914E-01 7.802212546976E-01 0.000000000000E+00 -3.153786642667E-01 7.975195510366E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.240690527274E-01 -2.115035482680E+00 0.000000000000E+00 6.931444510173E-01 -2.316399147999E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.979276653028E-01 7.704557570512E-01 0.000000000000E+00 -3.242829244801E-01 7.916418655997E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.554431021913E-01 -2.073238048291E+00 0.000000000000E+00 7.371363828422E-01 -2.300675561633E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.756125884295E-01 7.606173997822E-01 0.000000000000E+00 -3.330046890471E-01 7.857766026280E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.890063707895E-01 -2.031842841127E+00 0.000000000000E+00 7.796080897026E-01 -2.285784495906E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.534338780392E-01 7.507147353413E-01 0.000000000000E+00 -3.415320724370E-01 7.799182971602E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.247592473100E-01 -1.990873737387E+00 0.000000000000E+00 8.205127948977E-01 -2.271566992031E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.314162279245E-01 7.407560987222E-01 0.000000000000E+00 -3.498539777789E-01 7.740615921097E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.626962924569E-01 -1.950352280488E+00 0.000000000000E+00 8.598135269294E-01 -2.257878852153E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.095831380495E-01 7.307496048271E-01 0.000000000000E+00 -3.579600942556E-01 7.682012841104E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.028068293719E-01 -1.910297827915E+00 0.000000000000E+00 8.974822587132E-01 -2.244589810852E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.879569243913E-01 7.207031464064E-01 0.000000000000E+00 -3.658408911696E-01 7.623323627244E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.450754884766E-01 -1.870727690427E+00 0.000000000000E+00 9.334991008617E-01 -2.231582705148E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.665587306042E-01 7.106243925233E-01 0.000000000000E+00 -3.734876091183E-01 7.564500435741E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -8.948270907348E-02 -1.831657263684E+00 0.000000000000E+00 9.678515478554E-01 -2.218752652481E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.454085413545E-01 7.005207875017E-01 0.000000000000E+00 -3.808922486678E-01 7.505497959291E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.600520000248E-02 -1.793100152429E+00 0.000000000000E+00 1.000533775594E+00 -2.206006244169E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.245251971942E-01 6.903995503181E-01 0.000000000000E+00 -3.880475568706E-01 7.446273652458E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.538363842917E-02 -1.755068287443E+00 0.000000000000E+00 1.031545988589E+00 -2.193260760272E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.039264108549E-01 6.802676744024E-01 0.000000000000E+00 -3.949470119379E-01 7.386787911287E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.471332902814E-02 -1.717572035528E+00 0.000000000000E+00 1.060893814885E+00 -2.180443410416E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.836287848554E-01 6.701319278177E-01 0.000000000000E+00 -4.015848063388E-01 7.327004211514E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.120159664933E-01 -1.680620302863E+00 0.000000000000E+00 1.088587746609E+00 -2.167490604021E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.636478303280E-01 6.599988537895E-01 0.000000000000E+00 -4.079558285711E-01 7.266889209443E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.573258979529E-01 -1.644220632060E+00 0.000000000000E+00 1.114642623917E+00 -2.154347252369E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.439979869716E-01 6.498747715594E-01 0.000000000000E+00 -4.140556438198E-01 7.206412809301E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.006794326142E-01 -1.608379293339E+00 0.000000000000E+00 1.139077159894E+00 -2.140966104107E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.246926440492E-01 6.397657775399E-01 0.000000000000E+00 -4.198804736938E-01 7.145548200596E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.421145777580E-01 -1.573101370166E+00 0.000000000000E+00 1.161913503847E+00 -2.127307115056E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.057441623501E-01 6.296777467497E-01 0.000000000000E+00 -4.254271752122E-01 7.084271868748E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.816707983698E-01 -1.538390839787E+00 0.000000000000E+00 1.183176840281E+00 -2.113336852551E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 8.716389703854E-02 6.196163345084E-01 0.000000000000E+00 -4.306932191905E-01 7.022563582027E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.193887979102E-01 -1.504250648953E+00 0.000000000000E+00 1.202895020860E+00 -2.099027934071E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.896222131592E-02 6.095869783746E-01 0.000000000000E+00 -4.356766681609E-01 6.960406357578E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.553103169181E-01 -1.470682785265E+00 0.000000000000E+00 1.221098226760E+00 -2.084358499389E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.114855082336E-02 5.995949003093E-01 0.000000000000E+00 -4.403761539459E-01 6.897786409126E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.894779479824E-01 -1.437688344380E+00 0.000000000000E+00 1.237818658784E+00 -2.069311715349E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.373136871269E-02 5.896451090490E-01 0.000000000000E+00 -4.447908549914E-01 6.834693078726E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.219349651739E-01 -1.405267593418E+00 0.000000000000E+00 1.253090252845E+00 -2.053875312099E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.671825131567E-02 5.797424026748E-01 0.000000000000E+00 -4.489204735531E-01 6.771118754727E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.527251660980E-01 -1.373420030805E+00 0.000000000000E+00 1.266948418672E+00 -2.038041149449E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.158943417267E-04 5.698913713622E-01 0.000000000000E+00 -4.527652128225E-01 6.707058777964E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.818927253126E-01 -1.342144442789E+00 0.000000000000E+00 1.279429799799E+00 -2.021804811962E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.606986046478E-02 5.600964003004E-01 0.000000000000E+00 -4.563257540653E-01 6.642511337986E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.094820583974E-01 -1.311438956821E+00 0.000000000000E+00 1.290572053082E+00 -2.005165231466E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.183399827590E-02 5.503616727660E-01 0.000000000000E+00 -4.596032338417E-01 6.577477361006E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.355376958885E-01 -1.281301092035E+00 0.000000000000E+00 1.300413646252E+00 -1.988124335619E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.717230380698E-02 5.406911733417E-01 0.000000000000E+00 -4.625992213678E-01 6.511960391079E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.601041665603E-01 -1.251727806919E+00 0.000000000000E+00 1.308993672172E+00 -1.970686721198E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.208133368554E-02 5.310886912661E-01 0.000000000000E+00 -4.653156960729E-01 6.445966465895E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.832258896636E-01 -1.222715544364E+00 0.000000000000E+00 1.316351678656E+00 -1.952859350856E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.655838862662E-02 5.215578239059E-01 0.000000000000E+00 -4.677550254007E-01 6.379503988447E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.049470757964E-01 -1.194260274240E+00 0.000000000000E+00 1.322527512817E+00 -1.934651272112E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -9.060148547839E-02 5.121019803373E-01 0.000000000000E+00 -4.699199428985E-01 6.312583595694E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.253116361450E-01 -1.166357533576E+00 0.000000000000E+00 1.327561179012E+00 -1.916073357419E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.042093291997E-01 5.027243850281E-01 0.000000000000E+00 -4.718135266329E-01 6.245218025252E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.443630998143E-01 -1.139002464482E+00 0.000000000000E+00 1.331492709549E+00 -1.897138064163E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.173812848295E-01 4.934280816097E-01 0.000000000000E+00 -4.734391779676E-01 6.177421981021E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.621445389689E-01 -1.112189849896E+00 0.000000000000E+00 1.334362047366E+00 -1.877859213517E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.301173495069E-01 4.842159367293E-01 0.000000000000E+00 -4.748006007332E-01 6.109211998585E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.786985014741E-01 -1.085914147289E+00 0.000000000000E+00 1.336208939942E+00 -1.858251787085E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.424181245969E-01 4.750906439730E-01 0.000000000000E+00 -4.759017808195E-01 6.040606311103E-01 - 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.940669507247E-01 -1.060169520381E+00 0.000000000000E+00 1.337072843750E+00 -1.838331740325E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.542847879758E-01 4.660547278504E-01 0.000000000000E+00 -4.767469662116E-01 5.971624716347E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.513830126424E-01 -1.676939419260E+00 0.000000000000E+00 5.464825761799E-02 -1.340628456988E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.779962733466E-01 8.457774438375E-01 0.000000000000E+00 -2.491001891901E-01 8.394645231493E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.887720387846E-01 -1.642682473765E+00 0.000000000000E+00 9.420323868044E-02 -1.321329456194E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.556239548434E-01 8.367788259385E-01 0.000000000000E+00 -2.588843615927E-01 8.333510629348E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -5.280524127791E-01 -1.608640690513E+00 0.000000000000E+00 1.331773218900E-01 -1.304355796930E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.331470612983E-01 8.276417618551E-01 0.000000000000E+00 -2.685905881998E-01 8.272857695048E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.692656847614E-01 -1.574852537731E+00 0.000000000000E+00 1.714375880696E-01 -1.289438965631E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.105999006627E-01 8.183761914374E-01 0.000000000000E+00 -2.782017862842E-01 8.212643949920E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.124420010337E-01 -1.541352969198E+00 0.000000000000E+00 2.088678063313E-01 -1.276329048696E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.880156017489E-01 8.089918768978E-01 0.000000000000E+00 -2.877015385349E-01 8.152822396725E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.576011660375E-01 -1.508173619982E+00 0.000000000000E+00 2.453672734850E-01 -1.264794457162E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.654261002934E-01 7.994983942891E-01 0.000000000000E+00 -2.970741307313E-01 8.093342622178E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.047536457162E-01 -1.475342998702E+00 0.000000000000E+00 2.808496747633E-01 -1.254621479816E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.428621293022E-01 7.899051260750E-01 0.000000000000E+00 -3.063045813917E-01 8.034151786986E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.539015109480E-01 -1.442886675322E+00 0.000000000000E+00 3.152419758807E-01 -1.245613704251E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.203532131914E-01 7.802212546976E-01 0.000000000000E+00 -3.153786642667E-01 7.975195510366E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.050393207611E-01 -1.410827463656E+00 0.000000000000E+00 3.484833541309E-01 -1.237591339001E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.979276653028E-01 7.704557570512E-01 0.000000000000E+00 -3.242829244801E-01 7.916418655997E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.581549459177E-01 -1.379185597919E+00 0.000000000000E+00 3.805241742141E-01 -1.230390464384E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.756125884295E-01 7.606173997822E-01 0.000000000000E+00 -3.330046890471E-01 7.857766026280E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.132303341510E-01 -1.347978902759E+00 0.000000000000E+00 4.113250127568E-01 -1.223862234974E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.534338780392E-01 7.507147353413E-01 0.000000000000E+00 -3.415320724370E-01 7.799182971602E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.024221885365E-02 -1.317222956354E+00 0.000000000000E+00 4.408557340348E-01 -1.217872052611E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.314162279245E-01 7.407560987222E-01 0.000000000000E+00 -3.498539777789E-01 7.740615921097E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -2.916277333784E-02 -1.286931246231E+00 0.000000000000E+00 4.690946182250E-01 -1.212298725410E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.095831380495E-01 7.307496048271E-01 0.000000000000E+00 -3.579600942556E-01 7.682012841104E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.003978705292E-02 -1.257115317594E+00 0.000000000000E+00 4.960275425856E-01 -1.207033625306E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.879569243913E-01 7.207031464064E-01 0.000000000000E+00 -3.658408911696E-01 7.623323627244E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.740065267134E-02 -1.227784914023E+00 0.000000000000E+00 5.216472152600E-01 -1.201979854203E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.665587306042E-01 7.106243925233E-01 0.000000000000E+00 -3.734876091183E-01 7.564500435741E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 8.295791486305E-02 -1.198948110504E+00 0.000000000000E+00 5.459524608974E-01 -1.197051426762E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.454085413545E-01 7.005207875017E-01 0.000000000000E+00 -3.808922486678E-01 7.505497959291E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.167521065965E-01 -1.170611438866E+00 0.000000000000E+00 5.689475569124E-01 -1.192172476118E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.245251971942E-01 6.903995503181E-01 0.000000000000E+00 -3.880475568706E-01 7.446273652458E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.488257861742E-01 -1.142780005742E+00 0.000000000000E+00 5.906416189269E-01 -1.187276487405E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.039264108549E-01 6.802676744024E-01 0.000000000000E+00 -3.949470119379E-01 7.386787911287E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.792231617002E-01 -1.115457603279E+00 0.000000000000E+00 6.110480337093E-01 -1.182305562755E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.836287848554E-01 6.701319278177E-01 0.000000000000E+00 -4.015848063388E-01 7.327004211514E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.079897538206E-01 -1.088646812883E+00 0.000000000000E+00 6.301839377087E-01 -1.177209720426E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.636478303280E-01 6.599988537895E-01 0.000000000000E+00 -4.079558285711E-01 7.266889209443E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.351720940782E-01 -1.062349102308E+00 0.000000000000E+00 6.480697390725E-01 -1.171946229791E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.439979869716E-01 6.498747715594E-01 0.000000000000E+00 -4.140556438198E-01 7.206412809301E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.608174559798E-01 -1.036564916462E+00 0.000000000000E+00 6.647286808222E-01 -1.166478983212E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.246926440492E-01 6.397657775399E-01 0.000000000000E+00 -4.198804736938E-01 7.145548200596E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 2.849736157274E-01 -1.011293762287E+00 0.000000000000E+00 6.801864426657E-01 -1.160777905072E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.057441623501E-01 6.296777467497E-01 0.000000000000E+00 -4.254271752122E-01 7.084271868748E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.076886396039E-01 -9.865342881110E-01 0.000000000000E+00 6.944707787883E-01 -1.154818397745E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 8.716389703854E-02 6.196163345084E-01 0.000000000000E+00 -4.306932191905E-01 7.022563582027E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.290106952086E-01 -9.622843578038E-01 0.000000000000E+00 7.076111888925E-01 -1.148580823792E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 6.896222131592E-02 6.095869783746E-01 0.000000000000E+00 -4.356766681609E-01 6.960406357578E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.489878829227E-01 -9.385411201220E-01 0.000000000000E+00 7.196386198915E-01 -1.142050023226E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.114855082336E-02 5.995949003093E-01 0.000000000000E+00 -4.403761539459E-01 6.897786409126E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.676680858304E-01 -9.153010735479E-01 0.000000000000E+00 7.305851955695E-01 -1.135214864576E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.373136871269E-02 5.896451090490E-01 0.000000000000E+00 -4.447908549914E-01 6.834693078726E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 3.850988358832E-01 -8.925601269277E-01 0.000000000000E+00 7.404839717497E-01 -1.128067828255E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.671825131567E-02 5.797424026748E-01 0.000000000000E+00 -4.489204735531E-01 6.771118754727E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.013271941738E-01 -8.703136562053E-01 0.000000000000E+00 7.493687147565E-01 -1.120604620600E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 1.158943417267E-04 5.698913713622E-01 0.000000000000E+00 -4.527652128225E-01 6.707058777964E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.163996437825E-01 -8.485565574679E-01 0.000000000000E+00 7.572737011470E-01 -1.112823816897E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.606986046478E-02 5.600964003004E-01 0.000000000000E+00 -4.563257540653E-01 6.642511337986E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.303619942144E-01 -8.272832965584E-01 0.000000000000E+00 7.642335368616E-01 -1.104726531855E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -3.183399827590E-02 5.503616727660E-01 0.000000000000E+00 -4.596032338417E-01 6.577477361006E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.432592963908E-01 -8.064879554685E-01 0.000000000000E+00 7.702829942069E-01 -1.096316115912E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -4.717230380698E-02 5.406911733417E-01 0.000000000000E+00 -4.625992213678E-01 6.511960391079E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.551357674411E-01 -7.861642756696E-01 0.000000000000E+00 7.754568652562E-01 -1.087597875843E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -6.208133368554E-02 5.310886912661E-01 0.000000000000E+00 -4.653156960729E-01 6.445966465895E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.660347246879E-01 -7.663056985667E-01 0.000000000000E+00 7.797898304142E-01 -1.078578818245E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -7.655838862662E-02 5.215578239059E-01 0.000000000000E+00 -4.677550254007E-01 6.379503988447E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.759985283019E-01 -7.469054032531E-01 0.000000000000E+00 7.833163410283E-01 -1.069267414472E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -9.060148547839E-02 5.121019803373E-01 0.000000000000E+00 -4.699199428985E-01 6.312583595694E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.850685321807E-01 -7.279563416836E-01 0.000000000000E+00 7.860705150267E-01 -1.059673385744E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.042093291997E-01 5.027243850281E-01 0.000000000000E+00 -4.718135266329E-01 6.245218025252E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 4.932850426078E-01 -7.094512714024E-01 0.000000000000E+00 7.880860446568E-01 -1.049807507141E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.173812848295E-01 4.934280816097E-01 0.000000000000E+00 -4.734391779676E-01 6.177421981021E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.006872842615E-01 -6.913827859604E-01 0.000000000000E+00 7.893961154585E-01 -1.039681429291E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.301173495069E-01 4.842159367293E-01 0.000000000000E+00 -4.748006007332E-01 6.109211998585E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.073133731335E-01 -6.737433431542E-01 0.000000000000E+00 7.900333356621E-01 -1.029307516606E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.424181245969E-01 4.750906439730E-01 0.000000000000E+00 -4.759017808195E-01 6.040606311103E-01 + 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 5.132002959252E-01 -6.565252911787E-01 0.000000000000E+00 7.900296752390E-01 -1.018698700958E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00 -1.542847879758E-01 4.660547278504E-01 0.000000000000E+00 -4.767469662116E-01 5.971624716347E-01 Spline From c8c5f7188aa1fa4fb83eabdf6b9cc1e22296a298 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Wed, 24 Apr 2024 17:17:47 +0200 Subject: [PATCH 14/25] Fix upper bound to include principle quantum numbers of 7 (#78) --- sktools/src/sktools/calculators/slateratom.py | 2 +- sktools/src/sktools/skdef.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sktools/src/sktools/calculators/slateratom.py b/sktools/src/sktools/calculators/slateratom.py index 881403c3..c8e18530 100644 --- a/sktools/src/sktools/calculators/slateratom.py +++ b/sktools/src/sktools/calculators/slateratom.py @@ -337,7 +337,7 @@ def write(self, workdir): occ[0], occ[1], self._COMMENT, nn, sc.ANGMOM_TO_SHELL[ll])) # Occupied shell range - occqns = [[sc.MAX_PRINCIPAL_QN, 0],] * (maxang + 1) + occqns = [[sc.MAX_PRINCIPAL_QN + 1, 0],] * (maxang + 1) for qn, occ in self._atomconfig.occshells: nn = qn[0] ll = qn[1] diff --git a/sktools/src/sktools/skdef.py b/sktools/src/sktools/skdef.py index b85e3f59..22bfca39 100644 --- a/sktools/src/sktools/skdef.py +++ b/sktools/src/sktools/skdef.py @@ -305,7 +305,7 @@ def fromhsd(cls, root, query): occnode = query.findchild(root, "occupations") for ll, shellname in enumerate(sc.ANGMOM_TO_SHELL): occ_l = [] - for nn in range(ll + 1, sc.MAX_PRINCIPAL_QN): + for nn in range(ll + 1, sc.MAX_PRINCIPAL_QN + 1): txt = "{:d}{:s}".format(nn, shellname) shelloccnode = query.findchild(occnode, txt, optional=True) if shelloccnode is None: From d444e8dda974d49774634321e18a39936e78caec Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Fri, 26 Apr 2024 15:28:44 +0200 Subject: [PATCH 15/25] Upgrade fypp to version 3.2 --- external/fypp/CHANGELOG.rst | 36 +++- external/fypp/README.rst | 53 ++++- external/fypp/bin/fypp | 392 +++++++++++++++++++++--------------- 3 files changed, 305 insertions(+), 176 deletions(-) diff --git a/external/fypp/CHANGELOG.rst b/external/fypp/CHANGELOG.rst index c80b1d88..88ca7567 100644 --- a/external/fypp/CHANGELOG.rst +++ b/external/fypp/CHANGELOG.rst @@ -3,6 +3,36 @@ Change Log ========== +3.2 +=== + +Added +----- + +* Option ``--file-var-root`` to render file variables (``_FILE_``, + ``_THIS_FILE``) as relative paths with respect to a specified root. + + +3.1 +=== + +Added +----- + +* Global variables _SYSTEM_ and _MACHINE_ to query environment. + +* Emission of standard (#line pragma styled) line directives. + +* Factory method arguments in Fypp constructor: evaluator_factory, + parser_factor, builder_factory and renderer_factory. + + +Changed +------- + +* Support for Python 2.7, 3.3 and 3.4 dropped, support for Python 3.9 added. + + 3.0 === @@ -13,7 +43,7 @@ Added * Add block / contains / endblock construct as alternative for call / nextarg / endcall. - + * Escaping of preprocessor comments * Possibility of specifying character encoding for file I/O with UTF-8 as @@ -104,7 +134,7 @@ Added * Python-like consistent global and local scopes and scope lookup rules. * Predefined variables _THIS_FILE_ and _THIS_LINE_. - + * Additional flags in line numbering directives when opening a file or returning to a previous file. @@ -135,7 +165,7 @@ Changed * Function setvar() accepts arbitrary number of argument pairs. -* Reverse order exception printing, exception first occuring printed as last. +* Reverse order exception printing, exception first occurring printed as last. * Command line tool formats error messages in GNU-like format. diff --git a/external/fypp/README.rst b/external/fypp/README.rst index ef72a359..91b91d28 100644 --- a/external/fypp/README.rst +++ b/external/fypp/README.rst @@ -170,21 +170,52 @@ Main features Installing ========== -Fypp needs a working Python interpreter. It is compatible with Python 2 (version -2.6 and above) and Python 3 (all versions). +Fypp needs a working Python 3 interpreter (Python 3.5 or above). -Automatic install ------------------ +When you install Fypp, you obtain the command line tool ``fypp`` and the Python +module ``fypp.py``. Latter you can import if you want to access the +functionality of Fypp directly from within your Python scripts. -Use Pythons command line installer ``pip`` in order to download the stable -release from the `Fypp page on PyPI `_ and -install it on your system:: - pip install fypp +Installing via conda +-------------------- -This installs both, the command line tool ``fypp`` and the Python module -``fypp.py``. Latter you can import if you want to access the functionality of -Fypp directly from within your Python scripts. +The last stable release of Fypp can be easily installed as conda package by +issuing :: + + conda install -c conda-forge fypp + + +Installing via pip +------------------ + +You can also use Pythons command line installer ``pip`` in order to download the +stable release from the `Fypp page on PyPI `_ +and install it on your system. + +If you want to install Fypp into the module system of the active Python 3 +interpreter (typically the case when you are using a Python virtual +environment), issue :: + + pip3 install fypp + +Alternatively, you can install Fypp into the user space (under `~/.local`) with +:: + + pip3 install --user fypp + + +Installing via MSYS2 pacman +--------------------------- + +On Windows you can use the `MSYS2 toolchain `_ to install +Fypp in a MinGW terminal. To install Fypp use:: + + pacman -S mingw-w64-x86_64-python-fypp + +Make sure the selected architecture is matching your current MinGW terminal. +For all supporting MinGW architectures visit check the package index +`here `_. Manual install diff --git a/external/fypp/bin/fypp b/external/fypp/bin/fypp index 1ea2cc59..42072190 100755 --- a/external/fypp/bin/fypp +++ b/external/fypp/bin/fypp @@ -4,7 +4,7 @@ # # fypp -- Python powered Fortran preprocessor # -# Copyright (c) 2016-2020 Bálint Aradi, Universität Bremen +# Copyright (c) 2016-2023 Bálint Aradi, Universität Bremen # # All rights reserved. # @@ -37,7 +37,7 @@ Python, one usually interacts with the following two classes: * `Fypp`_: The actual Fypp preprocessor. It returns for a given input the preprocessed output. -* `FyppOptions`_: Contains customizable settings controling the behaviour of +* `FyppOptions`_: Contains customizable settings controlling the behaviour of `Fypp`_. Alternatively, the function `get_option_parser()`_ can be used to obtain an option parser, which can create settings based on command line arguments. @@ -50,8 +50,7 @@ subclasses of `FyppError`_ is raised: * FyppStopRequest: Stop was triggered by an explicit request in the input (by a stop- or an assert-directive). ''' - -from __future__ import print_function +import pathlib import sys import types import inspect @@ -61,15 +60,13 @@ import errno import time import optparse import io -if sys.version_info[0] >= 3: - import builtins -else: - import __builtin__ as builtins +import platform +import builtins # Prevent cluttering user directory with Python bytecode sys.dont_write_bytecode = True -VERSION = '3.0' +VERSION = '3.2' STDIN = '' @@ -143,7 +140,7 @@ _RESERVED_PREFIX = '__' _RESERVED_NAMES = set(['defined', 'setvar', 'getvar', 'delvar', 'globalvar', '_LINE_', '_FILE_', '_THIS_FILE_', '_THIS_LINE_', - '_TIME_', '_DATE_']) + '_TIME_', '_DATE_', '_SYSTEM_', '_MACHINE_']) _LINENUM_NEW_FILE = 1 @@ -159,37 +156,29 @@ _ARGUMENT_SPLIT_CHAR_FORTRAN = ',' class FyppError(Exception): - '''Signalizes error occuring during preprocessing. + '''Signalizes error occurring during preprocessing. Args: msg (str): Error message. fname (str): File name. None (default) if file name is not available. span (tuple of int): Beginning and end line of the region where error - occured or None if not available. If fname was not None, span must + occurred or None if not available. If fname was not None, span must not be None. - cause (Exception): Contains the exception, which triggered this - exception or None, if this exception is not masking any underlying - one. (Emulates Python 3 exception chaining in a Python 2 compatible - way.) Attributes: msg (str): Error message. fname (str or None): File name or None if not available. span (tuple of int or None): Beginning and end line of the region - where error occured or None if not available. Line numbers start + where error occurred or None if not available. Line numbers start from zero. For directives, which do not consume end of the line, start and end lines are identical. - cause (Exception): In case this exception is raised in an except block, - the original exception should be passed here. (Emulates Python 3 - exception chaining in a Python 2 compatible way.) ''' - def __init__(self, msg, fname=None, span=None, cause=None): - super(FyppError, self).__init__() + def __init__(self, msg, fname=None, span=None): + super().__init__() self.msg = msg self.fname = fname self.span = span - self.cause = cause def __str__(self): @@ -204,8 +193,8 @@ class FyppError(Exception): msg.append('\n') if self.msg: msg.append(self.msg) - if self.cause is not None: - msg.append('\n' + str(self.cause)) + if self.__cause__ is not None: + msg.append('\n' + str(self.__cause__)) return ''.join(msg) @@ -286,7 +275,7 @@ class Parser: def handle_include(self, span, fname): '''Called when parser starts to process a new file. - It is a dummy methond and should be overriden for actual use. + It is a dummy methond and should be overridden for actual use. Args: span (tuple of int): Start and end line of the include directive @@ -299,7 +288,7 @@ class Parser: def handle_endinclude(self, span, fname): '''Called when parser finished processing a file. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the include directive @@ -312,7 +301,7 @@ class Parser: def handle_set(self, span, name, expr): '''Called when parser encounters a set directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -326,7 +315,7 @@ class Parser: def handle_def(self, span, name, args): '''Called when parser encounters a def directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -339,7 +328,7 @@ class Parser: def handle_enddef(self, span, name): '''Called when parser encounters an enddef directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -351,7 +340,7 @@ class Parser: def handle_del(self, span, name): '''Called when parser encounters a del directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -363,7 +352,7 @@ class Parser: def handle_if(self, span, cond): '''Called when parser encounters an if directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -375,7 +364,7 @@ class Parser: def handle_elif(self, span, cond): '''Called when parser encounters an elif directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -387,7 +376,7 @@ class Parser: def handle_else(self, span): '''Called when parser encounters an else directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -398,7 +387,7 @@ class Parser: def handle_endif(self, span): '''Called when parser encounters an endif directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -409,7 +398,7 @@ class Parser: def handle_for(self, span, varexpr, iterator): '''Called when parser encounters a for directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -423,7 +412,7 @@ class Parser: def handle_endfor(self, span): '''Called when parser encounters an endfor directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -434,7 +423,7 @@ class Parser: def handle_call(self, span, name, argexpr, blockcall): '''Called when parser encounters a call directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -451,7 +440,7 @@ class Parser: def handle_nextarg(self, span, name, blockcall): '''Called when parser encounters a nextarg directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -466,7 +455,7 @@ class Parser: def handle_endcall(self, span, name, blockcall): '''Called when parser encounters an endcall directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -480,7 +469,7 @@ class Parser: def handle_eval(self, span, expr): '''Called when parser encounters an eval directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -493,7 +482,7 @@ class Parser: def handle_global(self, span, name): '''Called when parser encounters a global directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -505,7 +494,7 @@ class Parser: def handle_text(self, span, txt): '''Called when parser finds text which must left unaltered. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -517,7 +506,7 @@ class Parser: def handle_comment(self, span): '''Called when parser finds a preprocessor comment. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -528,7 +517,7 @@ class Parser: def handle_mute(self, span): '''Called when parser finds a mute directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -539,7 +528,7 @@ class Parser: def handle_endmute(self, span): '''Called when parser finds an endmute directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -550,7 +539,7 @@ class Parser: def handle_stop(self, span, msg): '''Called when parser finds an stop directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -562,7 +551,7 @@ class Parser: def handle_assert(self, span): '''Called when parser finds an assert directive. - It is a dummy method and should be overriden for actual use. + It is a dummy method and should be overridden for actual use. Args: span (tuple of int): Start and end line of the directive. @@ -581,8 +570,8 @@ class Parser: def _parse_txt(self, includespan, fname, txt): self.handle_include(includespan, fname) self._parse(txt) - self.handle_endinclude(includespan, fname) - + self.handle_endinclude(includespan, fname) + def _parse(self, txt, linenr=0, directcall=False): pos = 0 @@ -719,7 +708,7 @@ class Parser: args = [arg.strip() for arg in _argsplit_fortran(callparams)] except Exception as exc: msg = 'unable to parse direct call argument' - raise FyppFatalError(msg, self._curfile, span, exc) + raise FyppFatalError(msg, self._curfile, span) from exc for arg in args: match = _DIRECT_CALL_KWARG_REGEXP.match(arg) argval = arg[match.end():].strip() @@ -1329,16 +1318,21 @@ class Renderer: defaults to False. contlinenums (bool, optional): Whether linenums for continuation should be generated, defaults to False. - linenumformat (str, optional): If set to "gfortran5", a workaround - for broken gfortran versions (version 5.1 and above) is applied when - emitting line numbering directives. + linenumformat (str, optional): 'std', 'cpp' or 'gfortran5' depending + what kind of line directives should be created. Default: 'cpp'. + Format 'std' emits #line pragmas, 'cpp' resembles GNU cpps special + format, and 'gfortran5' adds to cpp a workaround for a bug introduced in GFortran 5. linefolder (callable): Callable to use when folding a line. + filevarroot (str, optional): render _FILE_ and _THIS_FILE_ as paths relative to this + root directory (default: paths are not converted explicitely to relative paths) ''' def __init__(self, evaluator=None, linenums=False, contlinenums=False, - linenumformat=None, linefolder=None): + linenumformat=None, linefolder=None, filevarroot=None): # Evaluator to use for Python expressions self._evaluator = Evaluator() if evaluator is None else evaluator + self._evaluator.updateglobals(_SYSTEM_=platform.system(), + _MACHINE_=platform.machine()) # Whether rendered output is diverted and will be processed # further before output (if True: no line numbering and post processing) @@ -1354,8 +1348,13 @@ class Renderer: # Whether line numbering directives in continuation lines are needed. self._contlinenums = contlinenums - # Whether to use the fix for GFortran in the line numbering directives - self._linenum_gfortran5 = (linenumformat == 'gfortran5') + # Line number formatter function and whether gfortran5 fix is needed + if linenumformat is None or linenumformat in ('cpp', 'gfortran5'): + self._linenumdir = linenumdir_cpp + self._linenum_gfortran5 = linenumformat == 'gfortran5' + else: + self._linenumdir = linenumdir_std + self._linenum_gfortran5 = False # Callable to be used for folding lines if linefolder is None: @@ -1363,6 +1362,13 @@ class Renderer: else: self._linefolder = linefolder + if filevarroot is None: + self._convert_file_path = lambda path: path + else: + self._convert_file_path = ( + lambda path: pathlib.Path(path).relative_to(filevarroot) + ) + def render(self, tree, divert=False, fixposition=False): '''Renders a tree. @@ -1454,8 +1460,8 @@ class Renderer: try: result = self._evaluate(expr, fname, span[0]) except Exception as exc: - msg = "exception occured when evaluating '{0}'".format(expr) - raise FyppFatalError(msg, fname, span, exc) + msg = "exception occurred when evaluating '{0}'".format(expr) + raise FyppFatalError(msg, fname, span) from exc out = [] ieval = [] peval = [] @@ -1478,19 +1484,19 @@ class Renderer: try: cond = bool(self._evaluate(condition, fname, span[0])) except Exception as exc: - msg = "exception occured when evaluating '{0}'"\ + msg = "exception occurred when evaluating '{0}'"\ .format(condition) - raise FyppFatalError(msg, fname, span, exc) + raise FyppFatalError(msg, fname, span) from exc if cond: if self._linenums and not self._diverted and multiline: - out.append(linenumdir(span[1], fname)) + out.append(self._linenumdir(span[1], fname)) outcont, ievalcont, pevalcont = self._render(content) ieval += _shiftinds(ievalcont, len(out)) peval += pevalcont out += outcont break if self._linenums and not self._diverted and multiline: - out.append(linenumdir(spans[-1][1], fname)) + out.append(self._linenumdir(spans[-1][1], fname)) return out, ieval, peval @@ -1501,9 +1507,9 @@ class Renderer: try: iterobj = iter(self._evaluate(loopiter, fname, spans[0][0])) except Exception as exc: - msg = "exception occured when evaluating '{0}'"\ + msg = "exception occurred when evaluating '{0}'"\ .format(loopiter) - raise FyppFatalError(msg, fname, spans[0], exc) + raise FyppFatalError(msg, fname, spans[0]) from exc multiline = (spans[0][0] != spans[-1][1]) for var in iterobj: if len(loopvars) == 1: @@ -1512,13 +1518,13 @@ class Renderer: for varname, value in zip(loopvars, var): self._define(varname, value) if self._linenums and not self._diverted and multiline: - out.append(linenumdir(spans[0][1], fname)) + out.append(self._linenumdir(spans[0][1], fname)) outcont, ievalcont, pevalcont = self._render(content) ieval += _shiftinds(ievalcont, len(out)) peval += pevalcont out += outcont if self._linenums and not self._diverted and multiline: - out.append(linenumdir(spans[1][1], fname)) + out.append(self._linenumdir(spans[1][1], fname)) return out, ieval, peval @@ -1530,8 +1536,8 @@ class Renderer: callobj = self._evaluate(name, fname, spans[0][0]) result = callobj(*posargs, **kwargs) except Exception as exc: - msg = "exception occured when calling '{0}'".format(name) - raise FyppFatalError(msg, fname, spans[0], exc) + msg = "exception occurred when calling '{0}'".format(name) + raise FyppFatalError(msg, fname, spans[0]) from exc self._update_predef_globals(fname, spans[0][0]) span = (spans[0][0], spans[-1][1]) out = [] @@ -1560,7 +1566,7 @@ class Renderer: except Exception as exc: msg = "unable to parse argument expression '{0}'"\ .format(argexpr) - raise FyppFatalError(msg, fname, spans[0], exc) + raise FyppFatalError(msg, fname, spans[0]) from exc self._evaluator.closescope() # Render arguments passed in call body @@ -1595,14 +1601,14 @@ class Renderer: out = [] if self._linenums and not self._diverted: if includefile or self._linenum_gfortran5: - out += linenumdir(0, includefname, _LINENUM_NEW_FILE) + out += self._linenumdir(0, includefname, _LINENUM_NEW_FILE) else: - out += linenumdir(0, includefname) + out += self._linenumdir(0, includefname) outcont, ieval, peval = self._render(content) ieval = _shiftinds(ieval, len(out)) out += outcont if self._linenums and not self._diverted and includefile: - out += linenumdir(spans[0][1], fname, _LINENUM_RETURN_TO_FILE) + out += self._linenumdir(spans[0][1], fname, _LINENUM_RETURN_TO_FILE) return out, ieval, peval @@ -1619,15 +1625,15 @@ class Renderer: try: func = self._evaluate(lambdaexpr, fname, spans[0][0]) except Exception as exc: - msg = "exception occured when evaluating argument expression "\ + msg = "exception occurred when evaluating argument expression "\ "'{0}'".format(argexpr) - raise FyppFatalError(msg, fname, spans[0], exc) + raise FyppFatalError(msg, fname, spans[0]) from exc self._evaluator.closescope() try: - args, defaults, varpos, varkw = _GET_CALLABLE_ARGSPEC(func) + args, defaults, varpos, varkw = _get_callable_argspec(func) except Exception as exc: msg = "invalid argument expression '{0}'".format(argexpr) - raise FyppFatalError(msg, fname, spans[0], exc) + raise FyppFatalError(msg, fname, spans[0]) from exc named_args = args if varpos is None else args + [varpos] named_args = named_args if varkw is None else named_args + [varkw] for arg in named_args: @@ -1641,11 +1647,11 @@ class Renderer: self, self._evaluator, self._evaluator.localscope) self._define(name, macro) except Exception as exc: - msg = "exception occured when defining macro '{0}'"\ + msg = "exception occurred when defining macro '{0}'"\ .format(name) - raise FyppFatalError(msg, fname, spans[0], exc) + raise FyppFatalError(msg, fname, spans[0]) from exc if self._linenums and not self._diverted: - result = linenumdir(spans[1][1], fname) + result = self._linenumdir(spans[1][1], fname) return result @@ -1658,12 +1664,12 @@ class Renderer: expr = self._evaluate(valstr, fname, span[0]) self._define(name, expr) except Exception as exc: - msg = "exception occured when setting variable(s) '{0}' to '{1}'"\ + msg = "exception occurred when setting variable(s) '{0}' to '{1}'"\ .format(name, valstr) - raise FyppFatalError(msg, fname, span, exc) + raise FyppFatalError(msg, fname, span) from exc multiline = (span[0] != span[1]) if self._linenums and not self._diverted and multiline: - result = linenumdir(span[1], fname) + result = self._linenumdir(span[1], fname) return result @@ -1672,12 +1678,12 @@ class Renderer: try: self._evaluator.undefine(name) except Exception as exc: - msg = "exception occured when deleting variable(s) '{0}'"\ + msg = "exception occurred when deleting variable(s) '{0}'"\ .format(name) - raise FyppFatalError(msg, fname, span, exc) + raise FyppFatalError(msg, fname, span) from exc multiline = (span[0] != span[1]) if self._linenums and not self._diverted and multiline: - result = linenumdir(span[1], fname) + result = self._linenumdir(span[1], fname) return result @@ -1686,25 +1692,25 @@ class Renderer: try: self._evaluator.addglobal(name) except Exception as exc: - msg = "exception occured when making variable(s) '{0}' global"\ + msg = "exception occurred when making variable(s) '{0}' global"\ .format(name) - raise FyppFatalError(msg, fname, span, exc) + raise FyppFatalError(msg, fname, span) from exc multiline = (span[0] != span[1]) if self._linenums and not self._diverted and multiline: - result = linenumdir(span[1], fname) + result = self._linenumdir(span[1], fname) return result def _get_comment(self, fname, span): if self._linenums and not self._diverted: - return linenumdir(span[1], fname) + return self._linenumdir(span[1], fname) return '' def _get_muted_content(self, fname, spans, content): self._render(content) if self._linenums and not self._diverted: - return linenumdir(spans[-1][1], fname) + return self._linenumdir(spans[-1][1], fname) return '' @@ -1712,9 +1718,9 @@ class Renderer: try: msg = str(self._evaluate(msgstr, fname, span[0])) except Exception as exc: - msg = "exception occured when evaluating stop message '{0}'"\ + msg = "exception occurred when evaluating stop message '{0}'"\ .format(msgstr) - raise FyppFatalError(msg, fname, span, exc) + raise FyppFatalError(msg, fname, span) from exc raise FyppStopRequest(msg, fname, span) @@ -1723,14 +1729,14 @@ class Renderer: try: cond = bool(self._evaluate(expr, fname, span[0])) except Exception as exc: - msg = "exception occured when evaluating assert condition '{0}'"\ + msg = "exception occurred when evaluating assert condition '{0}'"\ .format(expr) - raise FyppFatalError(msg, fname, span, exc) + raise FyppFatalError(msg, fname, span) from exc if not cond: msg = "Assertion failed ('{0}')".format(expr) raise FyppStopRequest(msg, fname, span) if self._linenums and not self._diverted: - result = linenumdir(span[1], fname) + result = self._linenumdir(span[1], fname) return result @@ -1742,6 +1748,7 @@ class Renderer: def _update_predef_globals(self, fname, linenr): + fname = self._convert_file_path(fname) self._evaluator.updatelocals( _DATE_=time.strftime('%Y-%m-%d'), _TIME_=time.strftime('%H:%M:%S'), _THIS_FILE_=fname, _THIS_LINE_=linenr + 1) @@ -1822,7 +1829,7 @@ class Renderer: trailing_newline = (lines[-1] == '') if trailing_newline: del lines[-1] - lnum = linenumdir(span[0], fname) if self._linenums else '' + lnum = self._linenumdir(span[0], fname) if self._linenums else '' clnum = lnum if self._contlinenums else '' linenumsep = '\n' + lnum clinenumsep = '\n' + clnum @@ -1846,7 +1853,7 @@ class Renderer: # -> next line is span[0] + 1 and not span[1] as for # line eval directives nextline = max(span[1], span[0] + 1) - trailing += linenumdir(nextline, fname) + trailing += self._linenumdir(nextline, fname) else: trailing = '' return result + trailing @@ -1987,7 +1994,7 @@ class Evaluator: self.define(rootmod, imported) except Exception as exc: msg = "failed to import module '{0}'".format(module) - raise FyppFatalError(msg, cause=exc) + raise FyppFatalError(msg) from exc def define(self, name, value): @@ -2082,7 +2089,7 @@ class Evaluator: (e.g. should only contain variables with forbidden prefix). Args: - **vardict: variable defintions. + **vardict: variable definitions. ''' self._scope.update(vardict) @@ -2101,7 +2108,7 @@ class Evaluator: (e.g variables starting with forbidden prefix) Args: - **vardict: variable defintions. + **vardict: variable definitions. ''' self._scope.update(vardict) if self._locals is not None: @@ -2168,10 +2175,6 @@ class Evaluator: @classmethod def _get_restricted_builtins(cls): bidict = dict(cls._RESTRICTED_BUILTINS) - major = sys.version_info[0] - if major == 2: - bidict['True'] = True - bidict['False'] = False return bidict @@ -2180,7 +2183,7 @@ class Evaluator: lpar = varexpr.startswith('(') rpar = varexpr.endswith(')') if lpar != rpar: - msg = "unbalanced paranthesis around variable varexpr(s) in '{0}'"\ + msg = "unbalanced parenthesis around variable varexpr(s) in '{0}'"\ .format(varexpr) raise FyppFatalError(msg, None, None) if lpar: @@ -2254,7 +2257,7 @@ class _Macro: Args: name (str): Name of the macro. fname (str): The file where the macro was defined. - spans (str): Line spans of macro defintion. + spans (str): Line spans of macro definition. argnames (list of str): Macro dummy arguments. varpos (str): Name of variable positional argument or None. varkw (str): Name of variable keyword argument or None. @@ -2456,28 +2459,66 @@ class Fypp: options, leftover = optparser.parse_args(args=args) tool = fypp.Fypp(options) + For even more fine-grained control over how Fypp works, you can pass in + custom factory methods that handle construction of the evaluator, parser, + builder and renderer components. These factory methods must have the same + signature as the corresponding component's constructor. As an example of + using a builder that's customized by subclassing:: + + class MyBuilder(fypp.Builder): + + def __init__(self): + super().__init__() + ...additional initialization... + + tool = fypp.Fypp(options, builder_factory=MyBuilder) + Args: options (object): Object containing the settings for Fypp. You typically would pass a customized `FyppOptions`_ instance or an ``optparse.Values`` object as returned by the option parser. If not present, the default settings in `FyppOptions`_ are used. + evaluator_factory (function): Factory function that returns an Evaluator + object. Its call signature must match that of the Evaluator + constructor. If not present, ``Evaluator`` is used. + parser_factory (function): Factory function that returns a Parser + object. Its call signature must match that of the Parser + constructor. If not present, ``Parser`` is used. + builder_factory (function): Factory function that returns a Builder + object. Its call signature must match that of the Builder + constructor. If not present, ``Builder`` is used. + renderer_factory (function): Factory function that returns a Renderer + object. Its call signature must match that of the Renderer + constructor. If not present, ``Renderer`` is used. ''' - def __init__(self, options=None): + def __init__(self, options=None, evaluator_factory=Evaluator, + parser_factory=Parser, builder_factory=Builder, + renderer_factory=Renderer): syspath = self._get_syspath_without_scriptdir() self._adjust_syspath(syspath) if options is None: options = FyppOptions() - evaluator = Evaluator() + if inspect.signature(evaluator_factory) == inspect.signature(Evaluator): + evaluator = evaluator_factory() + else: + raise FyppFatalError('evaluator_factory has incorrect signature') self._encoding = options.encoding if options.modules: self._import_modules(options.modules, evaluator, syspath, options.moduledirs) if options.defines: self._apply_definitions(options.defines, evaluator) - parser = Parser(includedirs=options.includes, encoding=self._encoding) - builder = Builder() + if inspect.signature(parser_factory) == inspect.signature(Parser): + parser = parser_factory(includedirs=options.includes, + encoding=self._encoding) + else: + raise FyppFatalError('parser_factory has incorrect signature') + if inspect.signature(builder_factory) == inspect.signature(Builder): + builder = builder_factory() + else: + raise FyppFatalError('builder_factory has incorrect signature') fixed_format = options.fixed_format linefolding = not options.no_folding @@ -2494,9 +2535,13 @@ class Fypp: linenums = options.line_numbering contlinenums = (options.line_numbering_mode != 'nocontlines') self._create_parent_folder = options.create_parent_folder - renderer = Renderer( - evaluator, linenums=linenums, contlinenums=contlinenums, - linenumformat=options.line_marker_format, linefolder=linefolder) + if inspect.signature(renderer_factory) == inspect.signature(Renderer): + renderer = renderer_factory( + evaluator, linenums=linenums, contlinenums=contlinenums, + linenumformat=options.line_marker_format, linefolder=linefolder, + filevarroot=options.file_var_root) + else: + raise FyppFatalError('renderer_factory has incorrect signature') self._preprocessor = Processor(parser, builder, renderer) @@ -2545,7 +2590,7 @@ class Fypp: @staticmethod def _apply_definitions(defines, evaluator): for define in defines: - words = define.split('=', 2) + words = define.split('=', 1) name = words[0] value = None if len(words) > 1: @@ -2554,7 +2599,7 @@ class Fypp: except Exception as exc: msg = "exception at evaluating '{0}' in definition for " \ "'{1}'".format(words[1], name) - raise FyppFatalError(msg, cause=exc) + raise FyppFatalError(msg) from exc evaluator.define(name, value) @@ -2598,13 +2643,15 @@ class FyppOptions(optparse.Values): in the output. Default: False line_numbering_mode (str): Line numbering mode 'full' or 'nocontlines'. Default: 'full'. - line_marker_format (str): Line marker format. Currently 'cpp' and - 'gfortran5' are supported. Later fixes the line marker handling bug - introduced in GFortran 5. Default: 'cpp'. + line_marker_format (str): Line marker format. Currently 'std', + 'cpp' and 'gfortran5' are supported, where 'std' emits ``#line`` + pragmas similar to standard tools, 'cpp' produces line directives as + emitted by GNU cpp, and 'gfortran5' cpp line directives with a + workaround for a bug introduced in GFortran 5. Default: 'cpp'. line_length (int): Length of output lines. Default: 132. folding_mode (str): Folding mode 'smart', 'simple' or 'brute'. Default: 'smart'. - no_folding (bool): Whether folding should be suppresed. Default: False. + no_folding (bool): Whether folding should be suppressed. Default: False. indentation (int): Indentation in continuation lines. Default: 4. modules (list of str): Modules to import at initialization. Default: []. moduledirs (list of str): Module lookup directories for importing user @@ -2637,6 +2684,7 @@ class FyppOptions(optparse.Values): self.fixed_format = False self.encoding = 'utf-8' self.create_parent_folder = False + self.file_var_root = None class FortranLineFolder: @@ -2654,7 +2702,7 @@ class FortranLineFolder: prefix (str, optional): String to use at the beginning of a continuation line (default: '&'). - suffix (str, optional): String to use at the end of the line preceeding + suffix (str, optional): String to use at the end of the line preceding a continuation line (default: '&') ''' @@ -2775,27 +2823,33 @@ def get_option_parser(): usage = '%prog [options] [INFILE] [OUTFILE]' parser = optparse.OptionParser(prog=fypp_name, description=fypp_desc, version=fypp_version, usage=usage) + msg = 'define variable, value is interpreted as ' \ 'Python expression (e.g \'-DDEBUG=1\' sets DEBUG to the ' \ - 'integer 1) or set to None if ommitted' + 'integer 1) or set to None if omitted' parser.add_option('-D', '--define', action='append', dest='defines', metavar='VAR[=VALUE]', default=defs.defines, help=msg) + msg = 'add directory to the search paths for include files' parser.add_option('-I', '--include', action='append', dest='includes', metavar='INCDIR', default=defs.includes, help=msg) + msg = 'import a python module at startup (import only trustworthy modules '\ 'as they have access to an **unrestricted** Python environment!)' parser.add_option('-m', '--module', action='append', dest='modules', metavar='MOD', default=defs.modules, help=msg) + msg = 'directory to be searched for user imported modules before '\ 'looking up standard locations in sys.path' parser.add_option('-M', '--module-dir', action='append', dest='moduledirs', metavar='MODDIR', default=defs.moduledirs, help=msg) + msg = 'emit line numbering markers' parser.add_option('-n', '--line-numbering', action='store_true', dest='line_numbering', default=defs.line_numbering, help=msg) + msg = 'line numbering mode, \'full\' (default): line numbering '\ 'markers generated whenever source and output lines are out '\ 'of sync, \'nocontlines\': line numbering markers omitted '\ @@ -2804,41 +2858,59 @@ def get_option_parser(): choices=['full', 'nocontlines'], default=defs.line_numbering_mode, dest='line_numbering_mode', help=msg) - msg = 'line numbering marker format, \'cpp\' (default): GNU cpp format, '\ - '\'gfortran5\': modified markers to work around bug in GFortran 5 '\ - 'and above' + + msg = 'line numbering marker format, currently \'std\', \'cpp\' and '\ + '\'gfortran5\' are supported, where \'std\' emits #line pragmas '\ + 'similar to standard tools, \'cpp\' produces line directives as '\ + 'emitted by GNU cpp, and \'gfortran5\' cpp line directives with a '\ + 'workaround for a bug introduced in GFortran 5. Default: \'cpp\'.' parser.add_option('--line-marker-format', metavar='FMT', - choices=['cpp', 'gfortran5'], dest='line_marker_format', + choices=['cpp', 'gfortran5', 'std'], + dest='line_marker_format', default=defs.line_marker_format, help=msg) + msg = 'maximal line length (default: 132), lines modified by the '\ 'preprocessor are folded if becoming longer' parser.add_option('-l', '--line-length', type=int, metavar='LEN', dest='line_length', default=defs.line_length, help=msg) + msg = 'line folding mode, \'smart\' (default): indentation context '\ 'and whitespace aware, \'simple\': indentation context aware, '\ '\'brute\': mechnical folding' parser.add_option('-f', '--folding-mode', metavar='MODE', choices=['smart', 'simple', 'brute'], dest='folding_mode', default=defs.folding_mode, help=msg) + msg = 'suppress line folding' parser.add_option('-F', '--no-folding', action='store_true', dest='no_folding', default=defs.no_folding, help=msg) + msg = 'indentation to use for continuation lines (default 4)' parser.add_option('--indentation', type=int, metavar='IND', dest='indentation', default=defs.indentation, help=msg) + msg = 'produce fixed format output (any settings for options '\ '--line-length, --folding-method and --indentation are ignored)' parser.add_option('--fixed-format', action='store_true', dest='fixed_format', default=defs.fixed_format, help=msg) + msg = 'character encoding for reading/writing files. Default: \'utf-8\'. '\ 'Note: reading from stdin and writing to stdout is encoded '\ 'according to the current locale and is not affected by this setting.' parser.add_option('--encoding', metavar='ENC', default=defs.encoding, help=msg) + msg = 'create parent folders of the output file if they do not exist' parser.add_option('-p', '--create-parents', action='store_true', dest='create_parent_folder', default=defs.create_parent_folder, help=msg) + + msg = 'in variables _FILE_ and _THIS_FILE_, use relative paths with DIR '\ + 'as root directory. Note: the input file and all included files '\ + 'must be in DIR or in a directory below.' + parser.add_option('--file-var-root', metavar='DIR', dest='file_var_root', + default=defs.file_var_root, help=msg) + return parser @@ -2860,18 +2932,39 @@ def run_fypp(): sys.exit(ERROR_EXIT_CODE) -def linenumdir(linenr, fname, flag=None): - '''Returns a line numbering directive. +def linenumdir_cpp(linenr, fname, flag=None): + """Returns a GNU cpp style line directive. Args: - linenr (int): Line nr (starting with 0). + linenr (int): Line nr (starting with zero). fname (str): File name. - ''' + flag (str): Optional flag to print after the directive + + Returns: + Line number directive as string. + """ if flag is None: return '# {0} "{1}"\n'.format(linenr + 1, fname) return '# {0} "{1}" {2}\n'.format(linenr + 1, fname, flag) +def linenumdir_std(linenr, fname, flag=None): + """Returns standard #line pragma styled line directive. + + Args: + linenr (int): Line nr (starting with zero). + fname (str): File name. + flag (str): Optional flag to print after the directive. Note, this + option is only there to be API compatible with linenumdir_cpp(), + but is ignored otherwise, since #line pragmas do not allow for + extra file opening/closing flags. + + Returns: + Line number directive as string. + """ + return "#line {0} \"{1}\"\n".format(linenr + 1, fname) + + def _shiftinds(inds, shift): return [ind + shift for ind in inds] @@ -2881,7 +2974,7 @@ def _open_input_file(inpfile, encoding=None): inpfp = io.open(inpfile, 'r', encoding=encoding) except IOError as exc: msg = "Failed to open file '{0}' for read".format(inpfile) - raise FyppFatalError(msg, cause=exc) + raise FyppFatalError(msg) from exc return inpfp @@ -2895,35 +2988,17 @@ def _open_output_file(outfile, encoding=None, create_parents=False): if exc.errno != errno.EEXIST: msg = "Folder '{0}' can not be created"\ .format(parentdir) - raise FyppFatalError(msg, cause=exc) + raise FyppFatalError(msg) from exc try: outfp = io.open(outfile, 'w', encoding=encoding) except IOError as exc: msg = "Failed to open file '{0}' for write".format(outfile) - raise FyppFatalError(msg, cause=exc) + raise FyppFatalError(msg) from exc return outfp -def _get_callable_argspec_py2(func): - argspec = inspect.getargspec(func) - varpos = argspec.varargs - varkw = argspec.keywords - args = argspec.args - tuplearg = False - for elem in args: - tuplearg = tuplearg or isinstance(elem, list) - if tuplearg: - msg = 'tuple argument(s) found' - raise FyppFatalError(msg) - defaults = {} - if argspec.defaults is not None: - for ind, default in enumerate(argspec.defaults): - iarg = len(args) - len(argspec.defaults) + ind - defaults[args[iarg]] = default - return args, defaults, varpos, varkw - - -def _get_callable_argspec_py3(func): +# Signature objects are available from Python 3.3 (and deprecated from 3.5) +def _get_callable_argspec(func): sig = inspect.signature(func) args = [] defaults = {} @@ -2944,13 +3019,6 @@ def _get_callable_argspec_py3(func): return args, defaults, varpos, varkw -# Signature objects are available from Python 3.3 (and deprecated from 3.5) - -if sys.version_info[0] >= 3 and sys.version_info[1] >= 3: - _GET_CALLABLE_ARGSPEC = _get_callable_argspec_py3 -else: - _GET_CALLABLE_ARGSPEC = _get_callable_argspec_py2 - def _blank_match(match): size = match.end() - match.start() @@ -3010,8 +3078,8 @@ def _formatted_exception(exc): out.append(error_header_formstr.format(file=exc.fname, line=line)) out.append(error_body_formstr.format(errormsg=exc.msg, errorclass=exc.__class__.__name__)) - if exc.cause is not None: - out.append('\n' + _formatted_exception(exc.cause)) + if exc.__cause__ is not None: + out.append('\n' + _formatted_exception(exc.__cause__)) out.append('\n') return ''.join(out) From 56f7396c3669a01a3f0d03d466dd4e056aee4e05 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Fri, 26 Apr 2024 17:15:10 +0200 Subject: [PATCH 16/25] Add option to specify skdef.hsd path for collectspinw script --- sktools/src/sktools/scripts/collectspinw.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sktools/src/sktools/scripts/collectspinw.py b/sktools/src/sktools/scripts/collectspinw.py index 2ca451c1..30cd75ea 100644 --- a/sktools/src/sktools/scripts/collectspinw.py +++ b/sktools/src/sktools/scripts/collectspinw.py @@ -27,7 +27,7 @@ def main(cmdlineargs=None): logger = sc.get_script_logger(args.loglevel, SCRIPTNAME) logger.info('Collecting spinw constants') - skdef = Skdef.fromfile('skdef.hsd') + skdef = Skdef.fromfile(args.configfile) searchdirs = [args.builddir] elems = skdef.atomparameters.keys() @@ -62,6 +62,11 @@ def parseargs(cmdlineargs): parser.add_argument('-o', '--onecenter-binary', dest='onecnt_binary', default=None, help=msg) + parser.add_argument( + '-c', '--config-file', default='skdef.hsd', dest='configfile', + metavar='CONFIGFILE', + help='config file to be parsed (default: ./skdef.hsd)') + msg = 'Logging level (default: info)' parser.add_argument('-l', '--log-level', dest='loglevel', default='info', choices=['debug', 'info', 'warning', 'error'], help=msg) From 00f44d6c0b7200388fdbc25a9b587c5ed299846c Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Fri, 26 Apr 2024 16:57:23 +0200 Subject: [PATCH 17/25] Fix help page of the collectwavecoeffs script --- .../src/sktools/scripts/collectwavecoeffs.py | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/sktools/src/sktools/scripts/collectwavecoeffs.py b/sktools/src/sktools/scripts/collectwavecoeffs.py index 37039f99..fe62e3d4 100644 --- a/sktools/src/sktools/scripts/collectwavecoeffs.py +++ b/sktools/src/sktools/scripts/collectwavecoeffs.py @@ -6,11 +6,12 @@ import os +import argparse import sktools.common as sc from sktools.skgen import compression -from sktools.scripts.skgen import get_parser_and_subparser_container, \ - get_onecnt_common_parser, setup_parser_wavecomp, \ +from sktools.scripts.skgen import get_onecnt_common_parser, \ + setup_parser_wavecomp, \ parse_command_line_and_run_subcommand, \ convert_argument_to_elements, merge_skdefs from sktools import PACKAGE_VERSION @@ -20,7 +21,7 @@ SCRIPTNAME = sc.get_script_name() -USAGE = USAGE = \ +USAGE = \ '''Collects coefficient information for Waveplot. It iterates over the elements defined in skdef.hsd and collects the wavefunction coefficients and other information necessary for Waveplot. The homonuclear SK-files as @@ -150,6 +151,19 @@ def setup_parser_main(parser): help='Logging level (default: info)') +def get_parser_and_subparser_container(): + '''Instantiates parser and subparser for the collectwavecoeffs script. + + Returns: + parser (ArgumentParser): parser instance + subparser (ArgumentParser): subparser instance + ''' + parser = argparse.ArgumentParser(description=USAGE) + subparsers = parser.add_subparsers( + title='available subcommands', help='') + return parser, subparsers + + def setup_logger(loglevel): global logger logger = sc.get_script_logger(loglevel, SCRIPTNAME) From 0ed7125323ec1c62050f9600a72bda274275dbe0 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Fri, 26 Apr 2024 16:28:03 +0200 Subject: [PATCH 18/25] Perform various infrastructure related trivial updates --- CONTRIBUTING.rst | 18 +++---- cmake/SkProgsUtils.cmake | 2 +- common/include/LICENSE | 2 +- common/include/common.fypp | 50 +++++++++++--------- common/include/error.fypp | 55 +++++----------------- doc/devel/code_structure.txt | 3 +- doc/devel/general_notes.txt | 6 +-- doc/input.txt | 2 +- sys/generic.cmake | 2 +- sys/intel.cmake | 9 +++- tools/utils/srccheck/pylint/pylintrc-2.ini | 26 ---------- tools/utils/srccheck/pylint/pylintrc-3.ini | 30 ------------ utils/srccheck/pylint/pylintrc-2.ini | 26 ---------- utils/srccheck/pylint/pylintrc-3.ini | 30 ------------ 14 files changed, 64 insertions(+), 197 deletions(-) delete mode 100644 tools/utils/srccheck/pylint/pylintrc-2.ini delete mode 100644 tools/utils/srccheck/pylint/pylintrc-3.ini delete mode 100644 utils/srccheck/pylint/pylintrc-2.ini delete mode 100644 utils/srccheck/pylint/pylintrc-3.ini diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 93f75b4e..9e445389 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -35,24 +35,24 @@ When you contribute to the project, your contribution must align with the Developer Certificate of Origin Version 1.1 - + Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 1 Letterman Drive Suite D4700 San Francisco, CA, 94129 - + Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - - + + Developer's Certificate of Origin 1.1 - + By making a contribution to this project, I certify that: - + (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or - + (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that @@ -60,11 +60,11 @@ When you contribute to the project, your contribution must align with the by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or - + (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. - + (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is diff --git a/cmake/SkProgsUtils.cmake b/cmake/SkProgsUtils.cmake index dd57ebbc..d5f85909 100644 --- a/cmake/SkProgsUtils.cmake +++ b/cmake/SkProgsUtils.cmake @@ -137,7 +137,7 @@ function(skprogs_guess_toolchain toolchain) if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU") set(_toolchain "gnu") - elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "Intel") + elseif("${CMAKE_Fortran_COMPILER_ID}" MATCHES "Intel|IntelLLVM") set(_toolchain "intel") elseif("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "NAG") set(_toolchain "nag") diff --git a/common/include/LICENSE b/common/include/LICENSE index 39a18bb4..10fb1e3e 100644 --- a/common/include/LICENSE +++ b/common/include/LICENSE @@ -1,5 +1,5 @@ DFTB+: general package for performing fast atomistic simulations -Copyright (C) 2006 - 2021 DFTB+ developers group +Copyright (C) 2006 - 2024 DFTB+ developers group This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free diff --git a/common/include/common.fypp b/common/include/common.fypp index 917f43d9..759424c9 100644 --- a/common/include/common.fypp +++ b/common/include/common.fypp @@ -1,6 +1,6 @@ #!-------------------------------------------------------------------------------------------------! #! DFTB+: general package for performing fast atomistic simulations ! -#! Copyright (C) 2006 - 2020 DFTB+ developers group ! +#! Copyright (C) 2006 - 2024 DFTB+ developers group ! #! ! #! See the LICENSE file for terms of usage and distribution. ! #!-------------------------------------------------------------------------------------------------! @@ -12,27 +12,15 @@ #! Default values for all preprocessor variables #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -#:if not defined('DEBUG') - #:set DEBUG = 0 -#:endif - +#:set DEBUG = getvar('DEBUG', 0) #:set WITH_ASSERT = defined('WITH_ASSERT') or DEBUG > 0 #:set WITH_MPI = defined('WITH_MPI') + #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -#! ASSERT and DEBUG related macros +#! DEBUG related macros #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -#! Check a condition if WITH_ASSERT is True and call assertError if condition is False. -#:def ASSERT(cond) - #:if WITH_ASSERT - if (.not. (${cond}$)) then - call assertError("${_FILE_}$", ${_LINE_}$) - end if - #:endif -#:enddef ASSERT - - #! Insert code if DEBUG level is greater than zero. #:def DEBUG_CODE(code) #:if DEBUG > 0 @@ -58,11 +46,31 @@ #:enddef -#! Macro for automated deallocations -#:def SAFE_DEALLOC(*args) - #:for arg in args - if (allocated(${arg}$)) deallocate(${arg}$) - #:endfor +#! Creates a class instance by allocating, initializing and move_allocing a specific type +#! +#! Args: +#! cls (str): Name of the LHS variable (must be a class) +#! dyntype (str): Dynamic type of the actual instance to be initialized +#! init (str): Initialization routine to call (with allocated instance as first arg) +#! initargs (str): Further arguments to pass to the init routine. +#:def CREATE_CLASS(cls, dyntype, init, *initargs) +block + type(${dyntype}$), allocatable :: inst + allocate(inst) + call ${init}$(inst, ${", ".join(initargs)}$) + call move_alloc(inst, ${cls}$) +end block #:enddef + +#! Simple macro printing out the position of a line +#:def PRINT_POSITION() +block + use iso_fortran_env, only : output_unit + write(output_unit, "(a)") "Reached line ${_LINE_}$ in ${_FILE_}$" + flush(output_unit) +end block +#:enddef + +#:endif #:endmute diff --git a/common/include/error.fypp b/common/include/error.fypp index b63680a8..cbd9d419 100644 --- a/common/include/error.fypp +++ b/common/include/error.fypp @@ -1,55 +1,18 @@ #!-------------------------------------------------------------------------------------------------! #! DFTB+: general package for performing fast atomistic simulations ! -#! Copyright (C) 2006 - 2020 DFTB+ developers group ! +#! Copyright (C) 2006 - 2024 DFTB+ developers group ! #! ! #! See the LICENSE file for terms of usage and distribution. ! #!-------------------------------------------------------------------------------------------------! -#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -#! Error string handling wrappers for returns from routinese -#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - - -#! Macro to return an error flag if return variable available or throw -#! an error and shut down otherwise -#:def ERROR_HANDLING(errVar, errNumber, msg) - block - use dftbp_accuracy, only : lc - use dftbp_message - !> Error handling string - character(lc) :: stringTmp - - write(stringTmp,"(A)")${msg}$ - if (present(${errVar}$)) then - ${errVar}$ = ${errNumber}$ - call warning(stringTmp) - return - else - call error(stringTmp) - end if - end block -#:enddef ERROR_HANDLING - +#:mute +#:if not defined("_ERROR_FYPP_") +#:set _ERROR_FYPP_ -#! Macro to return an error flag if return variable available or throw -#! an error and shut down otherwise -#:def FORMATTED_ERROR_HANDLING(errVar, errNumber, formating, *variables) - block - use dftbp_accuracy, only : lc - use dftbp_message - !> Error handling string - character(lc) :: stringTmp - write(stringTmp,${formating}$) ${ ",".join(variables) }$ - if (present(${errVar}$)) then - ${errVar}$ = ${errNumber}$ - call warning(stringTmp) - return - else - call error(stringTmp) - end if - end block -#:enddef FORMATTED_ERROR_HANDLING +#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +#! Error string handling wrappers for returns from routines +#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #! Propagation of error handling, for now it just returns when in error @@ -60,3 +23,7 @@ end if end if #:enddef + + +#:endif +#:endmute diff --git a/doc/devel/code_structure.txt b/doc/devel/code_structure.txt index e65dea68..5232dd7f 100644 --- a/doc/devel/code_structure.txt +++ b/doc/devel/code_structure.txt @@ -4,7 +4,7 @@ OVERVIEW main.f90: main program globals.f90: Variables of the main program, except the mixer all - other subroutines/functions use intent(in)/intent(out) to protect + other subroutines/functions use intent(in)/intent(out) to protect these variables, so in some sence this is not global The variables are also allocated here. IMPORTANT: This also gives a short comment what the variable is ! @@ -49,4 +49,3 @@ utilities.f90: misc stuff (factorial etc.) zora_routines.f90: ZORA routines, contains even the routines for the naive implementation, see NAIVE_ZORA for their use - diff --git a/doc/devel/general_notes.txt b/doc/devel/general_notes.txt index bddb7bfc..7d4d12dc 100644 --- a/doc/devel/general_notes.txt +++ b/doc/devel/general_notes.txt @@ -41,7 +41,7 @@ alpha with a known issue: Although I am confident I got the prefactor right I cannot reproduce literature results. Not sure why. For the ZORA stuff see vlenthe.pdf in references. Here, I basically use -the implementation for ADF Band (Chapter 6.2) which explicitely assumes a +the implementation for ADF Band (Chapter 6.2) which explicitely assumes a sphericallysymmetric potential with one more step (which has to be checked): Impementing 6.13-6.15 directly leads to an matrix element containg the second derivative of the basis function. IMHO one can @@ -60,7 +60,7 @@ ZORA as currently implemented. The confining potential matrix elements are also evaluated analytically. The confinig potential does not enter in the ZORA kinetic energy -operator, since the kinetic energy would then vanish for r->infty which is -clearly wrong. Having the confining potential only in the SCF potential but +operator, since the kinetic energy would then vanish for r->infty which is +clearly wrong. Having the confining potential only in the SCF potential but not in the ZORA kinetic energy seems to work reasonanbly judging from the expectation values. diff --git a/doc/input.txt b/doc/input.txt index f18dbbbe..f4b64d51 100644 --- a/doc/input.txt +++ b/doc/input.txt @@ -13,7 +13,7 @@ Line 2: xc_functional integer :: xc_functional, 0=HF, 1=X-Alpha, 2=PW-LDA, 3=PBE - NOTE: HF only correct for 1S states, X-Aalpha is untested alpha=0.7 + NOTE: HF only correct for 1S states, X-Alpha is untested alpha=0.7 Line 3: r_0 power diff --git a/sys/generic.cmake b/sys/generic.cmake index c6fde8ce..3102fac0 100644 --- a/sys/generic.cmake +++ b/sys/generic.cmake @@ -28,7 +28,7 @@ set(Fortran_FLAGS "${CMAKE_Fortran_FLAGS}" set(Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE}" CACHE STRING "Fortran compiler flags for Release build") -set(Fortran_FLAGS_RELWITHDEBINFO "${Fortran_FLAGS_RELWITHDEBINFO}" +set(Fortran_FLAGS_RELWITHDEBINFO "${CMAKE_Fortran_FLAGS_RELWITHDEBINFO}" CACHE STRING "Fortran compiler flags for Release build") set(Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG}" diff --git a/sys/intel.cmake b/sys/intel.cmake index 98c32ddc..e4c1fa02 100644 --- a/sys/intel.cmake +++ b/sys/intel.cmake @@ -18,8 +18,13 @@ # # Fortran compiler settings # -set(Fortran_FLAGS_RELEASE "-O2 -ip" - CACHE STRING "Fortran compiler flags for Release build") +if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "IntelLLVM") + set(Fortran_FLAGS_RELEASE "-O2" + CACHE STRING "Fortran compiler flags for Release build") +else() + set(Fortran_FLAGS_RELEASE "-O2 -ip" + CACHE STRING "Fortran compiler flags for Release build") +endif() set(Fortran_FLAGS_RELWITHDEBINFO "-g ${Fortran_FLAGS_RELEASE}" CACHE STRING "Fortran compiler flags for Release build") diff --git a/tools/utils/srccheck/pylint/pylintrc-2.ini b/tools/utils/srccheck/pylint/pylintrc-2.ini deleted file mode 100644 index 4c909ac7..00000000 --- a/tools/utils/srccheck/pylint/pylintrc-2.ini +++ /dev/null @@ -1,26 +0,0 @@ -[TYPECHECK] - -ignored-modules = numpy, numpy.linalg -ignored-classes = numpy, numpy.linalg - -[BASIC] - -variable-rgx = [a-z_][a-z0-9_]{1,30}$ -good-names = _ - -[FORMAT] - -max-line-length = 80 - -[DESIGN] - -min-public-methods = 0 -max-locals = 20 -max-attributes = 20 -max-args = 10 -max-returns = 10 -max-statements = 100 -max-branches = 20 - -[MESSAGES CONTROL] -disable = old-style-class,star-args diff --git a/tools/utils/srccheck/pylint/pylintrc-3.ini b/tools/utils/srccheck/pylint/pylintrc-3.ini deleted file mode 100644 index 5d85cf14..00000000 --- a/tools/utils/srccheck/pylint/pylintrc-3.ini +++ /dev/null @@ -1,30 +0,0 @@ -[TYPECHECK] - -ignored-modules = numpy, numpy.linalg -ignored-classes = numpy, numpy.linalg - -[BASIC] - -variable-rgx = [a-z_][a-z0-9_]{1,30}$ -good-names = _ - -[FORMAT] - -max-line-length = 80 - -[DESIGN] - -min-public-methods = 0 -max-locals = 20 -max-attributes = 20 -max-args = 10 -max-returns = 10 -max-statements = 100 -max-branches = 20 - -[MESSAGES CONTROL] -disable = star-args - -[IMPORTS] -# remove optparse from deprecated modules -deprecated-modules = diff --git a/utils/srccheck/pylint/pylintrc-2.ini b/utils/srccheck/pylint/pylintrc-2.ini deleted file mode 100644 index 4c909ac7..00000000 --- a/utils/srccheck/pylint/pylintrc-2.ini +++ /dev/null @@ -1,26 +0,0 @@ -[TYPECHECK] - -ignored-modules = numpy, numpy.linalg -ignored-classes = numpy, numpy.linalg - -[BASIC] - -variable-rgx = [a-z_][a-z0-9_]{1,30}$ -good-names = _ - -[FORMAT] - -max-line-length = 80 - -[DESIGN] - -min-public-methods = 0 -max-locals = 20 -max-attributes = 20 -max-args = 10 -max-returns = 10 -max-statements = 100 -max-branches = 20 - -[MESSAGES CONTROL] -disable = old-style-class,star-args diff --git a/utils/srccheck/pylint/pylintrc-3.ini b/utils/srccheck/pylint/pylintrc-3.ini deleted file mode 100644 index 5d85cf14..00000000 --- a/utils/srccheck/pylint/pylintrc-3.ini +++ /dev/null @@ -1,30 +0,0 @@ -[TYPECHECK] - -ignored-modules = numpy, numpy.linalg -ignored-classes = numpy, numpy.linalg - -[BASIC] - -variable-rgx = [a-z_][a-z0-9_]{1,30}$ -good-names = _ - -[FORMAT] - -max-line-length = 80 - -[DESIGN] - -min-public-methods = 0 -max-locals = 20 -max-attributes = 20 -max-args = 10 -max-returns = 10 -max-statements = 100 -max-branches = 20 - -[MESSAGES CONTROL] -disable = star-args - -[IMPORTS] -# remove optparse from deprecated modules -deprecated-modules = From 8bcd7ac732c51d10d57e1a8d2bcc4ea31ebf6301 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Sat, 20 Apr 2024 11:52:58 +0200 Subject: [PATCH 19/25] Clean up functional selection Additionally, prepare the generalization of the B3LYP global hybrid to arbitrary user supplied fractions of HF-type exchange. --- sktwocnt/lib/twocnt.f90 | 27 ++++++++++++++------------- sktwocnt/prog/input.f90 | 12 +++++++----- slateratom/lib/dft.f90 | 2 +- slateratom/lib/input.f90 | 7 +++++++ slateratom/lib/xcfunctionals.f90 | 9 ++++++--- 5 files changed, 35 insertions(+), 22 deletions(-) diff --git a/sktwocnt/lib/twocnt.f90 b/sktwocnt/lib/twocnt.f90 index a3420957..9c63bf24 100644 --- a/sktwocnt/lib/twocnt.f90 +++ b/sktwocnt/lib/twocnt.f90 @@ -229,38 +229,39 @@ subroutine get_twocenter_integrals(inp, imap, skham, skover) !! number of radial and angular integration abscissas integer :: nRad, nAng - if (inp%iXC == xcFunctional%LDA_PW91) then + select case (inp%iXC) + case(xcFunctional%LDA_PW91) call xc_f03_func_init(xcfunc_x, XC_LDA_X, XC_UNPOLARIZED) call xc_f03_func_init(xcfunc_c, XC_LDA_C_PW, XC_UNPOLARIZED) - elseif (inp%iXC == xcFunctional%GGA_PBE96) then + case(xcFunctional%GGA_PBE96) call xc_f03_func_init(xcfunc_x, XC_GGA_X_PBE, XC_UNPOLARIZED) call xc_f03_func_init(xcfunc_c, XC_GGA_C_PBE, XC_UNPOLARIZED) - elseif (inp%iXC == xcFunctional%GGA_BLYP) then + case(xcFunctional%GGA_BLYP) call xc_f03_func_init(xcfunc_x, XC_GGA_X_B88, XC_UNPOLARIZED) call xc_f03_func_init(xcfunc_c, XC_GGA_C_LYP, XC_UNPOLARIZED) - elseif (inp%iXC == xcFunctional%LCY_PBE96) then + case(xcFunctional%LCY_PBE96) call xc_f03_func_init(xcfunc_x, XC_GGA_X_SFAT_PBE, XC_UNPOLARIZED) call xc_f03_func_set_ext_params(xcfunc_x, [inp%omega]) call xc_f03_func_init(xcfunc_c, XC_GGA_C_PBE, XC_UNPOLARIZED) - elseif (inp%iXC == xcFunctional%LCY_BNL) then + case(xcFunctional%LCY_BNL) call xc_f03_func_init(xcfunc_x, XC_LDA_X_YUKAWA, XC_UNPOLARIZED) call xc_f03_func_set_ext_params(xcfunc_x, [inp%omega]) call xc_f03_func_init(xcfunc_c, XC_GGA_C_PBE, XC_UNPOLARIZED) - elseif (inp%iXC == 6) then + case(xcFunctional%HYB_PBE0) ! xpbe96 call xc_f03_func_init(xcfunc_x, XC_GGA_X_PBE, XC_UNPOLARIZED) ! cpbe96 call xc_f03_func_init(xcfunc_c, XC_GGA_C_PBE, XC_UNPOLARIZED) - elseif (inp%iXC == 7) then + case(xcFunctional%HYB_B3LYP) call xc_f03_func_init(xcfunc_xc, XC_HYB_GGA_XC_B3LYP, XC_UNPOLARIZED) ! Adjustable fraction of Fock-type exchange, otherwise standard parametrization taken from ! J. Phys. Chem. 1994, 98, 45, 11623-11627; DOI: 10.1021/j100096a001 call xc_f03_func_set_ext_params(xcfunc_xc, [inp%camAlpha, 0.72_dp, 0.81_dp]) - elseif (inp%iXC == 8) then + case(xcFunctional%CAMY_B3LYP) call xc_f03_func_init(xcfunc_xc, XC_HYB_GGA_XC_CAMY_B3LYP, XC_UNPOLARIZED) call xc_f03_func_set_ext_params(xcfunc_xc, [0.81_dp, inp%camAlpha + inp%camBeta,& & -inp%camBeta, inp%omega]) - elseif (inp%iXC == 9) then + case(xcFunctional%CAMY_PBEh) ! short-range xpbe96 call xc_f03_func_init(xcfunc_xsr, XC_GGA_X_SFAT_PBE, XC_UNPOLARIZED) call xc_f03_func_set_ext_params(xcfunc_xsr, [inp%omega]) @@ -268,7 +269,7 @@ subroutine get_twocenter_integrals(inp, imap, skham, skover) call xc_f03_func_init(xcfunc_x, XC_GGA_X_PBE, XC_UNPOLARIZED) ! cpbe96 call xc_f03_func_init(xcfunc_c, XC_GGA_C_PBE, XC_UNPOLARIZED) - end if + end select if (inp%tLC .or. inp%tCam) then beckeGridParams%nRadial = inp%nRadial @@ -378,11 +379,11 @@ subroutine get_twocenter_integrals(inp, imap, skham, skover) ! finalize libxc objects if (inp%tGlobalHybrid .or. inp%tCam) then - if (inp%iXC == 9) then + if (inp%iXC == xcFunctional%CAMY_PBEh) then call xc_f03_func_end(xcfunc_xsr) call xc_f03_func_end(xcfunc_x) call xc_f03_func_end(xcfunc_c) - elseif (inp%iXC == 6) then + elseif (inp%iXC == xcFunctional%HYB_PBE0) then call xc_f03_func_end(xcfunc_x) call xc_f03_func_end(xcfunc_c) else @@ -572,7 +573,7 @@ subroutine getskintegrals(beckeInt, radialHFQuadrature, nRad, nAng, atom1, atom2 end if ! CAMY-PBEh is assembled manually - if (iXC == 9) then + if (iXC == xcFunctional%CAMY_PBEh) then allocate(vxsigma_sr(nGrid)) vxsigma_sr(:) = 0.0_dp allocate(vx_sr(nGrid)) diff --git a/sktwocnt/prog/input.f90 b/sktwocnt/prog/input.f90 index 8f8a90d3..1c636b49 100644 --- a/sktwocnt/prog/input.f90 +++ b/sktwocnt/prog/input.f90 @@ -90,10 +90,10 @@ subroutine readInput(inp, fname) case(xcFunctional%GGA_BLYP) ! GGA-BLYP case(xcFunctional%LCY_PBE96) - ! LCY-PBE96 (long-range corrected) + ! LCY-PBE96 (purely long-range corrected) inp%tLC = .true. case(xcFunctional%LCY_BNL) - ! LCY-BNL (long-range corrected) + ! LCY-BNL (purely long-range corrected) inp%tLC = .true. case(xcFunctional%HYB_PBE0) ! PBE0 (global hybrid) @@ -102,10 +102,10 @@ subroutine readInput(inp, fname) ! B3LYP (global hybrid) inp%tGlobalHybrid = .true. case(xcFunctional%CAMY_B3LYP) - ! CAMY-B3LYP (CAM-functional) + ! CAMY-B3LYP (general CAM form) inp%tCam = .true. case(xcFunctional%CAMY_PBEh) - ! CAMY-PBEh (CAM-functional) + ! CAMY-PBEh (general CAM form) inp%tCam = .true. case default call error_("Unknown exchange-correlation functional!", fname, line, iline) @@ -113,7 +113,7 @@ subroutine readInput(inp, fname) inp%iXC = iXC if (inp%iXC == xcFunctional%HYB_B3LYP) then - ! 20% HFX hard-coded at the moment + ! 20% fraction of HFX hard-coded at the moment inp%camAlpha = 0.2_dp inp%camBeta = 0.0_dp call nextline_(fp, iLine, line) @@ -129,6 +129,8 @@ subroutine readInput(inp, fname) read(line, *, iostat=iErr) inp%nRadial, inp%nAngular, inp%ll_max, inp%rm call checkerror_(fname, line, iLine, iErr) elseif (inp%tLC) then + inp%camAlpha = 0.0_dp + inp%camBeta = 1.0_dp call nextline_(fp, iLine, line) read(line, *, iostat=iErr) inp%omega if (inp%omega < 1.0e-08_dp) then diff --git a/slateratom/lib/dft.f90 b/slateratom/lib/dft.f90 index 4568acc4..cda52119 100644 --- a/slateratom/lib/dft.f90 +++ b/slateratom/lib/dft.f90 @@ -210,7 +210,7 @@ subroutine density_grid(pp, max_l, num_alpha, poly_order, alpha, num_mesh_points case(xcFunctional%HYB_PBE0) call getExcVxc_HYB_PBE0(abcissa, dz, dzdr, rho, drho, sigma, camAlpha, exc, vxc) case(xcFunctional%HYB_B3LYP) - call getExcVxc_HYB_B3LYP(abcissa, dz, dzdr, rho, drho, sigma, exc, vxc) + call getExcVxc_HYB_B3LYP(abcissa, dz, dzdr, rho, drho, sigma, camAlpha, exc, vxc) case(xcFunctional%CAMY_B3LYP) call getExcVxc_CAMY_B3LYP(abcissa, dz, dzdr, rho, drho, sigma, omega, camAlpha, camBeta, exc,& & vxc) diff --git a/slateratom/lib/input.f90 b/slateratom/lib/input.f90 index bb2b75fc..a5ddc130 100644 --- a/slateratom/lib/input.f90 +++ b/slateratom/lib/input.f90 @@ -101,6 +101,10 @@ subroutine read_input_1(nuc, max_l, occ_shells, maxiter, scftol, poly_order, min !! auxiliary variables integer :: ii, jj + omega = 0.0_dp + camAlpha = 0.0_dp + camBeta = 0.0_dp + write(*, '(A)') 'Enter nuclear charge, maximal angular momentum (s=0), max. SCF, SCF tol., ZORA' read(*,*) nuc, max_l, maxiter, scftol, tZora @@ -115,12 +119,15 @@ subroutine read_input_1(nuc, max_l, occ_shells, maxiter, scftol, poly_order, min end if if (xcFunctional%isLongRangeCorrected(xcnr)) then + camBeta = 1.0_dp write(*, '(A)') 'Enter range-separation parameter:' read(*,*) omega elseif (xcnr == xcFunctional%HYB_PBE0) then ! currently only HYB-PBE0 does support arbitrary HFX portions (HYB-B3LYP does not) write(*, '(A)') 'Enter portion of HFX (CAM alpha):' read(*,*) camAlpha + elseif (xcnr == xcFunctional%HYB_B3LYP) then + camAlpha = 0.2_dp elseif (xcFunctional%isCAMY(xcnr)) then write(*, '(A)') 'Enter range-separation parameter, CAM alpha, CAM beta:' read(*,*) omega, camAlpha, camBeta diff --git a/slateratom/lib/xcfunctionals.f90 b/slateratom/lib/xcfunctionals.f90 index 8ef864b0..cb20cd34 100644 --- a/slateratom/lib/xcfunctionals.f90 +++ b/slateratom/lib/xcfunctionals.f90 @@ -713,7 +713,7 @@ end subroutine getExcVxc_HYB_PBE0 !> Calculates exc and vxc for the HYB-B3LYP xc-functional. - subroutine getExcVxc_HYB_B3LYP(abcissa, dz, dzdr, rho, drho, sigma, exc, vxc) + subroutine getExcVxc_HYB_B3LYP(abcissa, dz, dzdr, rho, drho, sigma, camAlpha, exc, vxc) !> numerical integration abcissas real(dp), intent(in) :: abcissa(:) @@ -733,6 +733,9 @@ subroutine getExcVxc_HYB_B3LYP(abcissa, dz, dzdr, rho, drho, sigma, exc, vxc) !> contracted gradients of the density real(dp), intent(in), allocatable :: sigma(:,:) + !> CAM alpha parameter + real(dp), intent(in) :: camAlpha + !> exc energy density on grid real(dp), intent(out) :: exc(:) @@ -772,9 +775,9 @@ subroutine getExcVxc_HYB_B3LYP(abcissa, dz, dzdr, rho, drho, sigma, exc, vxc) vxcsigma(:,:) = 0.0_dp call xc_f03_func_init(xcfunc_xc, XC_HYB_GGA_XC_B3LYP, XC_POLARIZED) - ! Standard parametrization of B3LYP taken from + ! Adjustable fraction of Fock-type exchange, otherwise standard parametrization taken from ! J. Phys. Chem. 1994, 98, 45, 11623-11627; DOI: 10.1021/j100096a001 - call xc_f03_func_set_ext_params(xcfunc_xc, [0.20_dp, 0.72_dp, 0.81_dp]) + call xc_f03_func_set_ext_params(xcfunc_xc, [camAlpha, 0.72_dp, 0.81_dp]) ! exchange + correlation call xc_f03_gga_exc_vxc(xcfunc_xc, nn, rhor(1, 1), sigma(1, 1), exc_tmp(1), vxc_tmp(1, 1),& From 515d5a4eb49c12fdb74a930470c6de3598a97c77 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Fri, 3 May 2024 16:42:49 +0200 Subject: [PATCH 20/25] Remove superfluous #:endif directive --- common/include/common.fypp | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/include/common.fypp b/common/include/common.fypp index 759424c9..7478c688 100644 --- a/common/include/common.fypp +++ b/common/include/common.fypp @@ -28,8 +28,6 @@ #:endif #:enddef DEBUG_CODE -#:endif - #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #! Misc macros From 9efd683f31503396901a607469a7db0dd7d3ee1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Aradi?= Date: Wed, 8 May 2024 17:23:38 +0200 Subject: [PATCH 21/25] Fix element name convention --- sktools/src/sktools/skdef.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sktools/src/sktools/skdef.py b/sktools/src/sktools/skdef.py index 22bfca39..54a7de70 100644 --- a/sktools/src/sktools/skdef.py +++ b/sktools/src/sktools/skdef.py @@ -441,8 +441,6 @@ class OnecenterParameters(sc.ClassDict): `calculator`. """ - _PATTERN_DEFAULT = re.compile(r"^([a-z:]+(?:,[a-z:]+)*)$", re.IGNORECASE) - @classmethod def fromhsd(cls, root, query): """Returns one center parameters with substituted defaults.""" @@ -492,7 +490,8 @@ class TwocenterParameters(sc.ClassDict): `calculator`. """ - _PATTERN_DEFAULT = re.compile(r"^([a-z:]+)-([a-z:]+)$", re.IGNORECASE) + _PATTERN_DEFAULT = re.compile( + r"^([a-z][a-z0-9_]*)-([a-z][a-z0-9_]*)$", re.IGNORECASE) @classmethod def fromhsd(cls, root, query): From 016865e50f9f597e81497ac2496fb908c29531c9 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Wed, 22 May 2024 09:00:37 +0200 Subject: [PATCH 22/25] Install Intel components from cache and update CI config (#86) --- .github/workflows/build.yml | 92 +++++++++++++------------------------ 1 file changed, 32 insertions(+), 60 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 22ed4157..4b0d6f77 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,23 +3,21 @@ on: [push, pull_request] env: CI: "ON" - HOMEBREW_NO_ANALYTICS: "ON" - HOMEBREW_NO_AUTO_UPDATE: "ON" - HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON" - HOMEBREW_NO_GITHUB_API: "ON" - HOMEBREW_NO_INSTALL_CLEANUP: "ON" BUILD_DIR: _build INSTALL_DIR: _install jobs: + gcc-build: + runs-on: ${{ matrix.os }} + strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest] config: [Debug] - version: [11] + version: [13] steps: - name: Checkout code @@ -30,20 +28,7 @@ jobs: with: python-version: '3.x' - # Note: xcode version 14.0 (default on macos-latest @ 2022-11-23) fails to link gfortran compiled - # code. Therefore, 14.1 is selected below (which seems to be installed.) - - name: Install GCC (OSX) - if: ${{ contains(matrix.os, 'macos') }} - run: | - brew install gcc@${{ matrix.version }} openblas - ln -s /usr/local/bin/gfortran-${{ matrix.version }} /usr/local/bin/gfortran - ln -s /usr/local/bin/gcc-${{ matrix.version }} /usr/local/bin/gcc - ln -s /usr/local/bin/g++-${{ matrix.version }} /usr/local/bin/g++ - echo "PKG_CONFIG_PATH=/usr/local/opt/openblas/lib/pkgconfig" >> $GITHUB_ENV - xcversion select 14.1 - - name: Install GCC (Linux) - if: ${{ contains(matrix.os, 'ubuntu') }} run: | sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update @@ -53,31 +38,23 @@ jobs: --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.version }} \ --slave /usr/bin/gcov gcov /usr/bin/gcov-${{ matrix.version }} - - name: Set Compiler (Linux) - if: contains(matrix.os, 'ubuntu') + - name: Set Compiler run: | echo "FC=gfortran" >> $GITHUB_ENV echo "CC=gcc" >> $GITHUB_ENV - - name: Set Compiler (OSX) - if: contains(matrix.os, 'macos') - run: | - echo "FC=gfortran-${{ matrix.version }}" >> $GITHUB_ENV - echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV - - name: Compile and Install libXC run: | git clone https://gitlab.com/libxc/libxc.git cd libxc/ - git checkout 6.1.0 - FC=gfortran CC=gcc cmake -H. -B ${BUILD_DIR} -DENABLE_FORTRAN=True -DCMAKE_INSTALL_PREFIX=${PWD}/${BUILD_DIR}/${INSTALL_DIR} + git checkout 6.2.2 + cmake -DCMAKE_INSTALL_PREFIX=${PWD}/${BUILD_DIR}/${INSTALL_DIR} -DENABLE_FORTRAN=True -B ${BUILD_DIR} . cd ${BUILD_DIR} - make -j + make -j 2 make install cd ../../ - name: Set libXC search path - if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos') run: | echo "CMAKE_PREFIX_PATH=./libxc/${BUILD_DIR}/${INSTALL_DIR}/" >> $GITHUB_ENV @@ -105,23 +82,20 @@ jobs: cmake --install ${BUILD_DIR} intel-build: - runs-on: ${{ matrix.os }} + strategy: - fail-fast: false matrix: os: [ubuntu-latest] - fc: [ifx] - cc: [icx] + config: [RelWithDebInfo] + + runs-on: ${{ matrix.os }} + env: - FC: ${{ matrix.fc }} - CC: ${{ matrix.cc }} - APT_PACKAGES: >- - intel-oneapi-compiler-fortran - intel-oneapi-compiler-dpcpp-cpp - intel-oneapi-mkl - intel-oneapi-mkl-devel + FC: ifx + CC: icx CMAKE_OPTIONS: >- - -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DCMAKE_BUILD_TYPE=${{ matrix.config }} + -DFYPP_FLAGS='-DTRAVIS' steps: - name: Checkout code @@ -132,35 +106,33 @@ jobs: with: python-version: 3.x - - name: Add Intel repository - if: contains(matrix.os, 'ubuntu') - run: | - wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null - echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list - sudo apt-get update + - name: Setup Intel compiler + uses: rscohn2/setup-oneapi@v0 + with: + components: | + icx@2024.0.0 + ifx@2024.0.0 + mkl@2024.0.0 - - name: Install Intel oneAPI compiler - if: contains(matrix.os, 'ubuntu') + - name: Setup Intel environment run: | - sudo apt-get update - sudo apt-get install ${APT_PACKAGES} source /opt/intel/oneapi/setvars.sh - printenv >> $GITHUB_ENV + printenv >> ${GITHUB_ENV} + echo "FC=ifx" >> ${GITHUB_ENV} + echo "CC=icx" >> ${GITHUB_ENV} - name: Compile and install libXC - if: contains(matrix.os, 'ubuntu') run: | git clone https://gitlab.com/libxc/libxc.git cd libxc/ git checkout 6.2.2 - cmake -H. -B ${BUILD_DIR} -DENABLE_FORTRAN=True -DCMAKE_INSTALL_PREFIX=${PWD}/${BUILD_DIR}/${INSTALL_DIR} + cmake -DCMAKE_INSTALL_PREFIX=${PWD}/${BUILD_DIR}/${INSTALL_DIR} -DENABLE_FORTRAN=True -B ${BUILD_DIR} . cd ${BUILD_DIR} - make -j + make -j 2 make install cd ../../ - name: Set libXC search path - if: contains(matrix.os, 'ubuntu') run: | echo "CMAKE_PREFIX_PATH=./libxc/${BUILD_DIR}/${INSTALL_DIR}/" >> $GITHUB_ENV @@ -176,7 +148,7 @@ jobs: - name: Configure build run: | - cmake -B ${BUILD_DIR} -DCMAKE_INSTALL_PREFIX=${PWD}/${BUILD_DIR}/${INSTALL_DIR} . + cmake -DCMAKE_INSTALL_PREFIX=${PWD}/${BUILD_DIR}/${INSTALL_DIR} -B ${BUILD_DIR} . - name: Build project run: cmake --build ${BUILD_DIR} From ecac7d9e383985ef72880c169bcbd2475aeab2ae Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Wed, 22 May 2024 15:26:28 +0200 Subject: [PATCH 23/25] Fix syntax of format statement --- sktools/src/sktools/skdef.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sktools/src/sktools/skdef.py b/sktools/src/sktools/skdef.py index 54a7de70..5652cdbc 100644 --- a/sktools/src/sktools/skdef.py +++ b/sktools/src/sktools/skdef.py @@ -503,7 +503,7 @@ def fromhsd(cls, root, query): name = node.tag match = cls._PATTERN_DEFAULT.match(name) if not match: - msg = "Invalid two center interaction '{}'".name + msg = "Invalid two center interaction '{}'".format(name) raise sc.SkgenException(msg) name1, name2 = match.groups() key = min(name1, name2), max(name1, name2) From 4a9709acda057d102b175431a43e159c77b3a9b1 Mon Sep 17 00:00:00 2001 From: Tammo van der Heide Date: Sat, 22 Jun 2024 08:56:19 +0200 Subject: [PATCH 24/25] Mixer modernisation (#87) * Replace mixer implementations with more modern variants * Implement FYPP macros and re-enable assertions --- CMakeLists.txt | 4 +- common/include/common.fypp | 19 +- common/lib/CMakeLists.txt | 13 +- common/lib/assert.F90 | 41 ++ sktools/src/sktools/calculators/slateratom.py | 2 +- slateratom/lib/CMakeLists.txt | 22 +- slateratom/lib/blas.f90 | 48 ++ slateratom/lib/blasroutines.F90 | 51 ++ slateratom/lib/broyden.f90 | 532 ------------------ slateratom/lib/broydenmixer.F90 | 320 +++++++++++ slateratom/lib/globals.f90 | 54 +- slateratom/lib/hamiltonian.f90 | 28 +- slateratom/lib/input.f90 | 11 +- slateratom/lib/lapack.f90 | 38 ++ slateratom/lib/lapackroutines.F90 | 165 ++++++ slateratom/lib/mixer.f90 | 150 +++++ slateratom/lib/simplemixer.F90 | 74 +++ slateratom/prog/main.f90 | 12 +- test/prog/sktable/bin/testwithworkdir.py | 4 +- 19 files changed, 1016 insertions(+), 572 deletions(-) create mode 100644 common/lib/assert.F90 create mode 100644 slateratom/lib/blas.f90 create mode 100644 slateratom/lib/blasroutines.F90 delete mode 100644 slateratom/lib/broyden.f90 create mode 100644 slateratom/lib/broydenmixer.F90 create mode 100644 slateratom/lib/lapack.f90 create mode 100644 slateratom/lib/lapackroutines.F90 create mode 100644 slateratom/lib/mixer.f90 create mode 100644 slateratom/lib/simplemixer.F90 diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c43e8eb..8d8e9452 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,11 +61,13 @@ set(PYTHON_VERSION_MAJOR_MINOR "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR set(FYPP "${PROJECT_SOURCE_DIR}/external/fypp/bin/fypp" CACHE FILEPATH "Fypp preprocessor") skprogs_add_fypp_defines(FYPP_FLAGS) +set(FYPP_FLAGS "${FYPP_FLAGS}") set(FYPP_CONFIG_FLAGS "${FYPP_FLAGS}") # Make sure, the line-marker option is not set list(REMOVE_ITEM FYPP_CONFIG_FLAGS "-n") -set(FYPP_BUILD_FLAGS "${FYPP_FLAGS}" "$,-DDEBUG=1,-DDEBUG=0>") +set(FYPP_BUILD_FLAGS "${FYPP_FLAGS}" "--file-var-root=${CMAKE_SOURCE_DIR}" + "$,-DDEBUG=1,-DDEBUG=0>") set(PYTHON_INTERPRETER "python3" CACHE STRING "Python interpreter to use for installing and test python components") diff --git a/common/include/common.fypp b/common/include/common.fypp index 7478c688..17ad7d6a 100644 --- a/common/include/common.fypp +++ b/common/include/common.fypp @@ -18,9 +18,26 @@ #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -#! DEBUG related macros +#! ASSERT and DEBUG related macros #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +#! Check a condition if WITH_ASSERT is True and call assertError if condition is False. +#! If an optional text string is included, print this in addition as an error +#:def ASSERT(cond, msg=None) + #:if WITH_ASSERT + if (.not. (${cond}$)) then + block + use common_assert, only : assertError + #:if msg + call assertError("${_FILE_}$", ${_LINE_}$, ${msg}$) + #:else + call assertError("${_FILE_}$", ${_LINE_}$) + #:endif + end block + end if + #:endif +#:enddef ASSERT + #! Insert code if DEBUG level is greater than zero. #:def DEBUG_CODE(code) #:if DEBUG > 0 diff --git a/common/lib/CMakeLists.txt b/common/lib/CMakeLists.txt index 931c9f05..7a3a653a 100644 --- a/common/lib/CMakeLists.txt +++ b/common/lib/CMakeLists.txt @@ -1,10 +1,10 @@ -file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../" projectdir) +set(projectdir ${PROJECT_SOURCE_DIR}) # # General options for all targets # -set(fypp_flags ${FYPP_BUILD_FLAGS}) -list(APPEND fypp_flags -I${CMAKE_CURRENT_SOURCE_DIR}/../include -DRELEASE="'${RELEASE}'") +set(fypp_flags ${FYPP_BUILD_FLAGS} ${FYPP_CONFIG_FLAGS}) +list(APPEND fypp_flags -I${projectdir}/common/include -DRELEASE="'${RELEASE}'") set(sources-f90 accuracy.F90 @@ -30,7 +30,12 @@ set(sources-f90 taggedout.F90 utils.F90) -add_library(skprogs-common ${sources-f90}) +set(sources-fpp + assert.F90) + +skprogs_preprocess("${FYPP}" "${fypp_flags}" "F90" "f90" "${sources-fpp}" sources-f90-preproc) + +add_library(skprogs-common ${sources-f90} ${sources-f90-preproc}) set(moddir ${CMAKE_CURRENT_BINARY_DIR}/modfiles) set_target_properties(skprogs-common PROPERTIES Fortran_MODULE_DIRECTORY ${moddir}) diff --git a/common/lib/assert.F90 b/common/lib/assert.F90 new file mode 100644 index 00000000..abb65c12 --- /dev/null +++ b/common/lib/assert.F90 @@ -0,0 +1,41 @@ +#:include 'common.fypp' + +!> Auxiliary subroutines for the ASSERT command +module common_assert + + implicit none + + private +#:block DEBUG_CODE + public :: assertError +#:endblock DEBUG_CODE + +contains + +#:block DEBUG_CODE + + !> Prints assertion error and abort program execution. + subroutine assertError(fileName, lineNr, message) + + !> Name of the file in which the error occurred. + character(*), intent(in) :: fileName + + !> Nr. of the line at which the error occurred. + integer, intent(in) :: lineNr + + !> Additional message for error + character(*), intent(in), optional :: message + + write(*, '(A)') "!!! UNFULLFILLED ASSERTION" + write(*, '(A,A)') "!!! FILE: ", fileName + write(*, '(A,I0)') "!!! LINE NR.: ", lineNr + if (present(message)) then + write(*, '(A,A,A)') '!!! MESSAGE: "', trim(message), '"' + end if + error stop + + end subroutine assertError + +#:endblock DEBUG_CODE + +end module common_assert diff --git a/sktools/src/sktools/calculators/slateratom.py b/sktools/src/sktools/calculators/slateratom.py index c8e18530..5659ddb6 100644 --- a/sktools/src/sktools/calculators/slateratom.py +++ b/sktools/src/sktools/calculators/slateratom.py @@ -327,7 +327,7 @@ def write(self, workdir): out.append("{:s} \t\t{:s} write eigenvectors".format( self._LOGICALSTRS[False], self._COMMENT)) out.append("{} {:g} \t\t{:s} broyden mixer, mixing factor".format( - self._LOGICALSTRS[True], 0.1, self._COMMENT)) + 2, 0.1, self._COMMENT)) # Occupations for ll, occperl in enumerate(self._atomconfig.occupations): diff --git a/slateratom/lib/CMakeLists.txt b/slateratom/lib/CMakeLists.txt index df11f24f..78399778 100644 --- a/slateratom/lib/CMakeLists.txt +++ b/slateratom/lib/CMakeLists.txt @@ -1,6 +1,14 @@ +set(projectdir ${PROJECT_SOURCE_DIR}) + +# +# General options for all targets +# +set(fypp_flags ${FYPP_BUILD_FLAGS} ${FYPP_CONFIG_FLAGS}) +list(APPEND fypp_flags -I${projectdir}/common/include -DRELEASE="'${RELEASE}'") + set(sources-f90 avgpot.f90 - broyden.f90 + blas.f90 core_overlap.f90 coulomb_hfex.f90 coulomb_potential.f90 @@ -12,6 +20,8 @@ set(sources-f90 hamiltonian.f90 input.f90 integration.f90 + lapack.f90 + mixer.f90 numerical_differentiation.f90 output.f90 total_energy.f90 @@ -19,7 +29,15 @@ set(sources-f90 xcfunctionals.f90 zora_routines.f90) -add_library(skprogs-slateratom ${sources-f90}) +set(sources-fpp + blasroutines.F90 + broydenmixer.F90 + lapackroutines.F90 + simplemixer.F90) + +skprogs_preprocess("${FYPP}" "${fypp_flags}" "F90" "f90" "${sources-fpp}" sources-f90-preproc) + +add_library(skprogs-slateratom ${sources-f90} ${sources-f90-preproc}) target_link_libraries(skprogs-slateratom skprogs-common Libxc::xcf03 Libxc::xc) target_link_libraries(skprogs-slateratom skprogs-common LAPACK::LAPACK) diff --git a/slateratom/lib/blas.f90 b/slateratom/lib/blas.f90 new file mode 100644 index 00000000..ce701ec3 --- /dev/null +++ b/slateratom/lib/blas.f90 @@ -0,0 +1,48 @@ +!> Interface wrapper for the blas routines. +!! +!! ALL BLAS routines which are called from the main code must be included here. +module blas + + use common_accuracy, only : rdp + public + + interface + + + !> Performs the rank 1 operation + !! A := alpha*x*y**T + A, + subroutine dger(mm, nn, alpha, xx, incx, yy, incy, aa, lda) + import rdp + + !> Matrix sizing + integer, intent(in) :: mm + + !> Matrix size + integer, intent(in) :: nn + + !> Scale factor + real(rdp), intent(in) :: alpha + + !> Vector + real(rdp), intent(in) :: xx(*) + + !> Stride + integer, intent(in) :: incx + + !> Vector + real(rdp), intent(in) :: yy(*) + + !> Stride + integer, intent(in) :: incy + + !> Leading matrix dimension + integer, intent(in) :: lda + + !> Matrix A + real(rdp), intent(inout) :: aa(lda, *) + + end subroutine dger + + end interface + +end module blas diff --git a/slateratom/lib/blasroutines.F90 b/slateratom/lib/blasroutines.F90 new file mode 100644 index 00000000..55f24aaf --- /dev/null +++ b/slateratom/lib/blasroutines.F90 @@ -0,0 +1,51 @@ +#:include 'common.fypp' + +!> Contains F90 wrapper functions for some commonly used blas calls needed in the code. +!! The interface of all BLAS calls must be defined in the module blas. +module blasroutines + + use common_accuracy, only : rdp + use blas, only : dger + implicit none + + private + public :: ger + + + !> Rank 1 update of a matrix A := alpha*x*y' + A + !! Wrapper for the level 2 blas routine xger to perform the rank 1 update of a general matrix + interface ger + module procedure ger_dble + end interface ger + + +contains + + !> Double precision rank 1 update of a general matrix + subroutine ger_dble(a, alpha, x, y) + + !> Contains the matrix for the update + real(rdp), intent(inout) :: a(:,:) + + !> Scaling value for the update contribution + real(rdp), intent(in) :: alpha + + !> Vector of values for the update + real(rdp), intent(in) :: x(:) + + !> Vector of values for the update + real(rdp), intent(in) :: y(:) + + integer :: n, m + + @:ASSERT(size(a,dim=1) == size(x)) + @:ASSERT(size(a,dim=2) == size(y)) + + m = size(x) + n = size(y) + + call dger(m, n, alpha, x, 1, y, 1, a, m) + + end subroutine ger_dble + +end module blasroutines diff --git a/slateratom/lib/broyden.f90 b/slateratom/lib/broyden.f90 deleted file mode 100644 index 0ae18072..00000000 --- a/slateratom/lib/broyden.f90 +++ /dev/null @@ -1,532 +0,0 @@ -!> Module that provides the density mixing functionality (simple, Broyden). -module broyden - - use common_accuracy, only : dp - - implicit none - private - - public :: mixing_driver - - -contains - - !> This is the main driver for simple and broyden mixers, both mix one big one-dimensional array. - subroutine mixing_driver(pot_old, pot_new, max_l, num_alpha, poly_order, problemsize, iter,& - & tBroyden, mixing_factor) - - !> old potential - real(dp), intent(in) :: pot_old(:,0:,:,:) - - !> contains current potential on entry and mixed potential on exit - real(dp), intent(inout) :: pot_new(:,0:,:,:) - - !> maximum angular momentum - integer, intent(in) :: max_l - - !> number of exponents in each shell - integer, intent(in) :: num_alpha(0:) - - !> highest polynomial order + l in each shell - integer, intent(in) :: poly_order(0:) - - !> maximum size of the eigenproblem - integer, intent(in) :: problemsize - - !> current SCF iteration - integer, intent(in) :: iter - - !> true, if Broyden mixing is desired, otherwise simple mixing is applied - logical, intent(in) :: tBroyden - - !> mixing factor - real(dp), intent(in) :: mixing_factor - - !> serialized potentials - real(dp), allocatable :: vecin(:), vecout(:) - - !> equals current SCF iteration or next one if (iter == 0) - integer :: titer - - !> auxiliary variables - integer :: ii, jj, kk, ll, pp - - allocate(vecout(size(pot_old))) - allocate(vecin(size(pot_old))) - - ! serialize potentials - pp = 0 - do ii = 1, 2 - do jj = 0, max_l - do kk = 1, num_alpha(jj) * poly_order(jj) - do ll = 1, problemsize - pp = pp + 1 - vecin(pp) = pot_old(ii, jj, kk, ll) - vecout(pp) = pot_new(ii, jj, kk, ll) - end do - end do - end do - end do - - ! this check is still necessary, since max. 10000 entries is hardcoded in broyden_mixer - if (pp > 10000) then - write(*,*) 'Static dimensions in broyden_mixer too small: ', pp - stop - end if - - titer = iter - ! broyden returns if (iter == 0) - if (iter == 0) titer = 1 - - if (tBroyden) then - call broyden_mixer(titer, mixing_factor, size(vecin), vecin, vecout) - else - call simple_mix(vecin, vecout, mixing_factor) - end if - - ! deserialize obtained potential - pp = 0 - do ii = 1, 2 - do jj = 0, max_l - do kk = 1, num_alpha(jj) * poly_order(jj) - do ll = 1, problemsize - pp = pp + 1 - pot_new(ii, jj, kk, ll) = vecin(pp) - end do - end do - end do - end do - - end subroutine mixing_driver - - - !> Simple mixer for last and current density. - subroutine simple_mix(last, cur, factor) - - !> old vector, holds mixed values at exit - real(dp), intent(inout) :: last(:) - - !> new vector - real(dp), intent(in) :: cur(:) - - !> mixing factor - real(dp), intent(in) :: factor - - last(:) = factor * cur + (1.0_dp - factor) * last - - end subroutine simple_mix - - -! -!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - SUBROUTINE BROYDEN_mixer(NITER,ALPHA,JTOP,VECIN,VECOUT) - -! This is the Broyden routine as also implemented in the old DFTB code. - - IMPLICIT real(dp) (A-H,O-Z) - IMPLICIT INTEGER (I-N) -! -!************************************************************ -!* THE VECTORS UI(MAXSIZ) AND VTI(MAXSIZ) ARE JOHNSON'S * -!* U(OF I ) AND DF(TRANSPOSE), RESPECTIVELY. THESE ARE * -!* CONTINUALLY UPDATED. ALL ITERATIONS ARE S7ORED ON TAPE * -!* 32 . THIS IS DONE TO PREVENT THE PROHIBITIVE STORAGE * -!* COSTS ASSOCIATED WITH HOLDING ONTO THE ENTIRE JACOBIAN. * -!* VECTOR TL IS THE VT OF EARLIER ITERATIONS. VECTOR F IS: * -!* VECTOR(OUTPUT) - VECTOR(IN). VECTOR DF IS: F(M+1)-F(M) * -!* FINALLY,VECTOR DUMVI(MAXSIZ) IS THE PREDICTED VECTOR. * -!* ON RETURN, VECIN CONTAINS THE NEW TRIAL VECTOR. * -!************************************************************ -!* FOR THE CRAY2-CIVIC ENVIRONMENT , FILES 32 AND 31 * -!* SHOULD BE INTRODUCED IN THE LINK STATEMENT. * -!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - PARAMETER (ZERO=0.0D0,ONE=1.0D0,IMATSZ=40,maxsiz=10000) -! formerly IMATSZ=90 -! -! ADDED PARAMETER MAXITER. POREZAG, MAY 1995 -! - PARAMETER(MAXITER=15) -! -! replaced writing to disk by storing values in -! arrays UNIT31, UNIT32 hajnal@scientist.com 2000-10-4 -!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -! -! CHARACTER*7 NAMES -! -! SCRATCH COMMON BLOCK FOR LOCAL VARIABLES -! - DIMENSION VECIN(*),VECOUT(*) - DIMENSION F(MAXSIZ),UI(MAXSIZ),VTI(MAXSIZ),T1(MAXSIZ),& - & VECTOR(MAXSIZ,2),DUMVI(MAXSIZ),DF(MAXSIZ) -! DIMENSION NAMES(3) - DIMENSION A(IMATSZ,IMATSZ),B(IMATSZ,IMATSZ),CM(IMATSZ) - DIMENSION D(IMATSZ,IMATSZ),W(IMATSZ) - DIMENSION UNIT31(MAXSIZ,2),UNIT32(MAXSIZ,2,MAXITER+15) -! DATA NAMES/'BROYD01','BROYD02','BROYD03'/ - real(dp) UAMIX,WTMP - INTEGER ILASTIT - common /broyd/ uamix, w, WTMP, unit31, unit32, ilastit - save -! -! PRINT *,'IN MIXING, WHERE ARE YOU?' -! -! NEW LINES JULY 1996 -! - IF (JTOP .GT. MAXSIZ) THEN - PRINT *,'BROYDEN: JTOP > MAXSIZ' - STOP - END IF -! -! NEW LINES POREZAG, MAY 1995 -! - ITER=NITER - IF(NITER.GT.MAXITER)ITER=MOD(ITER,MAXITER)+1 - IF(ITER.EQ.0)RETURN -! -! END NEW LINES -! -! OPEN(66,FILE=NAMES(1),STATUS='UNKNOWN',FORM='FORMATTED') -! REWIND(66) -! OPEN(31,FILE=NAMES(2),STATUS='UNKNOWN',FORM='UNFORMATTED') -! OPEN(32,FILE=NAMES(3),STATUS='UNKNOWN',FORM='UNFORMATTED') -! REWIND(31) -! REWIND(32) - -! IF(ITER.EQ.1)THEN -! ENDFILE 31 -! ENDFILE 32 -! END IF -! -! -!++++++ SET UP THE VECTOR OF THE CURRENT ITERATION FOR MIXING ++++++ -! -! FOR THIS METHOD WE HAVE ONLY SAVED INPUT/OUTPUT CHG. DENSITIES, - DO K=1,JTOP - VECTOR(K,1)= VECIN(K) - VECTOR(K,2)= VECOUT(K) - END DO -!++++++ END OF PROGRAM SPECIFIC LOADING OF VECTOR FROM MAIN ++++++++ -! -! IVSIZ IS THE LENGTH OF THE VECTOR - IVSIZ=JTOP -! IF(ITER.LT.3)WRITE( 6,1001)IVSIZ - IF(IVSIZ.GT.MAXSIZ)THEN - PRINT *,'MIXING: EXCEEDED MAXIMAL VECTOR LENGTH' - STOP - END IF -! -! -!******************* BEGIN BROYDEN'S METHOD ********************** -! -! WEIGHTING FACTOR FOR THE ZEROTH ITERATION - W0=0.01D0 -! -! F: THE DIFFERENCE OF PREVIOUS OUTPUT AND INPUT VECTORS -! DUMVI: A DUMMY VECTOR, HERE IT IS THE PREVIOUS INPUT VECTOR -! REWIND(31) -! READ(31,END=119,ERR=119)AMIX,LASTIT - IF (ITER .EQ. 1) THEN - GOTO 119 - ELSE - AMIX=UAMIX - LASTIT=ILASTIT - END IF -! READ(31)(F(K),K=1,IVSIZ) - DO k=1,IVSIZ - F(k)=UNIT31(K,1) - END DO -! READ(31)(DUMVI(K),K=1,IVSIZ) - DO k=1,IVSIZ - DUMVI(k)=UNIT31(K,2) - END DO -! IF(ITER.EQ.1 .AND. LASTIT.GT.1)THEN -! READ(31)LTMP,((A(I,J),I=1,LTMP),J=1,LTMP) -! READ(31)(W(I),I=1,LTMP) -! ENDIF -! -! ALPHA(OR AMIX)IS SIMPLE MIXING PARAMETERS -! WRITE(66,1002)AMIX,ITER+1 -! - DO K=1,IVSIZ - DUMVI(K)=VECTOR(K,1)-DUMVI(K) - DF(K)=VECTOR(K,2)-VECTOR(K,1)-F(K) - END DO - DO K=1,IVSIZ - F(K)=VECTOR(K,2)-VECTOR(K,1) - END DO -! -! FOR I-TH ITER.,DFNORM IS ( F(I) MINUS F(I-1) ), USED FOR NORMALIZATION -! - DFNORM=ZERO - FNORM=ZERO - DO K=1,IVSIZ - DFNORM=DFNORM + DF(K)*DF(K) - FNORM=FNORM + F(K)*F(K) - END DO - DFNORM=SQRT(DFNORM) - FNORM=SQRT(FNORM) -! WRITE(66,'('' DFNORM '',E12.6,'' FNORM '',E12.6)')DFNORM,FNORM -! - FAC2=ONE/DFNORM - FAC1=AMIX*FAC2 -! - DO K=1,IVSIZ - UI(K) = FAC1*DF(K) + FAC2*DUMVI(K) - VTI(K)= FAC2*DF(K) - END DO -! -!*********** CALCULATION OF COEFFICIENT MATRICES ************* -!*********** AND THE SUM FOR CORRECTIONS ************* -! -! RECALL: A(I,J) IS A SYMMETRIC MATRIX -! : B(I,J) IS THE INVERSE OF [ W0**2 I + A ] -! - LASTIT=LASTIT+1 - LASTM1=LASTIT-1 - LASTM2=LASTIT-2 -! -! DUMVI IS THE U(OF I) AND T1 IS THE VT(OF I) -! FROM THE PREVIOUS ITERATIONS -! REWIND(32) -! WRITE(66,1003)LASTIT,LASTM1 - IF(LASTIT.GT.2)THEN - DO J=1,LASTM2 -! READ(32)(DUMVI(K),K=1,IVSIZ) - DO k=1,IVSIZ - DUMVI(k)=UNIT32(k,1,J) - END DO -! READ(32)(T1(K),K=1,IVSIZ) - DO k=1,IVSIZ - T1(k)=UNIT32(k,2,J) - END DO -! - AIJ=ZERO - CMJ=ZERO - DO K=1,IVSIZ - CMJ=CMJ + T1(K)*F(K) - AIJ=AIJ + T1(K)*VTI(K) - END DO - A(LASTM1,J)=AIJ - A(J,LASTM1)=AIJ - CM(J)=CMJ - END DO - ENDIF -! - AIJ=ZERO - CMJ=ZERO - DO K=1,IVSIZ - CMJ= CMJ + VTI(K)*F(K) - AIJ= AIJ + VTI(K)*VTI(K) - END DO - A(LASTM1,LASTM1)=AIJ - CM(LASTM1)=CMJ -! -! WRITE(32)(UI(K),K=1,IVSIZ) - DO k=1,IVSIZ - UNIT32(k,1,LASTM1)=UI(k) - END DO -! WRITE(32)(VTI(K),K=1,IVSIZ) - DO k=1,IVSIZ - UNIT32(k,2,LASTM1)=VTI(k) - END DO -! REWIND(32) -! -! THE WEIGHTING FACTORS FOR EACH ITERATION HAVE BEEN CHOSEN -! EQUAL TO ONE OVER THE R.M.S. ERROR. THIS NEED NOT BE THE CASE. - IF(FNORM .GT. 1.0D-7)THEN - WTMP=0.010D0/FNORM - ELSE - WTMP=1.0D5 - END IF - IF(WTMP.LT. 1.00D0) then - WTMP=1.00D0 - end if -! print *,wtmp,lastm1,w(lastm1) - W(LASTM1)=WTMP -! WRITE(66,'('' WEIGHTING SET = '',E12.6)')WTMP -! -! -! WITH THE CURRENT ITERATIONS F AND VECTOR CALCULATED, -! WRITE THEM TO UNIT 31 FOR USE LATER. -! REWIND(31) -! WRITE(31)AMIX,LASTIT - UAMIX=AMIX - ILASTIT=LASTIT -! WRITE(31)(F(K),K=1,IVSIZ) - DO k=1,IVSIZ - UNIT31(K,1)=F(k) - END DO -! WRITE(31)(VECTOR(K,1),K=1,IVSIZ) - DO k=1,IVSIZ - UNIT31(K,2)=VECTOR(K,1) - END DO -! WRITE(31)LASTM1,((A(I,J),I=1,LASTM1),J=1,LASTM1) -! WRITE(31)(W(I),I=1,LASTM1) -! -! SET UP AND CALCULATE BETA MATRIX - DO LM=1,LASTM1 - DO LN=1,LASTM1 - D(LN,LM)= A(LN,LM)*W(LN)*W(LM) - B(LN,LM)= ZERO - END DO - B(LM,LM)= ONE - D(LM,LM)= W0**2 + A(LM,LM)*W(LM)*W(LM) - END DO -! - CALL INVERSE(D,B,LASTM1) -! -! CALCULATE THE VECTOR FOR THE NEW ITERATION - DO K=1,IVSIZ - DUMVI(K)= VECTOR(K,1) + AMIX*F(K) - END DO -! - DO I=1,LASTM1 -! READ(32)(UI(K),K=1,IVSIZ) - DO k=1,IVSIZ - UI(k)=UNIT32(k,1,I) - END DO -! READ(32)(VTI(K),K=1,IVSIZ) - DO k=1,IVSIZ - VTI(k)=UNIT32(k,2,I) - END DO - GMI=ZERO - DO IP=1,LASTM1 - GMI=GMI + CM(IP)*B(IP,I)*W(IP) - END DO - DO K=1,IVSIZ - DUMVI(K)=DUMVI(K)-GMI*UI(K)*W(I) - END DO - END DO -! END OF THE CALCULATION OF DUMVI, THE NEW VECTOR -! -! REWIND(31) -! REWIND(32) -! - GOTO 120 -! IF THIS IS THE FIRST ITERATION, THEN LOAD -! F=VECTOR(OUT)-VECTOR(IN) AND VECTOR(IN) - 119 CONTINUE -! PRINT*,'SIMPLE MIXING THIS ITERATION' -! REWIND(31) - LASTIT=1 - AMIX=ALPHA -! WRITE(31)AMIX,LASTIT - UAMIX=AMIX - ILASTIT=LASTIT - DO K=1,IVSIZ - F(K)=VECTOR(K,2)-VECTOR(K,1) - END DO -! WRITE(31)(F(K),K=1,IVSIZ) - DO k=1,IVSIZ - UNIT31(K,1)=F(k) - END DO -! WRITE(31)(VECTOR(K,1),K=1,IVSIZ) - DO k=1,IVSIZ - UNIT31(K,2)=VECTOR(K,1) - END DO -! -! SINCE WE ARE ON THE FIRST ITERATION, SIMPLE MIX THE VECTOR. - DO K=1,IVSIZ - DUMVI(K)= VECTOR(K,1) + AMIX*F(K) - END DO -! WRITE( 6,1000) - 120 CONTINUE -! -! CLOSE(31,STATUS='KEEP') -! CLOSE(32,STATUS='KEEP') -! -!************* THE END OF THE BROYDEN METHOD ************** -! -!+++++++ PROGRAM SPECIFIC CODE OF RELOADING ARRAYS +++++++++ -! -! NEED TO UNLOAD THE NEW VECTOR INTO THE APPROPRIATE ARRAYS. - DO K=1,JTOP - VECIN(K)=DUMVI(K) - END DO -! -!+++++++++ END OF PROGRAM SPECIFIC RELOADING OF ARRAYS +++++++++ -! -! WRITE(66,1004)ITER+1 -! CLOSE(66) - RETURN -! - 1000 FORMAT(' ----> STRAIGHT MIXING ON THIS ITERATION') - 1001 FORMAT(' IN MIXING: IVSIZ =',I7,/) - 1002 FORMAT(' IN MIXING: SIMPLE MIX PARAMETER',1(F10.6,',')& - & ,' FOR ITER=',I5) - 1003 FORMAT(' CURRENT ITER= ',I5,' INCLUDES VALUES FROM ITER=',I5) - 1004 FORMAT(10X,'DENSITY FOR ITERATION',I4,' PREPARED') - END subroutine broyden_mixer -! -! CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC - SUBROUTINE INVERSE(A,B,M) - IMPLICIT real(dp) (A-H,O-Z) - IMPLICIT INTEGER (I-N) - -! ============================================================= -! -!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - PARAMETER (IMATSZ=40) -!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -! - DIMENSION A(IMATSZ,IMATSZ),B(IMATSZ,IMATSZ) - DIMENSION TD(IMATSZ),AD(IMATSZ),BD(IMATSZ) - SAVE -! -! SUBROUTINE TO PREFORM GAUSSIAN ELIMINATION -! NO ZEROS ALONG THE DIAGONAL -! - N=M - IF(N.GT.IMATSZ)THEN - PRINT *,'INVERT: MATRIX A TOO LARGE' - STOP - END IF -! - DO I=1,N - ATMP=A(I,I) - IF(ABS(ATMP) .LT. 1.0D-08)THEN -! WRITE(66,'('' INVERT: MATRIX HAS ZERO DIAGONAL'', -! & '' ELEMENT IN THE '',I4,'' ROW'')')I - STOP - ENDIF - END DO -! - IF(N.EQ.1) GO TO 605 -! - DO I=1,N -! - DO J=1,N - TD(J)=A(J,I)/A(I,I) - END DO -! -! TD(I)=(0.0E+00,0.0E+00) - TD(I)=0.0D0 -! - DO K=1,N - BD(K)=B(I,K) - AD(K)=A(I,K) - END DO -! - DO K=1,N - DO J=1,N - B(J,K)=B(J,K)-(TD(J)*BD(K)) - A(J,K)=A(J,K)-(TD(J)*AD(K)) - END DO - END DO -! - END DO -! - DO I=1,N - DO J=1,N - B(J,I)=B(J,I)/A(J,J) - END DO - END DO -! - RETURN -! - 605 B(1,1)=1.0D0/A(1,1) - RETURN - END subroutine inverse -! - -end module broyden diff --git a/slateratom/lib/broydenmixer.F90 b/slateratom/lib/broydenmixer.F90 new file mode 100644 index 00000000..b29a7e03 --- /dev/null +++ b/slateratom/lib/broydenmixer.F90 @@ -0,0 +1,320 @@ +#:include 'common.fypp' + +!> Contains a modified Broyden mixer. +!! The modified Broyden mixer implemented here is practically the same as the one in the old DFTB +!! code. A detailed description of the method can be found in Johnson's paper. +!! See: D.D. Johnson, PRB 38, 12807 (1988) +!! DOI: 10.1103/PhysRevB.38.12807 +!! In order to use the mixer you have to create and reset it. +module broydenmixer + + use common_accuracy, only : dp + use blasroutines, only : ger + use lapackroutines, only : getrf, getrs + implicit none + + private + public :: TBroydenMixer, TBroydenMixer_init, TBroydenMixer_reset, TBroydenMixer_mix + + + !> Contains the necessary data for a Broyden mixer. + type TBroydenMixer + private + + !> Actual iteration + integer :: iIter + + !> Nr. of maximal iterations + integer :: mIter + + !> Nr. of elements in the vectors + integer :: nElem + + !> Jacobi matrix differences + real(dp) :: omega0 + + !> Mixing parameter + real(dp) :: alpha + + !> Minimal weight + real(dp) :: minWeight + + !> Maximal weight + real(dp) :: maxWeight + + !> Weighting factor (numerator) + real(dp) :: weightFac + + !> Weights for prev. iterations + real(dp), allocatable :: ww(:) + + !> Charge difference in last iteration + real(dp), allocatable :: qDiffLast(:) + + !> Input charge in last iteration + real(dp), allocatable :: qInpLast(:) + + !> Storage for the "a" matrix + real(dp), allocatable :: aa(:,:) + + !> DF vectors + real(dp), allocatable :: dF(:,:) + + !> uu vectors + real(dp), allocatable :: uu(:,:) + + end type TBroydenMixer + + +contains + + !> Creates a Broyden mixer instance. + !! The weight associated with an iteration is calculated as weigthFac/ww where ww is the Euclidean + !! norm of the charge difference vector. If the calculated weigth is outside of the + !! [minWeight, maxWeight] region it is replaced with the appropriate boundary value. + subroutine TBroydenMixer_init(this, mIter, mixParam, omega0, minWeight, maxWeight, weightFac) + + !> An initialized Broyden mixer on exit + type(TBroydenMixer), intent(out) :: this + + !> Maximum nr. of iterations (max. nr. of vectors to store) + integer, intent(in) :: mIter + + !> Mixing parameter + real(dp), intent(in) :: mixParam + + !> Weight for the Jacobi matrix differences + real(dp), intent(in) :: omega0 + + !> Minimal weight allowed + real(dp), intent(in) :: minWeight + + !> Maximal weight allowed + real(dp), intent(in) :: maxWeight + + !> Numerator of the weight + real(dp), intent(in) :: weightFac + + @:ASSERT(mIter > 0) + @:ASSERT(mixParam > 0.0_dp) + @:ASSERT(omega0 > 0.0_dp) + + this%nElem = 0 + this%mIter = mIter + this%alpha = mixParam + this%omega0 = omega0 + this%minWeight = minWeight + this%maxWeight = maxWeight + this%weightFac = weightFac + allocate(this%ww(mIter-1)) + allocate(this%qInpLast(this%nElem)) + allocate(this%qDiffLast(this%nElem)) + allocate(this%aa(mIter-1, mIter-1)) + allocate(this%dF(this%nElem, mIter - 1)) + allocate(this%uu(this%nElem, mIter - 1)) + + end subroutine TBroydenMixer_init + + + !> Makes the mixer ready for a new SCC cycle. + subroutine TBroydenMixer_reset(this, nElem) + + !> Broyden mixer instance + type(TBroydenMixer), intent(inout) :: this + + !> Length of the vectors to mix + integer, intent(in) :: nElem + + @:ASSERT(nElem > 0) + + if (nElem /= this%nElem) then + this%nElem = nElem + deallocate(this%qInpLast) + deallocate(this%qDiffLast) + allocate(this%qInpLast(this%nElem)) + allocate(this%qDiffLast(this%nElem)) + deallocate(this%dF) + allocate(this%dF(this%nElem, this%mIter - 1)) + deallocate(this%uu) + allocate(this%uu(this%nElem, this%mIter - 1)) + end if + this%iIter = 0 + this%ww(:) = 0.0_dp + this%aa(:,:) = 0.0_dp + + end subroutine TBroydenMixer_reset + + + !> Mixes charges according to the modified Broyden method. + !! + !! Warning: The complex-valued Broyden mixer requires flattened hermitian matrices as input. + !! You are free to permute the individual elements of the flattened arrays as long as the same + !! permutation is applied to qInpResult and qDiff. + !! The restriction arises from the assumption that the dot-products of density matrices are + !! real-valued (imaginary parts add up to zero due to the hermitian property) and the linear + !! system of equations remains real-valued. + subroutine TBroydenMixer_mix(this, qInpResult, qDiff) + + !> The Broyden mixer + type(TBroydenMixer), intent(inout) :: this + + !> Input charges on entry, mixed charges on exit + real(dp), intent(inout) :: qInpResult(:) + + !> Charge difference between output and input charges + real(dp), intent(in) :: qDiff(:) + + this%iIter = this%iIter + 1 + if (this%iIter > this%mIter) then + error stop "Broyden mixer: Maximal nr. of steps exceeded" + end if + + call modifiedBroydenMixing(qInpResult, this%qInpLast, this%qDiffLast, this%aa,& + & this%ww, this%iIter, qDiff, this%alpha, this%omega0, this%minWeight, this%maxWeight,& + & this%weightFac, this%nElem, this%dF, this%uu) + + end subroutine TBroydenMixer_mix + + + !> Does the real work for the Broyden mixer. + subroutine modifiedBroydenMixing(qInpResult, qInpLast, qDiffLast, aa, ww, nn, qDiff,& + & alpha, omega0, minWeight, maxWeight, weightFac, nElem, dF, uu) + + !> Current input charge on entry, mixed charged on exit + real(dp), intent(inout) :: qInpResult(:) + + !> Input charge vector of the previous iterations + real(dp), intent(inout) :: qInpLast(:) + + !> Charge difference of the previous iteration + real(dp), intent(inout) :: qDiffLast(:) + + !> The matrix a (needed for the mixing) + real(dp), intent(inout) :: aa(:,:) + + !> Weighting factors of the iterations + real(dp), intent(inout) :: ww(:) + + !> Current iteration number + integer, intent(in) :: nn + + !> Charge difference of the current iteration + real(dp), intent(in) :: qDiff(:) + + !> Mixing parameter + real(dp), intent(in) :: alpha + + !> Weight for the Jacobi matrix differences + real(dp), intent(in) :: omega0 + + !> Minimal weight allowed + real(dp), intent(in) :: minWeight + + !> Maximal weight allowed + real(dp), intent(in) :: maxWeight + + !> Numerator of the weight + real(dp), intent(in) :: weightFac + + !> Nr. of elements in the vectors + integer, intent(in) :: nElem + + !> Prev. DFs + real(dp), intent(inout) :: dF(:,:) + + !> Prev. U vectors + real(dp), intent(inout) :: uu(:,:) + + real(dp), allocatable :: beta(:,:), cc(:) + + ! Current DF or U-vector + real(dp), allocatable :: dF_uu(:) + + real(dp) :: invNorm + integer :: ii, nn_1 + integer, allocatable :: ipiv(:) + + nn_1 = nn - 1 + + @:ASSERT(nn > 0) + @:ASSERT(size(qInpResult) == nElem) + @:ASSERT(size(qInpLast) == nElem) + @:ASSERT(size(qDiffLast) == nElem) + @:ASSERT(size(qDiff) == nElem) + @:ASSERT(all(shape(aa) >= [nn_1, nn_1])) + @:ASSERT(size(ww) >= nn_1) + + ! First iteration: simple mix and storage of qInp and qDiff + if (nn == 1) then + qInpLast(:) = qInpResult + qDiffLast(:) = qDiff + qInpResult(:) = qInpResult + alpha * qDiff + return + end if + + allocate(beta(nn_1, nn_1)) + allocate(cc(nn_1)) + allocate(dF_uu(nElem)) + allocate(ipiv(nn_1)) + + ! Create weight factor omega for current iteration + ww(nn_1) = sqrt(dot_product(qDiff, qDiff)) + if (ww(nn_1) > weightFac / maxWeight) then + ww(nn_1) = weightFac / ww(nn_1) + else + ww(nn_1) = maxWeight + end if + if (ww(nn_1) < minWeight) then + ww(nn_1) = minWeight + end if + + ! Build |DF(m-1)> and (m is the current iteration number) + dF_uu(:) = qDiff - qDiffLast + invNorm = sqrt(dot_product(dF_uu, dF_uu)) + invNorm = max(invNorm, epsilon(1.0_dp)) + invNorm = 1.0_dp / invNorm + dF_uu(:) = invNorm * dF_uu + + ! Build a, beta, c, and gamma + ! (due to the hermitian property of our density matrices, the dot-products below are real) + do ii = 1, nn - 2 + aa(ii, nn_1) = dot_product(dF(:,ii), dF_uu) + aa(nn_1, ii) = aa(ii, nn_1) + cc(ii) = ww(ii) * dot_product(dF(:,ii), qDiff) + end do + aa(nn_1, nn_1) = 1.0_dp + cc(nn_1) = ww(nn_1) * dot_product(dF_uu, qDiff) + + do ii = 1, nn_1 + beta(:nn_1, ii) = ww(:nn_1) * ww(ii) * aa(:nn_1,ii) + beta(ii, ii) = beta(ii, ii) + omega0**2 + end do + + ! LU decomposition + call getrf(beta, ipiv) + ! Solve system of linear equations by using the LU decomposition + call getrs(beta, ipiv, cc, trans='t') + + ! Store |dF(m-1)> + dF(:, nn_1) = dF_uu + + ! Create |u(m-1)> + dF_uu(:) = alpha * dF_uu + invNorm * (qInpResult - qInpLast) + + ! Save charge vectors before overwriting + qInpLast(:) = qInpResult + qDiffLast(:) = qDiff + + ! Build new vector + qInpResult(:) = qInpResult + alpha * qDiff + do ii = 1, nn-2 + qInpResult(:) = qInpResult - ww(ii) * cc(ii) * uu(:,ii) + end do + qInpResult(:) = qInpResult - ww(nn_1) * cc(nn_1) * dF_uu + + ! Save |u(m-1)> + uu(:, nn_1) = dF_uu + + end subroutine modifiedBroydenMixing + +end module broydenmixer diff --git a/slateratom/lib/globals.f90 b/slateratom/lib/globals.f90 index d7ea616d..6687874d 100644 --- a/slateratom/lib/globals.f90 +++ b/slateratom/lib/globals.f90 @@ -2,6 +2,9 @@ module globals use common_accuracy, only : dp + use mixer, only : TMixer, TMixer_init, TMixer_reset, mixerTypes + use broydenmixer, only : TBroydenMixer, TBroydenMixer_init + use simplemixer, only : TSimpleMixer, TSimpleMixer_init implicit none @@ -167,15 +170,24 @@ module globals !> true, if SCF cycle reached convergency logical :: tConverged - !> true, if Broyden mixing is desired, otherwise simple mixing is applied - logical :: tBroyden + !> identifier of mixer + integer :: mixnr - !> true, if average local, effective potential should be calculated - logical :: isAvgPotNeeded + !> mixer instance + type(TMixer), allocatable :: pMixer + + !> simple mixer (if used) + type(TSimpleMixer), allocatable :: pSimpleMixer + + !> broyden mixer (if used) + type(TBroydenMixer), allocatable :: pBroydenMixer !> mixing factor real(dp) :: mixing_factor + !> true, if average local, effective potential should be calculated + logical :: isAvgPotNeeded + !> zora kinetic energy contribution to total energy real(dp) :: zora_ekin @@ -188,6 +200,9 @@ module globals !> Allocates all the variables in the globals module. subroutine allocate_globals() + !! auxiliary variables to count the elements to mix + integer :: ind, idx1, idx2, idx3, idx4 + allocate(weight(num_mesh_points)) allocate(abcissa(num_mesh_points)) allocate(dzdr(num_mesh_points)) @@ -239,6 +254,37 @@ subroutine allocate_globals() if (isAvgPotNeeded) allocate(avgPot(num_mesh_points, 2), source=0.0_dp) + ! initialize mixer + allocate(pMixer) + select case(mixnr) + case(mixerTypes%simple) + allocate(pSimplemixer) + call TSimpleMixer_init(pSimpleMixer, mixing_factor) + call TMixer_init(pMixer, pSimpleMixer) + case(mixerTypes%broyden) + allocate(pBroydenMixer) + ! defaults taken from DFTB+ + call TBroydenMixer_init(pBroydenMixer, maxiter, mixing_factor, 0.01_dp, 1.0_dp, 1.0e5_dp,& + & 1.0e-2_dp) + call TMixer_init(pMixer, pBroydenMixer) + case default + error stop "Unknown mixer type." + end select + + ! count elements to mix + ind = 0 + do idx1 = 1, 2 + do idx2 = 0, max_l + do idx3 = 1, num_alpha(idx2) * poly_order(idx2) + do idx4 = 1, problemsize + ind = ind + 1 + end do + end do + end do + end do + + call TMixer_reset(pMixer, ind) + end subroutine allocate_globals end module globals diff --git a/slateratom/lib/hamiltonian.f90 b/slateratom/lib/hamiltonian.f90 index fc088c8c..dab8d521 100644 --- a/slateratom/lib/hamiltonian.f90 +++ b/slateratom/lib/hamiltonian.f90 @@ -3,7 +3,7 @@ module hamiltonian use common_accuracy, only : dp use dft, only : dft_exc_matrixelement - use broyden, only : mixing_driver + use mixer, only : TMixer, TMixer_mix use zora_routines, only : zora_t_correction use xcfunctionals, only : xcFunctional @@ -17,9 +17,12 @@ module hamiltonian contains !> Main driver routine for Fock matrix build-up. Also calls mixer with potential matrix. - subroutine build_hamiltonian(iScf, tt, uu, nuc, vconf, jj, kk, kk_lr, pp, max_l, num_alpha,& - & poly_order, problemsize, xcnr, num_mesh_points, weight, abcissa, vxc, alpha, pot_old,& - & pot_new, tZora, tBroyden, mixing_factor, ff, camAlpha, camBeta) + subroutine build_hamiltonian(pMixer, iScf, tt, uu, nuc, vconf, jj, kk, kk_lr, pp, max_l,& + & num_alpha, poly_order, problemsize, xcnr, num_mesh_points, weight, abcissa, vxc, alpha,& + & pot_old, pot_new, tZora, ff, camAlpha, camBeta) + + !> mixer instances + type(TMixer), intent(inout) :: pMixer !> current SCF step integer, intent(in) :: iScf @@ -87,12 +90,6 @@ subroutine build_hamiltonian(iScf, tt, uu, nuc, vconf, jj, kk, kk_lr, pp, max_l, !> true, if zero-order regular approximation for relativistic effects is desired logical, intent(in) :: tZora - !> true, if Broyden mixing is desired, otherwise simple mixing is applied - logical, intent(in) :: tBroyden - - !> mixing factor - real(dp), intent(in) :: mixing_factor - !> fock matrix supervector real(dp), intent(out) :: ff(:,0:,:,:) @@ -108,8 +105,11 @@ subroutine build_hamiltonian(iScf, tt, uu, nuc, vconf, jj, kk, kk_lr, pp, max_l, !> auxiliary matrices for (CAM) hybrids real(dp), allocatable :: k_matrix2(:,:,:,:), k_matrix3(:,:,:,:) + !> potential difference + real(dp), allocatable :: pot_diff(:,:,:,:) + !! auxiliary variables - integer :: ii, jjj, kkk, ll, mm, ss, ttt, iMix + integer :: ii, jjj, kkk, ll, mm, ss, ttt ff(:,:,:,:) = 0.0_dp @@ -180,9 +180,9 @@ subroutine build_hamiltonian(iScf, tt, uu, nuc, vconf, jj, kk, kk_lr, pp, max_l, pot_new(2, :,:,:) = - real(nuc, dp) * uu + j_matrix - k_matrix(2, :,:,:) ! mixer - iMix = int(iScf / 40) - call mixing_driver(pot_old, pot_new, max_l, num_alpha, poly_order, problemsize,& - & iScf - iMix * 40, tBroyden, mixing_factor) + allocate(pot_diff, mold=pot_old) + pot_diff(:,0:,:,:) = pot_old - pot_new + call TMixer_mix(pMixer, pot_new, pot_diff) ! Not sure: before or after mixer (potential .ne. Matrix elements)? ! Should be irrelevant once self-consistency is reached. diff --git a/slateratom/lib/input.f90 b/slateratom/lib/input.f90 index a5ddc130..51104403 100644 --- a/slateratom/lib/input.f90 +++ b/slateratom/lib/input.f90 @@ -17,7 +17,7 @@ module input !> Reads in all properties, except for occupation numbers. subroutine read_input_1(nuc, max_l, occ_shells, maxiter, scftol, poly_order, min_alpha,& & max_alpha, num_alpha, tAutoAlphas, alpha, conf_r0, conf_power, num_occ, num_power,& - & num_alphas, xcnr, tPrintEigvecs, tZora, tBroyden, mixing_factor, xalpha_const, omega,& + & num_alphas, xcnr, tPrintEigvecs, tZora, mixnr, mixing_factor, xalpha_const, omega,& & camAlpha, camBeta, grid_params) !> nuclear charge, i.e. atomic number @@ -77,8 +77,8 @@ subroutine read_input_1(nuc, max_l, occ_shells, maxiter, scftol, poly_order, min !> true, if zero-order regular approximation for relativistic effects is desired logical, intent(out) :: tZora - !> true, if Broyden mixing is desired, otherwise simple mixing is applied - logical, intent(out) :: tBroyden + !> identifier of mixer + integer, intent(out) :: mixnr !> mixing factor real(dp), intent(out) :: mixing_factor @@ -213,8 +213,9 @@ subroutine read_input_1(nuc, max_l, occ_shells, maxiter, scftol, poly_order, min write(*, '(A)') 'Print Eigenvectors ? .true./.false.' read(*,*) tPrintEigvecs - write(*, '(A)') ' Use Broyden mixer (.true./.false.)? And mixing parameter <1' - read(*,*) tBroyden, mixing_factor + write(*, '(A)') 'Enter mixer and mixing parameter <1:& + & 1: Simple mixer, 2: Broyden mixer' + read(*,*) mixnr, mixing_factor end subroutine read_input_1 diff --git a/slateratom/lib/lapack.f90 b/slateratom/lib/lapack.f90 new file mode 100644 index 00000000..dd4f9db5 --- /dev/null +++ b/slateratom/lib/lapack.f90 @@ -0,0 +1,38 @@ +!> Interface wrapper for the lapack routines. See the lapack +!! project documentation for more details +module lapack + + use common_accuracy, only : rsp, rdp + implicit none + public + + + !> Computes LU factorization of double precision matrix + interface dgetrf + + !> Computes LU factorization of double precision matrix + subroutine dgetrf(mm, nn, aa, lda, ipiv, info) + import rdp + + !> number of rows of the matrix + integer, intent(in) :: mm + + !> matrix dimension + integer, intent(in) :: nn + + !> Leading dimension of A + integer, intent(in) :: lda + + !> matrix A + real(rdp), intent(inout) :: aa(lda, *) + + !> pivot array + integer, intent(out) :: ipiv(*) + + !> state of routine on return + integer, intent(out) :: info + end subroutine dgetrf + + end interface dgetrf + +end module lapack diff --git a/slateratom/lib/lapackroutines.F90 b/slateratom/lib/lapackroutines.F90 new file mode 100644 index 00000000..390ba7cc --- /dev/null +++ b/slateratom/lib/lapackroutines.F90 @@ -0,0 +1,165 @@ +#:include 'common.fypp' + +!> Contains F90 wrapper functions for some commonly used lapack calls needed in the code. +!! The interface of all LAPACK calls must be defined in the module lapack. +module lapackroutines + + use common_accuracy, only : dp, rdp + implicit none + + private + public :: getrf, getrs + + + !> Computes the LU decomposition of a general rectangular matrix using partial pivoting with row + !! interchanges. + !! The decomposition has the form: A = P*L*U, where P is a permutation matrix, L is a lower + !! triangular matrix with unit diagonal elements and U is an upper triangular matrix. + interface getrf + module procedure getrf_dble + end interface getrf + + + !> Solves a system of linear equations + !! A * X = B or A**T * X = B + !! with a general N-by-N matrix A using the LU factorization computed by getrf. + interface getrs + module procedure :: getrs_dble + module procedure :: getrs1_dble + end interface getrs + + +contains + + !> Double precision version of getrf. + subroutine getrf_dble(aa, ipiv, nRow, nColumn, iError) + + !> Matrix to decompose on entry, L and U on exit. Unit diagonal elements of L are not stored. + real(rdp), intent(inout) :: aa(:,:) + + !> Pivot indices, row i of the matrix was interchanged with row ipiv(i). + integer, intent(out) :: ipiv(:) + + !> Number of rows of the matrix to decomposea. (Necessary if different from the number of rows + !> of the passed matrix) + integer, optional, intent(in) :: nRow + + !> Number of rows of the matrix to decompose. (Necessary if different from the number of columns + !> of the passed matrix) + integer, optional, intent(in) :: nColumn + + !> Error flag. Zero on successful exit. If not present, any lapack error causes program + !> termination. If passed only fatal lapack errors with error flag < 0 cause abort. + integer, optional, intent(out) :: iError + + integer :: mm, nn, lda, info + character(len=100) :: error_string + + lda = size(aa, dim=1) + nn = size(aa, dim=2) + if (present(nRow)) then + @:ASSERT(nRow >= 1 .and. nRow <= lda) + mm = nRow + else + mm = lda + end if + if (present(nColumn)) then + @:ASSERT(nColumn >= 1 .and. nColumn <= nn) + nn = nColumn + end if + @:ASSERT(size(ipiv) == min(mm, nn)) + + call dgetrf(mm, nn, aa, lda, ipiv, info) + + if (info < 0) then +99060 format('Failure in LU factorisation dgetrf,', ' illegal argument at position ', i10) + write(error_string, 99060) info + error stop error_string + else + if (present(iError)) then + iError = info + elseif (info > 0) then +99070 format('Factor U is exactly zero in dgetrf,', ' info flag is ', i10) + write(error_string, 99070) info + error stop error_string + end if + end if + + end subroutine getrf_dble + + + !> Solves a system of linear equations with multiple right hand sides + subroutine getrs_dble(amat, ipiv, bmat, trans, iError) + + !> Matrix of the linear system + real(rdp), intent(in) :: amat(:, :) + + !> Pivot indices, row i of the matrix was interchanged with row ipiv(i). + integer, intent(in) :: ipiv(:) + + !> Matrix of the right hand side vectors + real(rdp), intent(inout) :: bmat(:, :) + + !> Optional transpose (defaults to 'n') + character(len=1), intent(in), optional :: trans + + !> Error flag, zero on successful exit + integer, intent(out), optional :: iError + + character(len=1) :: atr + integer :: info, nn, nrhs, lda, ldb + + @:ASSERT(size(amat, 1) == size(amat, dim=2)) + @:ASSERT(size(amat, 1) == size(bmat, dim=1)) + + if (present(trans)) then + @:ASSERT(any(trans == ['n', 'N', 't', 'T', 'c', 'C'])) + atr = trans + else + atr = 'n' + end if + + lda = max(1, size(amat, 1)) + ldb = max(1, size(bmat, 1)) + nn = size(amat, 2) + nrhs = size(bmat, 2) + + call dgetrs(atr, nn, nrhs, amat, lda, ipiv, bmat, ldb, info) + + if (present(iError)) then + iError = info + else + if (info /= 0) then + error stop "Failed to solve linear system by diagonal pivoting" + end if + end if + + end subroutine getrs_dble + + + !> Solves a system of linear equations with one right hand side + subroutine getrs1_dble(amat, ipiv, bvec, trans, iError) + + !> Matrix of the linear system + real(rdp), intent(in) :: amat(:,:) + + !> Pivot indices, row i of the matrix was interchanged with row ipiv(i). + integer, intent(in) :: ipiv(:) + + !> Right hand side vector + real(rdp), intent(inout), target :: bvec(:) + + !> optional transpose (defaults to 'n') + character(len=1), intent(in), optional :: trans + + !> Error flag, zero on successful exit + integer, intent(out), optional :: iError + + real(rdp), pointer :: bptr(:,:) + + bptr(1:size(bvec, 1), 1:1) => bvec(1:size(bvec, 1)) + call getrs(amat, ipiv, bptr, trans, iError) + + end subroutine getrs1_dble + +end module lapackroutines diff --git a/slateratom/lib/mixer.f90 b/slateratom/lib/mixer.f90 new file mode 100644 index 00000000..1ac8230f --- /dev/null +++ b/slateratom/lib/mixer.f90 @@ -0,0 +1,150 @@ +!> Provides a general mixer which contains the desired actual mixer. +module mixer + + use common_accuracy, only : dp + use broydenmixer, only : TBroydenMixer, TBroydenMixer_mix, TBroydenMixer_reset + use simplemixer, only : TSimpleMixer, TSimpleMixer_mix, TSimpleMixer_reset + implicit none + + private + public :: TMixer, TMixer_init, TMixer_reset, TMixer_mix, mixerTypes + + + !> Interface type for mixers + type TMixer + private + + !> Numerical type of mixer 1:2 + integer :: mixerType + + !> Simple mixer instance + type(TSimpleMixer), allocatable :: pSimpleMixer + + !> Broyden mixer instance + type(TBroydenMixer), allocatable :: pBroydenMixer + + end type TMixer + + + !> Initialises a specific mixer + interface TMixer_init + module procedure TMixer_initSimple + module procedure TMixer_initBroyden + end interface TMixer_init + + + !> Mixes the given quantity + interface TMixer_mix + module procedure TMixer_mix1D + module procedure TMixer_mix4D + end interface TMixer_mix + + + type :: TMixerTypesEnum + integer :: simple = 1 + integer :: broyden = 2 + end type TMixerTypesEnum + + !> Contains mixer types + type(TMixerTypesEnum), parameter :: mixerTypes = TMixerTypesEnum() + + +contains + + !> Initializes a simple mixer. + subroutine TMixer_initSimple(this, pSimple) + + !> Mixer instance + type(TMixer), intent(out) :: this + + !> A valid Simple mixer instance on exit + type(TSimpleMixer), allocatable, intent(inout) :: pSimple + + this%mixerType = mixerTypes%simple + call move_alloc(pSimple, this%pSimpleMixer) + + end subroutine TMixer_initSimple + + + !> Initializes a Broyden mixer. + subroutine TMixer_initBroyden(this, pBroyden) + + !> Mixer instance + type(TMixer), intent(out) :: this + + !> A valid Broyden mixer instance on exit + type(TBroydenMixer), allocatable, intent(inout) :: pBroyden + + this%mixerType = mixerTypes%broyden + call move_alloc(pBroyden, this%pBroydenMixer) + + end subroutine TMixer_initBroyden + + + !> Resets the mixer. + subroutine TMixer_reset(this, nElem) + + !> Mixer instance + type(TMixer), intent(inout) :: this + + !> Size of the vectors to mix + integer, intent(in) :: nElem + + select case (this%mixerType) + case(mixerTypes%simple) + call TSimpleMixer_reset(this%pSimpleMixer, nElem) + case(mixerTypes%broyden) + call TBroydenMixer_reset(this%pBroydenMixer, nElem) + end select + + end subroutine TMixer_reset + + + !> Mixes two vectors. + subroutine TMixer_mix1D(this, inp, diff) + + !> Mixer instance + type(TMixer), intent(inout) :: this + + !> Input vector on entry, result vector on exit + real(dp), intent(inout) :: inp(:) + + !> Difference between input and output vectors (measure of lack of convergence) + real(dp), intent(in) :: diff(:) + + select case (this%mixerType) + case(mixerTypes%simple) + call TSimpleMixer_mix(this%pSimpleMixer, inp, diff) + case(mixerTypes%broyden) + call TBroydenMixer_mix(this%pBroydenMixer, inp, diff) + end select + + end subroutine TMixer_mix1D + + + !> Mixes two 4D matrices. + subroutine TMixer_mix4D(this, inp, diff) + + !> Mixer instance + type(TMixer), intent(inout) :: this + + !> Input vector on entry, result vector on exit + real(dp), intent(inout), contiguous, target :: inp(:,0:,:,:) + + !> Difference between input and output vectors (measure of lack of convergence) + real(dp), intent(in), contiguous, target :: diff(:,0:,:,:) + + !! Difference between input and output vectors (1D pointer) + real(dp), pointer :: pDiff(:) + + !! Input vector on entry, result vector on exit (1D pointer) + real(dp), pointer :: pInp(:) + + pInp(1:size(inp)) => inp + pDiff(1:size(diff)) => diff + + call TMixer_mix1D(this, pInp, pDiff) + + end subroutine TMixer_mix4D + +end module mixer diff --git a/slateratom/lib/simplemixer.F90 b/slateratom/lib/simplemixer.F90 new file mode 100644 index 00000000..fa354afd --- /dev/null +++ b/slateratom/lib/simplemixer.F90 @@ -0,0 +1,74 @@ +#:include 'common.fypp' + +!> Simple mixer for mixing charges. +module simplemixer + + use common_accuracy, only : dp + implicit none + + private + public :: TSimpleMixer + public :: TSimpleMixer_init, TSimpleMixer_reset, TSimpleMixer_mix + + + !> Contains data for a simple mixer + type TSimpleMixer + private + + !> Mixing parameter + real(dp) :: mixParam + + end type TSimpleMixer + + +contains + + !> Creates a simple mixer. + subroutine TSimpleMixer_init(this, mixParam) + + !> Simple mixer instance on exit + type(TSimpleMixer), intent(out) :: this + + !> Mixing parameter + real(dp), intent(in) :: mixParam + + this%mixParam = mixParam + + end subroutine TSimpleMixer_init + + + !> Resets the mixer. + subroutine TSimpleMixer_reset(this, nElem) + + !> Simple mixer instance + type(TSimpleMixer), intent(inout) :: this + + !> Length of the vectors to mix + integer, intent(in) :: nElem + + @:ASSERT(nElem > 0) + + continue + + end subroutine TSimpleMixer_reset + + + !> Does the actual mixing. + subroutine TSimpleMixer_mix(this, qInpResult, qDiff) + + !> SimpleMixer instance + type(TSimpleMixer), intent(inout) :: this + + !> Input charge on entry, mixed charge on exit + real(dp), intent(inout) :: qInpResult(:) + + !> Charge difference + real(dp), intent(in) :: qDiff(:) + + @:ASSERT(size(qInpResult) == size(qDiff)) + + qInpResult(:) = qInpResult + this%mixParam * qDiff + + end subroutine TSimpleMixer_mix + +end module simplemixer diff --git a/slateratom/prog/main.f90 b/slateratom/prog/main.f90 index 04b6fde9..a4143149 100644 --- a/slateratom/prog/main.f90 +++ b/slateratom/prog/main.f90 @@ -55,7 +55,7 @@ program HFAtom call parse_command_arguments() call read_input_1(nuc, max_l, occ_shells, maxiter, scftol, poly_order, min_alpha, max_alpha,& & num_alpha, tAutoAlphas, alpha, conf_r0, conf_power, num_occ, num_power, num_alphas, xcnr,& - & tPrintEigvecs, tZora, tBroyden, mixing_factor, xalpha_const, omega, camAlpha, camBeta,& + & tPrintEigvecs, tZora, mixnr, mixing_factor, xalpha_const, omega, camAlpha, camBeta,& & grid_params) problemsize = num_power * num_alphas @@ -125,9 +125,9 @@ program HFAtom pot_old(:,:,:,:) = 0.0_dp ! kinetic energy, nuclear-electron, and confinement matrix elements which are constant during SCF - call build_hamiltonian(0, tt, uu, nuc, vconf, jj, kk, kk_lr, pp, max_l, num_alpha, poly_order,& - & problemsize, xcnr, num_mesh_points, weight, abcissa, vxc, alpha, pot_old, pot_new, tZora,& - & tBroyden, mixing_factor, ff, camAlpha, camBeta) + call build_hamiltonian(pMixer, 0, tt, uu, nuc, vconf, jj, kk, kk_lr, pp, max_l, num_alpha,& + & poly_order, problemsize, xcnr, num_mesh_points, weight, abcissa, vxc, alpha, pot_old,& + & pot_new, tZora, ff, camAlpha, camBeta) ! self-consistency cycles write(*,*) 'Energies in Hartree' @@ -149,9 +149,9 @@ program HFAtom & dz, xcnr, omega, camAlpha, camBeta, rho, drho, ddrho, vxc, exc, xalpha_const) ! build Fock matrix and get total energy during SCF - call build_hamiltonian(iScf, tt, uu, nuc, vconf, jj, kk, kk_lr, pp, max_l, num_alpha,& + call build_hamiltonian(pMixer, iScf, tt, uu, nuc, vconf, jj, kk, kk_lr, pp, max_l, num_alpha,& & poly_order, problemsize, xcnr, num_mesh_points, weight, abcissa, vxc, alpha, pot_old,& - & pot_new, tZora, tBroyden, mixing_factor, ff, camAlpha, camBeta) + & pot_new, tZora, ff, camAlpha, camBeta) if (tZora) then call getTotalEnergyZora(tt, uu, nuc, vconf, jj, kk, kk_lr, pp, max_l, num_alpha, poly_order,& diff --git a/test/prog/sktable/bin/testwithworkdir.py b/test/prog/sktable/bin/testwithworkdir.py index 083a99b9..582887f7 100644 --- a/test/prog/sktable/bin/testwithworkdir.py +++ b/test/prog/sktable/bin/testwithworkdir.py @@ -16,8 +16,8 @@ SKDEF = 'skdef.hsd' -ATOL = 1e-10 -RTOL = 1e-09 +ATOL = 1e-08 +RTOL = 1e-07 class TestWithWorkDir: From a248bf2acb4681b6c4e839f96c1debcf9e454049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Aradi?= Date: Thu, 27 Jun 2024 12:47:08 +0200 Subject: [PATCH 25/25] Bump version number to 0.3 --- CMakeLists.txt | 2 +- sktools/setup.cfg | 2 +- sktools/src/sktools/__init__.py | 2 +- sktwocnt/prog/cmdargs.f90 | 2 +- slateratom/prog/cmdargs.f90 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d8e9452..11181e34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.16) -project(SkProgs VERSION 0.2 LANGUAGES Fortran) +project(SkProgs VERSION 0.3 LANGUAGES Fortran) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules) include(SkProgsUtils) diff --git a/sktools/setup.cfg b/sktools/setup.cfg index e52fc62b..40e410a8 100644 --- a/sktools/setup.cfg +++ b/sktools/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = sktools -version = 0.2 +version = 0.3 author = DFTB+ developers url = http://www.dftbplus.org description = Tools to Generate Electronic SK-parameters diff --git a/sktools/src/sktools/__init__.py b/sktools/src/sktools/__init__.py index 92858d5f..710c5206 100644 --- a/sktools/src/sktools/__init__.py +++ b/sktools/src/sktools/__init__.py @@ -1 +1 @@ -PACKAGE_VERSION = '0.2' +PACKAGE_VERSION = '0.3' diff --git a/sktwocnt/prog/cmdargs.f90 b/sktwocnt/prog/cmdargs.f90 index caf96100..689a41b0 100644 --- a/sktwocnt/prog/cmdargs.f90 +++ b/sktwocnt/prog/cmdargs.f90 @@ -7,7 +7,7 @@ module cmdargs public :: parse_command_arguments character(len=*), parameter :: programName = 'sktwocnt' - character(len=*), parameter :: programVersion = '0.2' + character(len=*), parameter :: programVersion = '0.3' contains diff --git a/slateratom/prog/cmdargs.f90 b/slateratom/prog/cmdargs.f90 index 53d4aba1..1ddde55e 100644 --- a/slateratom/prog/cmdargs.f90 +++ b/slateratom/prog/cmdargs.f90 @@ -6,7 +6,7 @@ module cmdargs public :: parse_command_arguments character(*), parameter :: programName = 'slateratom' - character(*), parameter :: programVersion = '0.2' + character(*), parameter :: programVersion = '0.3' contains