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.
python run_dft.py config.yamlUse 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.0DFT options stay under the same dft: section.
Backward compatibility: legacy flat keys are still accepted.
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.0method: "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.0For each run, files are written under work_folder:
results.csvcalc_results.pklprocess.log- DFT intermediate folders/files under the job workspace
dft_calculator.py: geometry optimization, single-point energy, solvation, thermal correctionset_calculator.py: ET redox aggregation (IP/EA, Eox/Ered)pcet_calculator.py: PCET redox aggregation with pH correctionconstants.py: physical constants and conversion factors
Install with:
pip install -r requirements.txtCurrent key dependencies:
pyscfnumpypyyamljoblib