================================================================================
 runEDDB - THIRD-PARTY SOFTWARE NOTICES AND LICENSES
================================================================================

runEDDB is distributed as a precompiled binary. It carries third-party
software in two distinct ways, and both are covered below.

FIRST, DERIVED SOURCE. runEDDB's GFN2-xTB lane (used when the input is a
plain .xyz geometry) implements the GFN2-xTB tight-binding method, the DFT-D4
dispersion correction, and the spin-polarized (spGFN2-xTB) extension. Beyond
using these published methods, PORTIONS OF runEDDB's source are DERIVED FROM
the corresponding open-source reference implementations by S. Grimme and
co-workers (in places ported / transcribed from their source, e.g. parameter
tables and selected routines), and from the RingDetect-HPC ring-detection
engine. Those portions remain governed by the upstream licenses below and are
redistributed under them. Sections 1 to 4 cover this category.

SECOND, LINKED LIBRARIES. The released executables also contain the compiled
machine code of third-party libraries that runEDDB does not itself distribute
in source form: a numerical linear-algebra library, on Linux the C runtime
library, and on Windows arm64 the LLVM Fortran and OpenMP runtimes.
Redistributing that compiled code triggers the notice conditions of those
libraries' licenses. Sections 5 to 7 cover this category.

WHICH SECTIONS APPLY DEPENDS ON THE PLATFORM. Sections 1 to 4 apply to every
package. Sections 5 to 7 apply only to the platforms named in the
"Applies to:" line of those sections. This file and the license texts listed
below are shipped identically in every package; the presence of a license text
in a package does not by itself mean that the component it covers is present
in that package's executable.

The full, verbatim license texts referenced here are included alongside this
file in the same directory:

    LGPL-3.0.txt            GNU Lesser General Public License, version 3
                            (dftd4, tblite - sections 1 and 2)
    GPL-3.0.txt             GNU General Public License, version 3
                            (referenced by the LGPL-3.0)
    Apache-2.0.txt          Apache License, version 2.0
                            (mctc-lib - section 3)
    OpenBLAS-LICENSE.txt    BSD 3-Clause License
                            (OpenBLAS - section 5)
    LAPACK-LICENSE.txt      modified BSD 3-Clause License
                            (Netlib LAPACK, bundled inside OpenBLAS -
                            section 5)
    GotoBLAS-LICENSE.txt    BSD 2-Clause License
                            (GotoBLAS2, from which OpenBLAS descends -
                            section 5)
    LGPL-2.1.txt            GNU Lesser General Public License, version 2.1
                            (GNU C Library - section 6)
    glibc-LICENSES.txt      permissive third-party notices carried inside
                            the GNU C Library (section 6)
    LLVM-LICENSE.txt        Apache License 2.0 with LLVM Exceptions, as
                            published by the LLVM Project (flang-rt and the
                            LLVM OpenMP runtime - section 7)

The MIT License covering section 4 is reproduced in full within that section.

--------------------------------------------------------------------------------
 1. dftd4 - DFT-D4 dispersion model
--------------------------------------------------------------------------------
    Project:    dftd4
    Homepage:   https://github.com/dftd4/dftd4
    Copyright:  (C) Sebastian Ehlert and the dftd4 authors (Grimme group)
    License:    GNU Lesser General Public License v3.0 or later
                (LGPL-3.0-or-later)  -> see LGPL-3.0.txt
                                         and GPL-3.0.txt

    Derived in runEDDB:
        src/runeddb_gd4_data.f90    (D4 reference data: per-element calibration
                                     points, pairwise weighting tables; several
                                     DATA tables transcribed from dftd4)
        src/runeddb_gd4_driver.f90  (D4 model: reference weighting, C6 assembly,
                                     two-body BJ damping, ATM three-body term;
                                     ported from dftd4/model and dftd4/damping)

    Reference: E. Caldeweyher, S. Ehlert, A. Hansen, H. Neugebauer, S. Spicher,
    C. Bannwarth, S. Grimme, J. Chem. Phys. 150 (2019) 154122.
    DOI: 10.1063/1.5090222

--------------------------------------------------------------------------------
 2. tblite - light-weight tight-binding framework (GFN2-xTB, spin)
--------------------------------------------------------------------------------
    Project:    tblite
    Homepage:   https://github.com/tblite/tblite
    Copyright:  (C) Sebastian Ehlert and the tblite authors (Grimme group)
    License:    GNU Lesser General Public License v3.0 or later
                (LGPL-3.0-or-later)  -> see LGPL-3.0.txt
                                         and GPL-3.0.txt

    Derived in runEDDB:
        src/runeddb_xtb_data.f90    The MAJORITY of this file is transcribed
                                    from tblite and remains under
                                    LGPL-3.0-or-later:

          * The complete GFN2-xTB parameter set for Z = 1-86, from tblite
            src/tblite/xtb/gfn2.f90: repulsion alpha and effective nuclear
            charges, Hubbard parameters and their shell-resolved scaling,
            third-order (Hubbard-derivative) parameters, shell counts, shell
            angular momenta, principal quantum numbers, primitive counts,
            Slater exponents, reference occupations, atomic level energies
            (self-energies), CN-dependent level shifts, shell-polynomial
            coefficients, the anisotropic-electrostatics dipole and
            quadrupole kernels with their radii and CN scaling, and the
            method-level scalars. runEDDB retains upstream's array names
            (under a gfn2_ prefix) and upstream's declaration-time unit
            scaling, so the stored double-precision values reproduce
            tblite's post-scaling values exactly.

          * The STO-nG expansion tables and the slater_to_gauss routine,
            from tblite src/tblite/basis/slater.f90, including the
            (n,l) -> table-index mapping and the dedicated 6s / 6p
            expansions. The tabulated coefficients for the standard (n,l)
            sets are the published least-squares fits of R. F. Stewart,
            J. Chem. Phys. 52 (1970) 431.

          * The GFN2 spin-polarization (magnetisation) constants W_LL, from
            tblite src/tblite/data/spin.f90.

        src/runeddb_xtb_driver.f90  (selected GFN2-xTB SCC routines and
                                     conventions that mirror the tblite
                                     single-point implementation)

    Modifications: the tblite material above was transcribed into runEDDB's
    own module structure during 2026-05-29 to 2026-05-31. The changes are
    mechanical -- the working precision kind _wp was replaced by runEDDB's
    _dp, a gfn2_ prefix was added to the parameter arrays, the tables were
    merged into consolidated modules, and the dependency on mctc-lib's
    environment types was removed. The numerical content is unchanged. Each
    affected block in the source carries a notice recording this.

    References:
      GFN2-xTB:   C. Bannwarth, S. Ehlert, S. Grimme,
                  J. Chem. Theory Comput. 15 (2019) 1652-1671.
                  DOI: 10.1021/acs.jctc.8b01176
      spGFN2-xTB: H. Neugebauer, B. Baedorf, S. Ehlert, A. Hansen, S. Grimme,
                  J. Comput. Chem. 44 (2023) 2120-2129.
                  DOI: 10.1002/jcc.27185

--------------------------------------------------------------------------------
 3. mctc-lib - modular computation tool chain library
--------------------------------------------------------------------------------
    Project:    mctc-lib
    Homepage:   https://github.com/grimme-lab/mctc-lib
    Copyright:  (C) the mctc-lib authors (Grimme group / RWTH Aachen)
    License:    Apache License, Version 2.0
                (Apache-2.0)  -> see Apache-2.0.txt

    Derived in runEDDB:
        src/runeddb_xtb_data.f90    (atomic radii table)
        src/runeddb_gd4_driver.f90  (erf-based D4 coordination number;
                                     ported from mctc-lib/ncoord/erf)

--------------------------------------------------------------------------------
 4. RingDetect-HPC - molecular ring (cycle) detection engine
