Low-level parse API
These functions are the building blocks that load_isotopologue calls internally. They are exported for users who need fine-grained control — for example, reading a single states file without loading transitions, or building a custom loading pipeline.
Definition file
ExoMol.read_def_file — Function
read_def_file(filename)Parse an ExoMol dataset definition (.def.json) file.
Arguments
filename::AbstractString: Path to the definition file. Compressed files are not supported and the filename must end in.json.
Returns
Dict{String,Any}: Parsed JSON data structure describing the dataset.
States file
ExoMol.read_state_file — Function
read_state_file(filename[, def])Read an ExoMol .states file and return the parsed state records.
Arguments
filename::AbstractString: Path to a.statesor.states.bz2file.def: Optional dataset definition as returned byread_def_file. When omitted the function looks for a sibling.def.jsonfile.
Returns
Vector{NamedTuple}: State records with field names and types inferred from the dataset definition.
Transitions file
ExoMol.read_trans_file — Function
read_trans_file(filename)Read an ExoMol .trans or .trans.bz2 file and return its transition records.
Each line holds whitespace-separated columns upper_id lower_id A [wavenumber]. Column widths differ between datasets, so fields are located by whitespace rather than fixed byte positions. The wavenumber column is optional in the ExoMol format; when it is absent the wavenumber is stored as 0.0 (and load_isotopologue recovers it from the states). The file is read line by line, so memory use does not grow with the file size beyond the returned vector.
Arguments
filename::AbstractString: Path to a.transor.trans.bz2file.
Returns
Vector{Transition}: Parsed transition records.
Broadening file
ExoMol.read_broad_file — Function
read_broad_file(filename)Read an ExoMol .broad file and return its records.
Each line has the fixed columns code gamma_L n_air followed by zero, one, or two optional quantum-number columns. Missing quantum numbers are stored as NaN.
Arguments
filename::AbstractString: Path to the.broadfile.
Returns
Vector{BroadeningLine}: Parsed broadening records.