diff --git a/CMakeLists.txt b/CMakeLists.txt index 92b21c27a..20354f619 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.22...4.2) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules) diff --git a/INSTALL.rst b/INSTALL.rst index 9ee9f5110..65bfebcad 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -18,13 +18,13 @@ In order to compile DFTB+, you need the following software components: * C++ compiler (when built with ELSI/PEXSI or ChIMES support) -* CMake (version 3.16 or newer) +* CMake (version 3.22 or newer) * GNU make * LAPACK/BLAS libraries (or compatible equivalents) -* Python (version >= 3.2) for the source preprocessor +* Python (version >= 3.7) for the source preprocessor Fortran compiler @@ -32,15 +32,15 @@ Fortran compiler The following Fortran compilers are known to build DFTB+ correctly: -* GNU >= 12.2 +* GNU >= 13.2 * Intel >= 2021.5 * NAG >= 7.2 (when built without OpenMP support) -Older versions of the compilers above are likely to fail due to missing Fortran -features and/or compiler bugs. Compilers by other vendors may work, but have not -been tested extensively (see also `Tested build environments +Older versions of the compilers above may work but are neither tested nor +supported. Similarly, compilers by other vendors may work, but have not been +tested extensively (see also `Tested build environments <#tested-build-environments>`_ and `Testing DFTB+ <#testing-dftb>`_). @@ -52,11 +52,10 @@ Additionally there are optional requirements for some DFTB+ features: * ScaLAPACK (version 2.0 or later) and a Fortran aware MPI framework, if you want to build the MPI-parallelised version of the code. -* In addition to ScaLAPACK, for MPI parallel builds it is recommended - to use the `ELSI `_ library - for large scale systems (versions 2.6.x – 2.11.x of the library, - with partial support for 2.5.0). If ELSI was compiled with PEXSI - included, you will also need a C++ compiler. +* In addition to ScaLAPACK, for MPI parallel builds it is recommended to use the + `ELSI `_ library for large + scale systems. If ELSI was compiled with PEXSI included, you will also need a + C++ compiler. * The ARPACK-ng library if using the excited state DFTB functionality. For MPI-parallel builds, the parallel version of ARPACK-ng (containing also @@ -69,11 +68,26 @@ Additionally there are optional requirements for some DFTB+ features: is controlled at runtime by the `MAGMA_NUM_GPUS` shell variable (the usual default is 1). -* The `PLUMED2 `_ library for +* The `PLUMED2 `_ library for metadynamics simulations. If you build DFTB+ with MPI, the linked PLUMED library must also be MPI-aware (and must have been built with the same MPI-framework as DFTB+). +* The `TBLite `_ library for carrying out + simulations using xTB-type Hamiltonians. + +* The `simple-dftd3 `_ library for + D3-type dispersion. + +* The `many-body dispersion `_ library for + taking many-body dispersions into account. + +* The `ChIMES calculator `_ + library for using Chebishev-polynomial based many-body repulsive interactions. + +* The `libNEGF `_ library for carrying out + non-equilibrium Green's function based transport calculations. + External library requirements ----------------------------- @@ -97,7 +111,7 @@ Requirements for testing DFTB+ In order to execute the code tests and validate them against precalculated results, you will additionally need: -* Python (version >= 3.2) with NumPy +* Python (version >= 3.7) with NumPy * The Slater-Koster data used in the tests (see below) @@ -111,10 +125,6 @@ following architectures: +---------------+----------------------+-------------+------------------+-----+ | Architecture | Compiler | MPI | Ext. libraries |Notes| +===============+======================+=============+==================+=====+ -| x86_64 / | GNU Fortran/C 12.2 | OpenMPI 4.1 | OpenBlas 0.3.21, | | -| Linux | | | ScaLAPACK 2.2, | | -| | | | ELSI 2.9 | | -+---------------+----------------------+-------------+------------------+-----+ | x86_64 / | GNU Fortran/C 13.2 | OpenMPI 5.0 | OpenBlas 0.3.25, | | | Linux | | | ScaLAPACK 2.2, | | | | | | ELSI 2.9 | | @@ -123,14 +133,18 @@ following architectures: | Linux | | | ScaLAPACK 2.2, | | | | | | ELSI 2.11 | | +---------------+----------------------+-------------+------------------+-----+ +| x86_64 / | GNU Fortran/C 15.2 | OpenMPI 5.0 | OpenBlas 0.3.30, | | +| Linux | | | ScaLAPACK 2.2, | | +| | | | ELSI 2.12 | | ++---------------+----------------------+-------------+------------------+-----+ | x86_64 / | Intel Fortran/C | IntelMPI | MKL 2022.0, | | | Linux | 2022.0 | 2021.5 | ELSI 2.8 | | +---------------+----------------------+-------------+------------------+-----+ | x86_64 / | Intel Fortran/C | IntelMPI | MKL 2024.2, | | | Linux | 2024.2 | 2021.14 | ELSI 2.11 | | +---------------+----------------------+-------------+------------------+-----+ -| x86_64 / | Intel Fortran/C | IntelMPI | MKL 2025.0, | | -| Linux | 2025.0 | 2021.14 | ELSI 2.11 | | +| x86_64 / | Intel Fortran/C | IntelMPI | MKL 2025.3, | | +| Linux | 2025.3 | 2021.17 | ELSI 2.12 | | +---------------+----------------------+-------------+------------------+-----+ | x86_64 / | NAG Fortran 7.2 | MPICH 4.2 | OpenBlas 0.3.26 | [1] | | Linux | GNU C 13.2 | | ScaLAPACK 2.2 | | diff --git a/cmake/DftbPlusUtils.cmake b/cmake/DftbPlusUtils.cmake index ecd604daf..ac9f77117 100644 --- a/cmake/DftbPlusUtils.cmake +++ b/cmake/DftbPlusUtils.cmake @@ -228,10 +228,7 @@ function (dftbp_ensure_config_consistency) endif() # Check minimal compiler versions - # set(fortran_minimal_versions "GNU;12.2" "Intel;20.2" "IntelLLVM;2024.2" "NAG;7.2") - # Note: Intel new numbering system used in 'oneapi' is yyyy.v but the old system used xx.v - # The conversion OLD->NEW should be yyyy.v = 2001 + xx.v - set(fortran_minimal_versions "GNU;12.2" "Intel;2021.5" "IntelLLVM;2024.2" "NAG;7.2") + set(fortran_minimal_versions "GNU;13.2" "Intel;2021.5" "IntelLLVM;2024.2" "NAG;7.2") dftbp_check_minimal_compiler_version("Fortran" "${fortran_minimal_versions}") # Note: The consistency check below will / can not be executed in multi-config mode diff --git a/doc/dftb+/manual/dftbp.tex b/doc/dftb+/manual/dftbp.tex index 93f0fddc1..5530359ee 100644 --- a/doc/dftb+/manual/dftbp.tex +++ b/doc/dftb+/manual/dftbp.tex @@ -1438,14 +1438,16 @@ \subsection{Density Functional based Tight Binding} before proceeding to subsequent stages of the calculation (forces, analysis, etc.). -\item[\is{RecomputeAfterDensity}] When set to \is{Yes} the electrostatic potentials - is updated with the newly computed DM and atomic charges. This is done in order to - make the electrostatic energy consistent and forces variational. - It can be set to \is{No} in transport calculations to avoid an unnecessary - invocation of the Poisson solver, when energy and forces are not relevant. - It should be set to \is{No} when the user would like to perform a fixed-charge - calculation with charges initialized from an external file. In this case - set \is{MaxSCCIterations=1} and \is{ReadInitialCharges=Yes}. +\item[\is{RecomputeAfterDensity}] When set to \is{Yes} the + electrostatic potentials is updated with the newly computed DM and + atomic charges. This is done in order to make the electrostatic + energy consistent and forces variational. It can be set to \is{No} + in transport calculations to avoid an unnecessary invocation of the + Poisson solver, when energy and forces are not relevant. It should + also be set to \is{No} when the user would like to perform a + fixed-charge calculation with charges that are initialized from an + external file. In this case also set \is{MaxSCCIterations=1} and + \is{ReadInitialCharges=Yes}. \item[\is{EwaldParameter}] Sets the dimensionless parameter $\alpha$ in the Ewald electrostatic summation for periodic calculations. This diff --git a/src/dftbp/dftbplus/inputdata.F90 b/src/dftbp/dftbplus/inputdata.F90 index fde145c8a..977c7c419 100644 --- a/src/dftbp/dftbplus/inputdata.F90 +++ b/src/dftbp/dftbplus/inputdata.F90 @@ -568,9 +568,9 @@ module dftbp_dftbplus_inputdata type(TReksInp) :: reksInp !> Whether Scc should be updated with the output charges (obtained after diagonalization) - !> Could be set to .false. to prevent costly recalculations (e.g. when using Poisson-solver) - !> It can also be set to .false. in case of fixed-charge calculations - !> (e.g. when setting MaxSCCIterations=1; ReadInitialCharges=Yes) + !! Could be set to .false. to prevent costly recalculations (e.g. when using Poisson-solver) + !! It can also be set to .false. in case of fixed-charge calculations + !! (e.g. when setting MaxSCCIterations=1; ReadInitialCharges=Yes) logical :: updateSccAfterDiag = .true. !> Write cavity information as COSMO file diff --git a/src/dftbp/dftbplus/oldcompat.F90 b/src/dftbp/dftbplus/oldcompat.F90 index 063e112d2..542e90cf2 100644 --- a/src/dftbp/dftbplus/oldcompat.F90 +++ b/src/dftbp/dftbplus/oldcompat.F90 @@ -941,43 +941,38 @@ subroutine convert_13_14(root) end subroutine convert_13_14 - !> Converts input from version 14 to 15. (Version 15 August 2026) + !> Converts input from version 14 to 15. (Version 18 February 2026) subroutine convert_14_15(root) !> Root tag of the HSD-tree type(fnode), pointer :: root type(fnode), pointer :: ch1, ch2, par, hamil, dummy - logical :: tVal, tPoisson=.false. + logical :: isRecomputed ! Move RecomputeAfterDensity to the Hamiltonian block. ! The normal default is RecomputeAfterDensity=.true. - ! Check if Poisson block is present. If NOT RecomputeAfterDensity will take the new default. + ! Check if Poisson block is present. If NOT RecomputeAfterDensity will take the new default. call getDescendant(root, "Hamiltonian/DFTB/Electrostatics/Poisson", ch1, parent=par) - if (associated(ch1)) then - tPoisson = .true. - end if - if (tPoisson) then + if (associated(ch1)) then call getDescendant(root, "Hamiltonian/DFTB/Electrostatics/Poisson/RecomputeAfterDensity", & & ch1, parent=par) if (associated(ch1)) then - call getChildValue(par, "RecomputeAfterDensity", tVal) - call detailedWarning(ch1, "Keyword Moved to Hamiltonian {}.") + call getChildValue(par, "RecomputeAfterDensity", isRecomputed) + call detailedWarning(ch1, "Keyword Moved to Hamiltonian {} block.") dummy => removeChild(par, ch1) call destroyNode(ch1) else - tVal = .false. + isRecomputed = .false. end if ! Check if the tag is already present and issue an error. call getDescendant(root, "Hamiltonian/DFTB/RecomputeAfterDensity", ch1) - if (associated(ch1)) then - call detailedError(ch1, "RecomputeAfterDensity already present.") - end if + if (associated(ch1)) call detailedError(ch1, "RecomputeAfterDensity is already present.") call getDescendant(root, "Hamiltonian/DFTB", hamil) - call setChildValue(hamil, "RecomputeAfterDensity", tVal, child=ch2) + call setChildValue(hamil, "RecomputeAfterDensity", isRecomputed, child=ch2) call setUnprocessed(ch2) end if - + end subroutine convert_14_15 diff --git a/src/dftbp/dftbplus/parser.F90 b/src/dftbp/dftbplus/parser.F90 index 12cf180c7..a1e489418 100644 --- a/src/dftbp/dftbplus/parser.F90 +++ b/src/dftbp/dftbplus/parser.F90 @@ -3281,6 +3281,8 @@ subroutine readSccOptions(node, ctrl, geo) call getChildValue(node, "RecomputeAfterDensity", ctrl%updateSccAfterDiag, .true.) + call getChildValue(node, "RecomputeAfterDensity", ctrl%updateSccAfterDiag, .true.) + end subroutine readSccOptions