--------------------------------------------------------------------------------
    Project:    RingDetect-HPC
    Homepage:   https://github.com/ouielba90/RingDetect-HPC
    Copyright:  (c) 2026 Ouissam El Bakouri El Farri (ouielba90)
    License:    MIT License (full text below)

    Derived in runEDDB:
        src/runeddb_detect_rings.f90  (--ring-detect: the canonical-cycle
                                       depth-first-search enumeration is
                                       reimplemented from RingDetect-HPC's
                                       src/ring_engine.f90, adapted from a
                                       covalent-radii distance graph to the
                                       Wiberg bond-order graph; used with
                                       the author's permission)

    MIT License

    Copyright (c) 2026 ouielba90

    Permission is hereby granted, free of charge, to any person obtaining a
    copy of this software and associated documentation files (the
    "Software"), to deal in the Software without restriction, including
    without limitation the rights to use, copy, modify, merge, publish,
    distribute, sublicense, and/or sell copies of the Software, and to
    permit persons to whom the Software is furnished to do so, subject to
    the following conditions:

    The above copyright notice and this permission notice shall be included
    in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

--------------------------------------------------------------------------------
 5. OpenBLAS - optimized BLAS / LAPACK implementation
--------------------------------------------------------------------------------
    Project:    OpenBLAS
    Homepage:   https://github.com/OpenMathLib/OpenBLAS
    Copyright:  (c) 2011-2014, The OpenBLAS Project
    License:    BSD 3-Clause License
                (BSD-3-Clause)  -> see OpenBLAS-LICENSE.txt

    Applies to: the Linux x86_64, Linux arm64, Windows x86_64 and Windows
                arm64 executables, into which libopenblas.a is statically
                linked. NOT applicable to the macOS packages: those call
                Apple's Accelerate framework and contain no OpenBLAS code.

                IF A SOURCE DISTRIBUTION IS EVER PUBLISHED and it carries
                the prebuilt libs_*/libopenblas.a archives, this section
                applies to that distribution too -- shipping the archives is
                a binary redistribution of OpenBLAS in its own right. See
                the release checklist in docs/BUILD_FROM_SCRATCH.txt, part 6.

    Version as built (update this block whenever a libopenblas.a in
    libs_win/, libs_arm64/ or libs_linux_x86_64/ is rebuilt):

        Linux x86_64     OpenBLAS 0.3.31 (release tag), DYNAMIC_ARCH with
                         DYNAMIC_LIST="NEHALEM SANDYBRIDGE HASWELL SKYLAKEX
                         COOPERLAKE ZEN"; OpenBLAS additionally builds
                         PRESCOTT as the universal fallback core.
                         Built USE_THREAD=1 NUM_THREADS=256, no CBLAS,
                         no LAPACKE.
        Windows x86_64   OpenBLAS 0.3.31 (release tag), same DYNAMIC_ARCH
                         configuration, core list and threading settings as
                         Linux x86_64, cross-built with MinGW-w64
        Linux arm64      OpenBLAS 0.3.31 (release tag), TARGET=ARMV8
                         (generic armv8-a, single kernel set), cross-built
                         for aarch64, USE_THREAD=1 NUM_THREADS=256, no CBLAS,
                         no LAPACKE
        Windows arm64    OpenBLAS 0.3.34. UNLIKE THE OTHER THREE, this one is
                         NOT built by this project: it is the binary shipped by
                         MSYS2 as mingw-w64-clang-aarch64-openblas, taken from
                         the CLANGARM64 prefix, because that lane is compiled
                         natively on Windows with LLVM Flang and no Fortran
                         cross-toolchain for the target exists. DYNAMIC_ARCH
                         with the ARMV8 baseline plus CORTEXA53, CORTEXA57,
                         NEOVERSEN1, NEOVERSEN2 and NEOVERSEV1 kernel sets, and
                         built USE_OPENMP (again unlike the other three, which
                         use USE_THREAD) -- which is why that executable links
                         LLVM's libomp and not libgomp. Confirm the exact
                         package revision with:
                             pacman -Qi mingw-w64-clang-aarch64-openblas

    The two x86_64 libraries carry seven complete kernel sets and select one
    at run time on the end user's CPU, so a single executable runs on any
    x86_64 machine and still uses AVX2 or AVX-512 where the hardware provides
    them. The Windows arm64 library likewise dispatches at run time, over six
    Arm kernel sets. The Linux arm64 library is a single generic armv8-a build,
    which runs on every 64-bit Arm CPU without dispatching.

    Modifications: for the Windows x86_64 build, two LAPACK-derived source
    files (lapack/laed3/laed3_single.c and lapack/laed3/laed3_parallel.c)
    were patched so that LAMC3 returns FLOATRET rather than FLOAT, which is
    required to cross-compile for Windows. The shipped Windows x86_64 LAPACK is
    therefore not bit-identical to upstream. The Linux x86_64 and Linux arm64
    libraries are built from unmodified upstream source. The Windows arm64
    library is redistributed as MSYS2 built it; any patches it carries are
    theirs and are recorded in that project's PKGBUILD.

    Three of the four libraries -- Linux x86_64, Linux arm64 and Windows
    x86_64 -- are built by this project from the same OpenBLAS release tag,
    v0.3.31, so the source state behind those executables is identified
    exactly. The Windows arm64 library is OpenBLAS 0.3.34 as packaged by MSYS2;
    its source state is identified by that distribution's package revision
    rather than by a build performed here. Earlier releases carried untagged
    development snapshots (version strings ending ".dev"), which named no
    reproducible source state; that was corrected on 2026-08-01.

    OpenBLAS incorporates source from two further projects. That code is
    compiled into the same library and therefore into the runEDDB
    executables. Each has its own copyright holder and its own
    binary-redistribution condition, so each is reproduced separately:

      * Netlib LAPACK - the LAPACK / LAPACKE routines bundled inside
        OpenBLAS.
        Homepage:   https://github.com/Reference-LAPACK/lapack
        Copyright:  (c) 1992-2023 The University of Tennessee and The
                    University of Tennessee Research Foundation;
                    (c) 2000-2023 The University of California Berkeley;
                    (c) 2006-2023 The University of Colorado Denver.
        License:    modified BSD 3-Clause  -> see LAPACK-LICENSE.txt

      * GotoBLAS2 - kernel and memory-allocator code from which OpenBLAS
        descends.
        Copyright:  Copyright 2009, 2010 The University of Texas at Austin.
        License:    BSD 2-Clause  -> see GotoBLAS-LICENSE.txt

    All four platforms obtain LAPACK from inside OpenBLAS. No separate
    reference Netlib LAPACK is linked: until 2026-08-01 the Linux x86_64 lane
    additionally passed -llapack, but OpenBLAS resolves every LAPACK symbol
    runEDDB uses and that flag contributed nothing to the produced binary, so
    it was removed. LAPACK-LICENSE.txt still applies, because the LAPACK code
    bundled inside OpenBLAS is shipped in all four executables.

--------------------------------------------------------------------------------
 6. GNU C Library (glibc) - C runtime library
--------------------------------------------------------------------------------
    Project:    GNU C Library (glibc)
    Homepage:   https://www.gnu.org/software/libc/
    Copyright:  (C) Free Software Foundation, Inc. and the glibc
                contributors
    License:    GNU Lesser General Public License v2.1 or later
                (LGPL-2.1-or-later)  -> see LGPL-2.1.txt

    Applies to: the Linux x86_64 and Linux arm64 executables, which are
                fully statically linked (gfortran -static) and therefore
                embed glibc. NOT applicable to the Windows package (which
                uses the Microsoft C runtime) or to the macOS packages
                (which use Apple's libSystem).

    glibc is used in those two executables, and glibc and its use are
    covered by the GNU Lesser General Public License, version 2.1 or later,
    a verbatim copy of which is supplied as LGPL-2.1.txt. Under LGPL-2.1
    section 6, recipients are entitled to modify glibc and relink it with
    the rest of runEDDB; see the SOURCE-CODE OFFER below.

    glibc also carries a number of permissive third-party notices for code
    incorporated into it. Those notices are reproduced verbatim, as
    published by the glibc maintainers, in glibc-LICENSES.txt.

--------------------------------------------------------------------------------
 7. LLVM Project - flang-rt (Fortran runtime) and LLVM OpenMP runtime
--------------------------------------------------------------------------------
    Project:    The LLVM Project (flang-rt, openmp/libomp)
    Homepage:   https://llvm.org/  and  https://flang.llvm.org/
    Copyright:  (c) the LLVM Project contributors
    License:    Apache License 2.0 with LLVM Exceptions
                (Apache-2.0 WITH LLVM-exception)  -> see LLVM-LICENSE.txt

    Applies to: the Windows arm64 executable ONLY. That lane is compiled with
                LLVM Flang instead of GNU Fortran (no gfortran targets Windows
                on Arm), so the Fortran runtime linked into it is flang-rt and
                the OpenMP runtime is LLVM's libomp -- NOT libgfortran and
                libgomp. NOT applicable to any other package: the Linux,
                Windows x86_64 and macOS executables are built with gfortran
                and contain no LLVM runtime code.

                Both runtimes are linked STATICALLY into runEDDB.exe: flang-rt
                by default, and libomp by naming its static archive explicitly
                on the link line. The package therefore carries no LLVM DLL --
                its only dynamic imports are Windows system forwarders
                (api-ms-win-crt-*, KERNEL32), so it is self-contained.

    Note on why this notice is supplied at all. The LLVM Exception exists
    precisely for this situation: where portions of the Software become
    embedded in Object form as a result of compiling your own source, it
    releases the redistributor from the conditions of Apache-2.0 sections
    4(a), 4(b) and 4(d). Statically linking flang-rt and libomp into
    runEDDB.exe is exactly that case, so no attribution is strictly required.
    This notice and the verbatim LLVM-LICENSE.txt are shipped anyway, for the
    same reason every other text here is: a reader holding the binary should
    be able to identify every project whose compiled code is inside it.

    LLVM-LICENSE.txt is the LLVM Project's own LICENSE.TXT reproduced
    verbatim. Beyond the Apache-2.0-with-exception text it also carries LLVM's
    statement about third-party code inside the LLVM tree and the legacy
    University of Illinois/NCSA license; both are reproduced as published,
    unaltered.

================================================================================
 SOURCE-CODE AND RELINKING OFFER
================================================================================

LGPL-3.0 components (sections 1 and 2). The runEDDB components listed above
under sections 1 and 2 are derived from LGPL-3.0-or-later software. In
accordance with the LGPL, the corresponding source code for those components
is available on request, and recipients are permitted to modify those portions
and relink them with the rest of runEDDB.

LGPL-2.1 component (section 6). The Linux x86_64 and Linux arm64 executables
statically incorporate the GNU C Library, so recipients are entitled under
LGPL-2.1 section 6 to modify glibc and relink it with the rest of runEDDB.

    * The complete source code of the GNU C Library is published by the GNU
      project at https://www.gnu.org/software/libc/.

    * For the other half -- the "work that uses the Library" -- this notice
      is a written offer, valid for three years from the date of the release
      it accompanies, to supply on request the complete runEDDB source code
      and build files, or the corresponding object files, in a form that
      permits relinking against a modified GNU C Library. LGPL-2.1 section 6
      subsection (a) allows that material to be provided as source code
      rather than object code, and subsection (c) allows it to be provided
      by written offer rather than shipped alongside the binary.

There is no charge; the request is fulfilled by e-mail or a download link.

      NOTE FOR THE MAINTAINERS -- the written-offer wording above is
      necessary ONLY because runEDDB is currently distributed as binaries
      with no public source release. THE MOMENT A SOURCE DISTRIBUTION IS
      PUBLISHED, replace this offer with a direct pointer to it: LGPL-2.1
      section 6 subsection (a) is satisfied outright by publishing the work
      that uses the Library, which is simpler, needs no three-year
      commitment, and requires nobody to ask. See the release checklist in
      docs/BUILD_FROM_SCRATCH.txt, part 6.

To make this or the LGPL-3.0 request above, contact:

    runeddb@gmail.com   (Szczepanik Research Group, Jagiellonian University)

The remainder of runEDDB (the EDDB / NAO / BOP analysis pipeline — except the
ring-detection module listed in section 4 — the quantum-chemistry file
parsers, and the output writers) is original work of the runEDDB authors and
is not covered by the licenses above.

================================================================================
 Note on the Apache-2.0 component
================================================================================

Where runEDDB reuses mctc-lib material (Apache-2.0), this NOTICE together with
the retained copyright statements and Apache-2.0.txt satisfies the
attribution requirements of that license. Modifications (e.g. translation of
data tables and routines into runEDDB's source) have been made.
================================================================================
