Chat-first orchestrator for ABACUS + LibRPA workflows. Use when users ask in natural language to prepare, run, audit, or debug GW/RPA tasks, especially when the agent must classify uploaded files, choose local vs server execution, route by system type (molecule, solid, 2D), and keep the interaction operational instead of exposing raw CLI complexity.
Treat the user message as an intent, not as a command request.
Keep the conversation short, operational, and stage-based.
Do these steps in order:
ABACUS -> LibRPA markers: INPUT*, KPT*, STRU, .orb, .abfs, .upf, OUT.ABACUS/, ABACUS logsFHI-aims -> LibRPA markers: control.in, run_librpa_gw_aims_iophr.sh, explicit FHI-aims user intent, or task names such as qsgw_band, qsgw_band0, qsgw, qsgwageometry.in, librpa.d/, self_energy/; they are not enough on their own to claim FHI-aims -> LibRPAskills/fhi-aims-build/skills/oh-my-librpa-abacus-librpa/.skills/oh-my-librpa-fhi-aims-qsgw/.ABACUS -> LibRPA, classify the task as GW, RPA, or Debug.ABACUS -> LibRPA, classify the system as molecule, solid, or 2D.references/pp-nao-abfs-library.md and select files from the bundled asset library.references/abfs-generation.md and generate a matched auxiliary basis instead of substituting an approximate one.ABACUS -> LibRPA, route into the matching reference file and follow it strictly:references/gw-route.mdreferences/rpa-route.mdreferences/debug-route.mdreferences/abacus-merge-compat.md.references/server-profiles.md before submission.ABACUS -> LibRPA, before any real submission, run scripts/intake_preflight.sh <case_dir> --mode <...> --system-type <...> --compute-location <...> and block on any FAIL from the static checks.rules/cards/ instead of inventing new workflow behavior.rules/cards/periodic-gw-plotting.yml before choosing any sorting or plotting logic.INPUT* / KPT* / STRU conventions.ABFS_ORBITAL / .abfs files, load skills/abacus-librpa-abfs-orbital/.If the route is still ambiguous, ask the smallest possible clarification set.
Treat uploaded files as the primary source of truth.
Classify provided files into these groups:
structure files: STRU, cif, xyz, geometry.ininput bundle: INPUT, INPUT_scf, INPUT_nscf, KPT, KPT_scf, KPT_nscf, librpa.infhi-aims strong markers: control.in, run_librpa_gw_aims_iophr.sh, explicit qsgw_band / qsgw_band0 / qsgw / qsgwa task settingsfhi-aims supporting markers: geometry.in, self_energy/, librpa.d/symmetry sidecars: irreducible_sector.txt, symrot_R.txt, symrot_k.txt, symrot_abf_k.txtworkflow scripts: get_diel.py, perform.sh, preprocess_abacus_for_librpa_band.py, run_abacus.sh, output_librpa.py, plot_gw_band_paper.py, env.sh, probe_batch.shbasis/pseudopotential assets: .orb, .abfs, .upflogs/results: output files, error logs, band_out, generated band dataarchives: zip, tar.gzUse these intake rules:
structure files -> generate or complete the workflowinput bundle -> audit and patch; do not rewrite blindlyinput bundle that is clearly ABACUS-based -> hand off to skills/oh-my-librpa-abacus-librpa/fhi-aims strong markers with no conflicting ABACUS markers -> route to skills/oh-my-librpa-fhi-aims-qsgw/fhi-aims supporting markers alone do not override ABACUS routing; ask only if ownership is still unclear after checking for strong markerssymmetry sidecars -> keep them tied to the exact SCF that produced them; if one exists for periodic GW, verify the full required set before LibRPA.abfs files -> treat as authoritative candidates for ABFS_ORBITAL only after confirming that their element, radius cutoff, and angular-momentum coverage match the active PP / NAO setuplogs/results -> start in Debug mode firstarchives -> unpack and classify before asking more questionsIf the user did not provide PP/NAO/ABFS assets, consult the bundled library described in references/pp-nao-abfs-library.md.
If a server-side reference bundle already exists, prefer it over rebuilding from scratch.
Before compute, ask:
Do you want local compute or server compute?Do you need VPN first?Do you want me to run connectivity/login checks now?Then branch:
Do not trust interactive shell defaults for python3, MPI launchers, or executable paths.
Always do all of the following:
OUT.ABACUS, band_out, coulomb_*, LibRPA*.out, librpa.d, time.json, or old GW_band_spin_*run-report.md in that directory${CODEX_HOME:-$HOME/.codex}/workspace/librpa/oh-my-librpa/pwd, list files, and run one stage; do not add .bashrc, conda, setvars.sh, or mpirun -np 1 unless a probe proves they are neededabacus_work and librpa_work were compiled against the same latest LibRI that includes the nearest-fix bugfix; do not mix one side built against older LibRIdf_iopcas_ghj, do not use source ~/.bashrc as the default Slurm batch entrypoint. In batch mode it can leave conda-injected paths without the intended oneAPI/module toolchain, or fail immediately with empty slurm output. Prefer explicit module load cmake/3.31.7, module load oneapi/2024.2, and compiler exports in the script itself1 MPI rank/node, default to the full core count of the allocated node for --cpus-per-task and OMP_NUM_THREADS unless the user explicitly asks for a smaller OpenMP layoutSCF-only runs; do not force pyatb, NSCF, or LibRPA if the user is only checking coulomb_mat_* / coulomb_cut_*symmetry=1 output with symmetry=-1 output: symmetry-on exports IBZ q only, while symmetry-off exports the full BZ q-grid. Compare symmetry-on mpi1 vs mpiN directly, compare Gamma/no-rotation blocks, or restore the full q-star before comparing to symmetry-off datashrink as a workflow invariant on every host: if the bundle was generated with ABFS_ORBITAL, Cs_shrinked_data_*, or shrink_sinvS_*, then librpa.in must keep use_shrink_abfs = t; if the bundle was generated without shrink, then librpa.in must keep use_shrink_abfs = fwhat was done, what was observed, what is nextABACUS_DEBUG_CUT_MPI=1 for short targeted traces; they can distort runtime badly, especially on shrink + single-MPI control runsINPUT_scf, INPUT_nscf, KPT_*, STRU, or ABACUS logs -> route to skills/oh-my-librpa-abacus-librpa/skills/fhi-aims-build/FHI-aims, or provides control.in, run_librpa_gw_aims_iophr.sh, or explicit tasks such as qsgw_band / qsgw_band0 / qsgw / qsgwa with no conflicting ABACUS markers -> route to skills/oh-my-librpa-fhi-aims-qsgw/references/gw-route.mdreferences/rpa-route.mdreferences/debug-route.mdsymmetry -1 and disable the LibRPA symmetry flagsKeep replies concise and useful.
Only offer options when there is a real tradeoff.
Default to a clear next action that moves the case forward now.