Download API

These functions handle fetching data from the ExoMol web API. By default files are cached in Julia's scratch space (~/.julia/scratchspaces/) and persist across Julia sessions; files are only re-downloaded when force=true is passed. Pass dest to write directly into a directory of your choice instead, avoiding a duplicate copy in the scratch space.

Master catalogue

ExoMol.get_exomol_master — Function
get_exomol_master(; force=false)

Download (if necessary) and return the ExoMol master catalogue as a parsed Dict. The catalogue lists all available molecules, isotopologues, and datasets.

Arguments

  • force::Bool=false: Re-download the catalogue even if already cached.

Returns

  • Dict{String,Any}: Parsed contents of exomol.all.json.
source
ExoMol.get_exomol_master_file — Function
get_exomol_master_file(; force=false)

Download the ExoMol master catalogue to the package scratch space and return its local path. Use get_exomol_master to get the parsed catalogue directly.

Arguments

  • force::Bool=false: Re-download the catalogue even if already cached.

Returns

  • String: Absolute path to the cached exomol.all.json file.
source
ExoMol.parse_exomol_master — Function
parse_exomol_master(filepath)

Parse a locally cached ExoMol master catalogue file.

Arguments

  • filepath::AbstractString: Path to a .json master catalogue file.

Returns

  • Dict{String,Any}: Parsed catalogue contents.
source

Datasets

ExoMol.get_exomol_dataset — Function
get_exomol_dataset(molecule, isotopologue, dataset; dest=nothing, wn_range=nothing, force=false, verbose=false)

Download a specific ExoMol dataset and store it locally.

Arguments

  • molecule: Molecular formula (e.g. "H2O").
  • isotopologue: Isotopologue identifier as used by ExoMol (e.g. "1H2-16O").
  • dataset: Dataset label (e.g. "POKAZATEL").
  • dest::Union{AbstractString,Nothing}=nothing: Directory to download files into. When nothing (default) files are stored in the package scratch space (~/.julia/scratchspaces/…/exomol_datasets/molecule/isotopologue/dataset/). When a path is given, files are written directly into that directory (created if it does not exist) with no additional sub-directories appended. Use this to avoid keeping a second copy of a large dataset in the scratch space.
  • wn_range: Wavenumber range (wn_min, wn_max) in cm⁻¹. When provided, only transition files that overlap [wn_min, wn_max] are downloaded. Unsegmented transition files (those without a wavenumber range in their filename) are always included. Defaults to nothing (download all transition files).
  • force::Bool=false: Re-download files even if they already exist in the local cache.
  • verbose::Bool=false: Forward verbose output to Downloads.download.
  • offline::Bool=false: Never access the network; use only cached files and raise an ExoMolCacheError if a needed file is missing. Also enabled by the environment variable EXOMOL_OFFLINE=true.

Once all requested files are present, no network access is needed: the list of transition files and the broadening partners missing on the server are remembered in a .exomol_manifest.json file in the dataset directory. force=true refreshes it.

Returns

  • String: Path to the directory containing the downloaded files (.def.json, .states.bz2, .pf, .broad, and .trans.bz2 files). This path can be passed directly to load_isotopologue.
source
ExoMol.save_dataset — Function
save_dataset(destination, molecule, isotopologue, dataset; force=false)

Copy a cached ExoMol dataset from the scratch space to a directory of choice.

The dataset must already be present in the local cache (i.e. get_exomol_dataset must have been called first). Only the files currently in the cache are copied, so if the dataset was downloaded with a wn_range filter, only those transition files will appear at the destination.

The destination directory layout is identical to what load_isotopologue expects, so the saved path can be passed directly to it:

iso = load_isotopologue(save_dataset("/data/exomol", "H2O", "1H2-16O", "POKAZATEL"))

Arguments

  • destination::AbstractString: Directory to write files into. Created if it does not exist.
  • molecule: Molecular formula (e.g. "H2O").
  • isotopologue: ExoMol isotopologue identifier (e.g. "1H2-16O").
  • dataset: Dataset label (e.g. "POKAZATEL").
  • force::Bool=false: Overwrite files that already exist at the destination.

Returns

  • String: destination, for use in pipelines.
source