PAOFLOW.pyskeaf.runner#

High-level driver that orchestrates a SKEAF run for one (θ, φ) angle.

Phase 4: run_at_angle glues slice / orbit / averaging modules together. Phase 5: run_skeaf consumes a PAOFLOW.pyskeaf.config.SkeafConfig directly, including the hvd H-vector setup and the hvd == 'r' rotation sweep, and writes all five Fortran-compatible output files. Phase 6: MPI parallelism over the angle sweep when launched by Slurm or mpirun, with optional joblib parallelism (cfg.n_jobs) outside MPI, plus structured logging progress reports.

The Fortran main program around skeaf_v1p3p0_r149.F90 lines 1100–2950 is the reference for the call sequence.

Attributes#

Classes#

BXSFRun

The calculation or skip outcome for one PAOFLOW BXSF file.

Functions#

run_at_angle(bxsf, theta, phi, *, numint[, ...])

Run a single-angle SKEAF analysis.

run_angle_sweep(bxsf, angles_rad, *, numint, **kwargs)

Convenience wrapper: call run_at_angle() for each row of angles_rad.

run_skeaf(config[, bxsf, write_files, output_dir, ...])

Top-level driver: run SKEAF as defined by config.

run_paoflow_bxsf_files(config, *, input_dir[, ...])

Run selected PAOFLOW BXSF bands whose energy ranges contain E_F.

Module Contents#

PAOFLOW.pyskeaf.runner.logger[source]#
class PAOFLOW.pyskeaf.runner.BXSFRun[source]#

The calculation or skip outcome for one PAOFLOW BXSF file.

path: pathlib.Path[source]#
minimum_ev: float[source]#
maximum_ev: float[source]#
fermi_energy_ev: float[source]#
result: PAOFLOW.pyskeaf.results.SKEAFResult | None = None[source]#
skipped_reason: str | None = None[source]#
property calculated: bool[source]#
PAOFLOW.pyskeaf.runner.run_at_angle(bxsf, theta, phi, *, numint, fermi_energy=None, min_freq_kT=0.0, freq_same_frac=0.01, avg_same_frac=0.05, allow_near_walls=False)[source]#

Run a single-angle SKEAF analysis.

See module docstring for details. Returns a SKEAFResult whose orbits list contains one Orbit per averaged extremum.

PAOFLOW.pyskeaf.runner.run_angle_sweep(bxsf, angles_rad, *, numint, **kwargs)[source]#

Convenience wrapper: call run_at_angle() for each row of angles_rad.

angles_rad has shape (n_angles, 2) with columns (theta, phi). Returns a single SKEAFResult whose orbits list is the concatenation of all per-angle orbits, in the order the angles were given. In a multi-rank MPI launch this is a collective call: every rank must call it, and the angles are divided among MPI.COMM_WORLD.

PAOFLOW.pyskeaf.runner.run_skeaf(config, bxsf=None, *, write_files=True, output_dir=None, output_suffix='', write_auxiliary_files=True)[source]#

Top-level driver: run SKEAF as defined by config.

Parameters:
  • config – Either a SkeafConfig instance or a path to a config.in file.

  • bxsf – Pre-loaded BXSF dataset. If None, loaded from config.filename.

  • write_files – When True (default) the five Fortran-compatible output files are written to output_dir (cwd if not given).

  • output_dir – Destination directory for output files. Created if missing.

  • write_auxiliary_files – Also write short, long, and orbit-outline diagnostic files. The frequency-vs-angle result is always written when write_files is true.

Notes

In a multi-rank MPI launch this is a collective call and must be entered by every rank. Angles are distributed across MPI.COMM_WORLD and the completed orbit list is returned on every rank; only rank 0 writes files. Outside MPI, config.n_jobs controls optional joblib multiprocessing.

PAOFLOW.pyskeaf.runner.run_paoflow_bxsf_files(config, *, input_dir, filenames=None, all_files=False, output_dir=None, write_files=True, write_auxiliary_files=True, progress_callback=None)[source]#

Run selected PAOFLOW BXSF bands whose energy ranges contain E_F.

PAOFLOW’s SKEAF-compatible per-band BXSF grids use Rydberg, while the Fermi-energy field in config.in uses eV. read_config_in() converts the latter to internal Rydberg, so eligibility is tested in Ry and the reported band limits are converted to eV for users. Select arbitrary BXSF names with filenames or every *.bxsf in input_dir with all_files=True. If neither is supplied, the legacy filename in config.in is used.

Output files include the Fermi energy in eV and use the trailing numeric band index when present, e.g. qo_EF_0_short_1.out for Fermi_surf_band_1.bxsf at 0 eV. Arbitrary filenames use their complete stem, e.g. qo_EF_0_short_manual_name.out. progress_callback is invoked after each band is calculated or skipped. The returned BXSFRun results carry BXSF header metadata but not the band energy grid, so scanning many files does not accumulate them.