Handover: basis comparison test matrix → vq chat

From: basis-set optimization chat (vibe-basis) To: vq queue chat Date: 2026-05-22

What we need to do

Run 18 CRYSTAL14 calculations on planetx (or mars) comparing two basis sets (pob-TZVP vs “seg”) across 3 compounds (MgO, CaO, LiF) with 3 methods each (RHF, PW1PW, PBE).

Current state

All 18 .d12 input decks are already generated in the directory basis_test_matrix/ at the repo root. Each is in its own subdirectory:

basis_test_matrix/
├── MgO_pob_rhf/MgO_pob_rhf.d12
├── MgO_seg_rhf/MgO_seg_rhf.d12
├── MgO_pob_pw1pw/MgO_pob_pw1pw.d12
├── MgO_seg_pw1pw/MgO_seg_pw1pw.d12
├── MgO_pob_pbe/MgO_pob_pbe.d12
├── MgO_seg_pbe/MgO_seg_pbe.d12
├── CaO_pob_rhf/...
├── CaO_seg_rhf/...
├── CaO_pob_pw1pw/...
├── CaO_seg_pw1pw/...
├── CaO_pob_pbe/...
├── CaO_seg_pbe/...
├── LiF_pob_rhf/...
├── LiF_seg_rhf/...
├── LiF_pob_pw1pw/...
├── LiF_seg_pw1pw/...
├── LiF_pob_pbe/...
└── LiF_seg_pbe/...

How vibe-basis interacts with vq

vibe-basis has a VqTransport class that wraps the vq CLI for submit/poll/fetch. The recipe run_d12_batch() in vibe_basis/recipes/run_d12.py accepts a list of .d12 files and a transport, then submits each through vq, waits, and collects results.

from pathlib import Path
from vibe_basis.recipes.run_d12 import run_d12_batch
from vibe_basis.transports.vq import VqTransport

paths = [p for p in Path("basis_test_matrix").glob("*/*.d12")]
report = run_d12_batch(
    paths,
    VqTransport(host="planetx"),
    crystal_wrapper="/home/mpei/crystal/run-crystal.sh",
    wall_time_s=14400,
)
print(report.summary())

Alternatively, submit the entire batch as one vq job (disconnect-safe):

from vibe_basis.recipes.remote import submit_recipe_to_vq
handle = submit_recipe_to_vq(
    structures=["PT2013-T4"],
    host="planetx",
    crystal_wrapper="/home/mpei/crystal/run-crystal.sh",
    wall_time_s=172800,
)

What we need from the vq chat

  1. vq CLI working on this machine — can you run vq status and confirm it connects to planetx/mars? (Currently vq binary not found on this macOS dev box.)

  2. CRYSTAL14 wrapper — planetx and mars both need the run-crystal.sh script from vibe-queue/contrib/run-crystal.sh at an accessible path. Is /home/mpei/crystal/run-crystal.sh correct on both hosts?

  3. Submit the batch — either:

    • A: Run the Python snippet above on a machine where vq is installed (planetx itself, or a laptop with vq configured).

    • B: scp the basis_test_matrix/ directory to planetx, SSH in, and run CRYSTAL14 manually on each .d12 file.

    • C: Package the directory as a tar.gz and vq submit -c archive.tar.gz -- bash run-all.sh as a single job.

  4. Collect results — once jobs complete, we need the CRYSTAL14 output files (*.out) to extract TOTAL ENERGY lines and compare pob-TZVP vs seg across methods.

Expected output

For each of the 18 decks, we want:

MgO_pob_rhf:   TOTAL ENERGY(HF)(AU)  = -274.xxxxxx
MgO_seg_rhf:   TOTAL ENERGY(HF)(AU)  = -274.yyyyyy   (Δ = ±z mHa)
MgO_pob_pw1pw: TOTAL ENERGY(DFT)(AU) = -275.xxxxxx
MgO_seg_pw1pw: TOTAL ENERGY(DFT)(AU) = -275.yyyyyy
...

And convergence behavior: SCF cycles, any failures.

Per-element basis comparison pre-run

Before running: both basis sets are already parsed and ready:

Element

pob-TZVP shells

seg shells

seg is more …

Mg (Z=12)

9

12

segmented (+3 shells)

Ca (Z=20)

19

18

similar

O (Z=8)

8

13

segmented (+5 shells)

Li (Z=3)

9

8

similar

F (Z=9)

14

14

same count

The seg bases decompose the valence region into more contracted shells (segmented contraction) vs pob’s general contraction. This should give better variational flexibility at higher computational cost.

Files involved

  • vibe-basis/tests/fixtures/d12/MgO_seg_PW1PW.d12 — seg basis for Mg, O

  • vibe-basis/tests/fixtures/d12/CaO_seg_HF.d12 — seg basis for Ca, O

  • vibe-basis/tests/fixtures/d12/LiF_seg_PW1PW.d12 — seg basis for Li, F

  • python/vibeqc/basis_library/sources/pob-TZVP/ — pob-TZVP per-element files

  • vibe_basis/recipes/run_d12.py — batch runner

  • vibe_basis/recipes/remote.py — remote recipe submission

  • vibe_basis/transports/vq.py — VqTransport (host=”planetx”|”mars”)

  • basis_test_matrix/ — generated .d12 decks (ready to run)