Standard Run

Hamster.run_calculationMethod
run_calculation(::Val{:standard}, comm, conf::Config; rank=0, nranks=1)

Performs a standard calculation for an effective Hamiltonian model, computing either the eigenvalues or the Hamiltonian itself for a given set of structures.

Workflow

  1. Configuration Sampling

    • Retrieve configuration indices for the selected systems using get_config_inds_for_systems.
    • Write the indices to a file on the root process (rank == 0) and broadcast them to all ranks for consistency.
    • Split indices among MPI ranks for parallel execution.
  2. Determine Calculation Mode

    • "md" (molecular dynamics) if the configuration contains a Supercell and only one system.
    • "universal" if multiple systems are present with a Supercell.
    • "pc" (primitive cell) otherwise.
  3. Structure Extraction

    • Load the atomic structures for the assigned configuration indices using get_structures.
  4. Basis Construction

    • Build basis functions (Basis) for each structure to represent the effective Hamiltonian.
  5. Hamiltonian Initialization

    • Initialize the EffectiveHamiltonian model with the structures and their bases, ready for eigenvalue or Hamiltonian computations.
  6. Profiler Setup

    • Create a HamsterProfiler to record computational timings, performance metrics, and other profiling data.
  7. Eigenvalue / Hamiltonian Calculation

    • Execute get_eigenvalues (or the equivalent routine) to compute the eigenvalues or solve the Hamiltonian for the provided structures.

Required Inputs

  • Structural configurations
    • train_mode = md: see get_xdatcar and get_sc_poscar
    • train_mode = pc: see get_poscar
  • Eigenvalue or Hamiltonian data as specified in the configuration.

Output Files

  • ham.h5 — HDF5 file containing the Hamiltonian, generated if write_hk (k-space) or write_hr (real space) is true.
  • hamster.out — Standard Hamster output file with summary information.
  • hamster_out.h5 — HDF5 file containing:
    • Loss values (for iterative calculations, if applicable)
    • Timings and profiling data
  • Es.dat — Plain text file containing computed eigenvalues for each structure (written only if skip_diag is true; default).
source