atlas.benchmarks.dft package
DFT benchmark utilities for selecting best calculation settings.
Submodules
atlas.benchmarks.dft.dft_benchmark_core module
Core logic for DFT parameter benchmarking.
Selects representative structures, submits VASP calculations varying one parameter at a time, collects results, and analyses convergence to find the cheapest settings within an energy threshold.
- atlas.benchmarks.dft.dft_benchmark_core.analyze_convergence(submitted: list[dict], benchmark_config: dict) dict[str, dict[str, Any]]
Analyse convergence for each benchmark parameter and phase.
Returns a nested dict:
{ 'kspacing': { 'alpha': { 'reference_value': 0.05, 'reference_energy': -5.123, 'converged_value': 0.125, 'values': [0.05, 0.075, ...], 'energies': [-5.123, -5.123, ...], 'diffs_meV': [0.0, 0.3, ...], }, ... }, ... }
- atlas.benchmarks.dft.dft_benchmark_core.build_benchmark_calculations(representative_structures: dict[str, Atoms], benchmark_config: dict, base_incar: dict, base_kspacing_dict: dict) list[dict]
Build calculation descriptors for every benchmark sweep.
Each descriptor contains everything needed to submit one VASP calculation via
submit_aiida_vasp_calculation.Returns a list of dicts with keys:
phase,param_name,param_value,structure,incar,kspacing_dict,is_reference,calc_label.
- atlas.benchmarks.dft.dft_benchmark_core.determine_reference_value(param_name: str, values: list, direction: str | None = None, explicit_reference: float | int | None = None) float | int
Return the tightest (most expensive) value from a sweep list.
Heuristics by parameter name: -
kspacing,ediff,sigma: smallest is tightest -encut,ispin: largest is tightest - Otherwise uses direction ("min"or"max"), defaulting to"max"
- atlas.benchmarks.dft.dft_benchmark_core.generate_toml_snippet(convergence_results: dict) str
Generate a TOML snippet with recommended settings.
- atlas.benchmarks.dft.dft_benchmark_core.monitor_and_collect(submitted: list[dict], check_interval: int = 240) list[dict]
Wait for all benchmark calculations to finish and collect energies.
Returns the submitted list with added
energy_per_atomandn_atomskeys.
- atlas.benchmarks.dft.dft_benchmark_core.select_representative_structures(database: list[Atoms]) dict[str, Atoms]
Pick one representative bulk structure per phase.
Prefers the
base=Truestructure for each phase. Falls back to the smallest bulk structure when no base is tagged.
- atlas.benchmarks.dft.dft_benchmark_core.submit_benchmark_calculations(calc_descriptors: list[dict], config_dict: dict, dry_run: bool = False) list[dict]
Submit all benchmark calculations via AiiDA.
Each descriptor gets submitted using the existing
submit_aiida_vasp_calculationfunction. Benchmark metadata is stored in AiiDA node extras for later retrieval.Returns the descriptors list with an added
nodekey (the AiiDA node, orNonefor dry runs).
atlas.benchmarks.dft.dft_benchmark_report module
Reporting and plotting for DFT benchmark results.
- atlas.benchmarks.dft.dft_benchmark_report.generate_full_report(convergence_results: dict[str, dict[str, Any]], threshold_meV: float, output_dir: Path, toml_snippet: str) Path
Orchestrate all reporting: plots, tables, and TOML snippet.
- atlas.benchmarks.dft.dft_benchmark_report.plot_convergence(convergence_results: dict[str, dict[str, Any]], threshold_meV: float, output_dir: Path) list[Path]
Generate one convergence plot per benchmark parameter.
Each plot shows energy difference vs parameter value with one line per phase, a threshold line, and a marker on the selected value.
- atlas.benchmarks.dft.dft_benchmark_report.print_summary_table(convergence_results: dict[str, dict[str, Any]], threshold_meV: float) None
Print a summary table to the console.
atlas.benchmarks.dft.run_dft_benchmark module
CLI entry point for DFT parameter benchmarking.
Usage:
atl_dft_benchmark -c benchmark_config.toml
- atlas.benchmarks.dft.run_dft_benchmark.load_config(config_file: str) dict
- atlas.benchmarks.dft.run_dft_benchmark.main() int
- atlas.benchmarks.dft.run_dft_benchmark.parse_arguments() Namespace
Module contents
DFT parameter benchmarking for optimal VASP settings per phase.