Standard Run
Hamster.run_calculation — Method
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
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.
- Retrieve configuration indices for the selected systems using
Determine Calculation Mode
"md"(molecular dynamics) if the configuration contains aSupercelland only one system."universal"if multiple systems are present with aSupercell."pc"(primitive cell) otherwise.
Structure Extraction
- Load the atomic structures for the assigned configuration indices using
get_structures.
- Load the atomic structures for the assigned configuration indices using
Basis Construction
- Build basis functions (
Basis) for each structure to represent the effective Hamiltonian.
- Build basis functions (
Hamiltonian Initialization
- Initialize the
EffectiveHamiltonianmodel with the structures and their bases, ready for eigenvalue or Hamiltonian computations.
- Initialize the
Profiler Setup
- Create a
HamsterProfilerto record computational timings, performance metrics, and other profiling data.
- Create a
Eigenvalue / Hamiltonian Calculation
- Execute
get_eigenvalues(or the equivalent routine) to compute the eigenvalues or solve the Hamiltonian for the provided structures.
- Execute
Required Inputs
- Structural configurations
train_mode = md: seeget_xdatcarandget_sc_poscartrain_mode = pc: seeget_poscar
- Eigenvalue or Hamiltonian data as specified in the configuration.
Output Files
ham.h5— HDF5 file containing the Hamiltonian, generated ifwrite_hk(k-space) orwrite_hr(real space) istrue.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 ifskip_diagistrue; default).