Skip to content

About

Fast and reproducible electron-affinity calculations for diatomic molecules

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

58 Commits

Folders and files

Repository files navigation

DiatomicEA

Desktop and command-line application for automated electron-affinity calculations of diatomic molecules with DFT.

Release License

DiatomicEA estimates electron affinities from a fixed DFT ensemble. For state-resolved results with coupled-cluster theory, the complete-basis-set limit and relativistic and spin–orbit corrections, use its successor OpenEA Benchmark.

Download 1.0.0 · Installation · User guide · Issues

Overview

DiatomicEA runs a fixed multi-stage quantum-chemistry protocol for one molecule at a time:

initial geometry scan -> geometry analysis -> high-accuracy refinement -> EA prediction -> results

It plans the calculation, runs the single-point jobs in parallel worker processes, stores every raw result, reports progress, and writes the final prediction with its intervals and provenance to CSV. Interrupted or failed runs can be resumed without recomputing finished tasks.

On Windows, the PyQt5 GUI runs natively and the PySCF backend runs in WSL2 (Ubuntu 24.04). On Linux, both run natively.

Features:

  • PyQt5 GUI with a queue for several molecules
  • CPU detection with a configurable number of workers; calculations never run in the GUI thread
  • progress, throughput and remaining time per stage
  • resume and retry for interrupted or failed runs
  • prediction from four functionals (PBE, B3LYP, PBE0, TPSSh) with 80 %, 90 % and 95 % prediction intervals
  • raw and final CSV output with compute-backend provenance
  • release artifacts with SHA-256 checksums

Installation

Windows

Download and extract DiatomicEA-1.0.0.zip, open PowerShell in the extracted folder and run:

.\scripts\install_windows.ps1                    # standard installation
.\scripts\install_windows.ps1 -InstallWSL        # also install Ubuntu 24.04 under WSL
.\scripts\install_windows.ps1 -DesktopShortcut   # also create a desktop shortcut

The installer creates a private environment, installs the GUI, sets up the WSL compute backend with the matching DiatomicEA wheel and validates the backend with a real calculation. It never restarts Windows. Afterwards, start DiatomicEA from the Start menu.

Linux

From the extracted release:

chmod +x scripts/install_linux.sh
./scripts/install_linux.sh

This installs PyQt5, PySCF 2.13.0 and basis-set-exchange into a private environment, validates the backend and creates launchers for the GUI and the CLI. Details are in docs/INSTALLATION.md.

Usage

  1. Enter the two element symbols, for example O H, Al O or Mg O.

  2. Set the molecule-specific options:

    Setting Meaning
    Bond-length scan lower and upper limit of the initial geometry scan
    Maximum spin (2S) highest spin considered in the neutral and anion state scans
    Workers number of parallel worker processes

    The scientific method itself is fixed.

  3. Add the molecule to the queue. Queued calculations can be reordered or removed.

  4. Start the queue. Molecules are processed one after another; the work within a molecule runs in parallel.

  5. The result shows the predicted EA, the 80/90/95 % prediction intervals, the half-range of the functionals and the individual PBE, B3LYP, PBE0 and TPSSh values. Open results folder opens the full record.

Command line:

diatomic-ea --help
diatomic-ea-gui

Method (v1.0.0)

Initial geometry scan with the functionals PBE, B3LYP, PBE0 and TPSSh and the basis sets def2-SVP, def2-TZVP, def2-TZVPP, def2-SVPD and def2-TZVPD. Neutral and anionic spin states are scanned over the given bond-length range, and the minima per method and state are analysed.

Refinement with def2-QZVPD around the selected geometries, with a narrower scan and the most relevant spin states. Atoms beyond krypton use the corresponding def2 effective core potentials.

For the four refined functional EA values $q_f$:

$$m_{\mathrm{QZ}} = \operatorname{median}(q_f), \qquad h_{\mathrm{QZ}} = \frac{\max(q_f)-\min(q_f)}{2}$$ $$EA_{\mathrm{pred}} = m_{\mathrm{QZ}} + 0.0825\ \mathrm{eV}, \qquad s(h) = \exp(-2.4496 + 3.0511\,h)$$

where $s(h)$ is the uncertainty scale for the 80 %, 90 % and 95 % prediction intervals. A prediction is only reported if all four functionals pass the hard-warning criteria.

Output and stored data

Each production run keeps the calculation plan, the raw single-point results, progress records, geometry and refinement data, the final CSV, a run manifest and the compute-backend provenance. On Windows the exact DiatomicEA wheel used for the run is recorded and deployed to the WSL backend.

The final CSV contains:

molecule, ea_pbe_eV, ea_b3lyp_eV, ea_pbe0_eV, ea_tpssh_eV, median_qz_eV, half_range_qz_eV,
predicted_ea_eV, pi80_lower_eV, pi80_upper_eV, pi90_lower_eV, pi90_upper_eV, pi95_lower_eV, pi95_upper_eV

Runs are stored in %LOCALAPPDATA%\DiatomicEA\production_runs on Windows and in ~/.diatomic-ea/production_runs otherwise.

Architecture

flowchart LR
    A[GUI] --> B[Calculation queue]
    B --> C[Production planner]
    C --> D[Task executor]
    D -->|Windows| E[WSL2 backend]
    D -->|Linux| F[Native backend]
    E --> G[PySCF 2.13.0]
    F --> G
    G --> H[Raw results]
    H --> I[Geometry analysis]
    I --> J[Refinement]
    J --> K[EA prediction]
    K --> L[CSV and provenance]
Loading

The compute backend does not depend on the Qt GUI.

Releases

Each release contains a platform-independent ZIP, a wheel, a source distribution, SHA256SUMS.txt and release_manifest.json. For 1.0.0, use the assets of the v1.0.0 release.

Development

python -m pip install -e ".[dev,gui]"
python -m pytest
python scripts/build_release.py
src/diatomic_ea/   application and workflow
tests/             tests
scripts/           release, install and uninstall scripts
docs/              installation and user guide

Citation

Please cite the software version you used and link the corresponding GitHub release. For reproducibility, keep the run manifest and compute provenance written by DiatomicEA.

License

GPL-3.0-only, see LICENSE.

About

Fast and reproducible electron-affinity calculations for diatomic molecules

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages