Skip to content
deepprinciplePublic

About

This work involves calculating solvation free energies and redox potentials using DFT methods.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

DFT-redox

A lightweight local tool for DFT-based redox calculations with two workflow modes:

  • ET (Electron Transfer)
  • PCET (Proton-Coupled Electron Transfer)

Both modes are selected by a single YAML parameter: method.

Run

python run_dft.py config.yaml

YAML Schema (Unified)

Use one YAML file for both ET and PCET. Switch only:

calculation:
  method: "ET"   # or "PCET"

Recommended structure:

input:
  et:
    xyz_file: "molecule.xyz"
    charge: 0
    spin: 0
  pcet:
    ox_xyz: "ox.xyz"
    red_xyz: "red.xyz"
    ox_charge: 0
    ox_spin: 0
    red_charge: 0
    red_spin: 0
    n_electrons: 1

output:
  work_folder: "dft_calc"
  jobname: "job_001"

calculation:
  method: "ET"   # "ET" or "PCET"
  et:
    mode: "both"
  pcet:
    pH: 7.0

DFT options stay under the same dft: section.

Backward compatibility: legacy flat keys are still accepted.

Legacy Examples

1) ET Mode

method: "ET"
work_folder: "dft_calc"
jobname: "job_et_001"

xyz_file: "molecule.xyz"
charge: 0
spin: 0

et:
  mode: "both"   # "oxidation" | "reduction" | "both"

dft:
  optimization:
    functional: "wb97x-d4"
    basis_set: "def2-svpd"
    density_fit: true
    auxbasis: "def2-universal-jkfit"
  single_point:
    functional: "wb97m-v"
    basis_set: "def2-tzvpd"
    density_fit: true
    auxbasis: "def2-universal-jkfit"
  solvation:
    method: "SMD"
    functional: "M06-2X"
    basis_set: "6-31G*"
    solvent: "water"
    epsilon: 78.36
  thermal:
    temperature: 298.15
    pressure: 101325.0

2) PCET Mode

method: "PCET"
work_folder: "dft_calc"
jobname: "job_pcet_001"

pcet:
  ox_xyz: "ox.xyz"
  red_xyz: "red.xyz"
  ox_charge: 0
  ox_spin: 0
  red_charge: 0
  red_spin: 0
  n_electrons: 1
  pH: 7.0

dft:
  optimization:
    functional: "wb97x-d4"
    basis_set: "def2-svpd"
    density_fit: true
    auxbasis: "def2-universal-jkfit"
  single_point:
    functional: "wb97m-v"
    basis_set: "def2-tzvpd"
    density_fit: true
    auxbasis: "def2-universal-jkfit"
  solvation:
    method: "SMD"
    functional: "M06-2X"
    basis_set: "6-31G*"
    solvent: "water"
    epsilon: 78.36
  thermal:
    temperature: 298.15
    pressure: 101325.0

Output

For each run, files are written under work_folder:

  • results.csv
  • calc_results.pkl
  • process.log
  • DFT intermediate folders/files under the job workspace

Core Modules

  • dft_calculator.py: geometry optimization, single-point energy, solvation, thermal corrections
  • et_calculator.py: ET redox aggregation (IP/EA, Eox/Ered)
  • pcet_calculator.py: PCET redox aggregation with pH correction
  • constants.py: physical constants and conversion factors

Dependencies

Install with:

pip install -r requirements.txt

Current key dependencies:

  • pyscf
  • numpy
  • pyyaml
  • joblib

About

This work involves calculating solvation free energies and redox potentials using DFT methods.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages