--- name: install-nwchem description: When the ASE connector's NWChem calculator reports binary_missing, find an NWChem already installed, or install it once with the person's consent (conda or Spack, in the home folder with a launcher on PATH) so every conversation finds it, or go on with a calculator that is ready. keywords: [nwchem, dft, spack, conda, install, level:L2] --- # Get NWChem for the ASE connector NWChem is free (ECL-2.0). The ASE connector finds it through its **NWChem program** value or `nwchem` on PATH. ## Look first NWChem may already be installed, from this conversation or another: `calculators` reports it when `nwchem` is on PATH; also check `command -v nwchem` and `ls ~/.local/opt/nwchem`. If it is there, use it and do not ask to install it again. ## Ask first Ask once with `ask_user`: **install it now** (Spack builds it from source in tens of minutes with MPI and maths libraries; conda installs a prebuilt one in minutes), **I'll install it myself**, or **use a calculator that is ready** (`calculators` lists them; say what changes, for example xTB instead of DFT). ## Install once, for every conversation Install under `~/.local/opt` (never inside a workspace, which would install it again for each one) and put a launcher in `~/.local/bin`, which is on CLIO's PATH: - **conda (fastest):** with `conda`, or the standalone `micromamba` when conda is absent: `conda create -y -p "$HOME/.local/opt/nwchem" -c conda-forge nwchem`. - **Spack:** with the environment from the fdmnes plugin's `install-fdmnes` skill, `$SPACK install nwchem` (Spack's own recipe), then `$SPACK location -i nwchem`. - **A cluster module:** `module avail nwchem`; set the connector's **NWChem program** to its path instead of a launcher. The conda build carries its build machine's basis-library path, so the launcher sets it: ```sh nw="$HOME/.local/opt/nwchem" mkdir -p "$HOME/.local/bin" cat > "$HOME/.local/bin/nwchem" <