1. Two runtimes

LatticeMind has two ways of working, and one command for each.

latticemind

A research conversation. You describe what you want; LatticeMind inspects what exists, prepares the next step, asks before anything runs, reads the result and decides what follows. You can correct it mid-turn, ask what a result actually established, change a parameter, and pick the conversation up tomorrow where you left it. This is the default.

latticemind quick

The one-shot pipeline. One prompt becomes a complete plan, which is turned into solver inputs, run and reported without further input. Its value is the absence of a conversation: you write the request, walk away, and read the report.

A research conversation treats the folder you start it in as the project and works there. latticemind quick creates a project folder under latticemind_outputs/ unless you pass --no-subdir. Either way a project is a folder, and work started in one runtime can be read from the other.

1.1. Choosing a runtime

latticemind                    a research conversation (the default)
latticemind quick              the one-shot pipeline
LATTICEMIND_RUNTIME=quick      the pipeline, for every session in this shell

The choice is made when a session starts. A conversation never hands your request to the pipeline behind your back: if it cannot serve a request, it says so and names the alternatives.

1.2. What a research conversation needs

A model. latticemind setup asks which one to use and where RESCU is, and saves the answers; a first latticemind with nothing configured asks the same two questions. Inside a conversation, /model lists the models you can use — OpenAI, Claude, Gemini and Qwen APIs and a local Ollama — marks each configured or unconfigured, and asks for a missing API key. See Connecting your AI model.

Everything else has a default. Without a solver, LatticeMind still builds the structure and writes the inputs, and says what is missing when you ask it to run.

1.3. Commands inside a conversation

Most of what you want is a sentence. “Use a 6x6x6 grid instead”, “explain what that run established”, “do not run anything yet” — those are requests, and LatticeMind carries them out. The commands are for the things a sentence cannot do.

Command

What it does

/status

What exists in this folder, what is running, what is waiting.

/whereami

Project folder, model, and who answers launch requests.

/approve / /deny

Answer the pending permission request.

/approve-for-me on|off

Let routine runs and new folders go ahead; moves, deletes and expensive runs still ask. /approvals assessed|ask is the same switch.

/model

Choose the model; sets up a missing API key.

/remote

Choose where calculations run; + adds a remote profile.

/attach <path>

Bring a file in this folder — a paper, a structure, a data file — into the conversation.

/report [path]

Write a report of the latest answer with its evidence.

/cancel

Stop the current turn. A running solver job keeps going.

/cancel-job <run>

Ask a running solver job to stop.

/events [n]

The last n recorded events (default 20).

/new

Start a fresh conversation in this folder.

/examples, /help, /exit

Requests that work well; the command list; leave (nothing is lost).

/commands shows the larger palette of latticemind quick. See Interactive commands for the details of each command.

1.4. While a turn runs

Two lines stay at the bottom of the screen and update in place: a status line with the elapsed time, what LatticeMind is doing and the reminder that ctrl-c stops it, and an input line marked > where anything you type appears. Each completed step leaves one dim line above them. While a solver runs, its own output (RESCU’s iteration log, NanoDCAL’s output, VASP’s OSZICAR) is shown there as it is written.

Typing while a turn runs does not interrupt it. Your message is read at the next step, so “use 8x8x8 instead” lands before the next input is written.

ctrl-c offers three choices:

Key

What happens

s

Stop the turn. A solver job already launched keeps running.

d

Leave the work running and return to the prompt.

w

Keep watching.

When the turn finishes you get the answer, then one line saying where the files are, then one sentence on the next step.

1.5. Approvals

Every solver launch needs permission. The request says what will run, on which machine and in which folder, then asks:

1. yes   2. yes, always   3. no

Type the number, or answer in words — yes, go ahead, run it, approve, or no, don’t, cancel. /approve and /deny do the same. yes, always remembers a shell command’s prefix for this folder (mkdir, say); solver launches are asked about each time.

Any request to build, create, set up or run a calculation ends at this question. Only a request that explicitly asks to prepare without running stops earlier. Saying “run it” earlier in the conversation does not grant permission; only your answer to the request does.

A plotting or analysis script that LatticeMind writes is shown in full, with numbered lines, before it asks to run it; a line that could run programs or change files is named beneath it. Read it before answering yes: a script runs on your computer as you.

Approve-for-me. /approve-for-me on (the same as /approvals assessed; start with it using latticemind --approvals assessed) lets a fixed set of rules answer routine requests:

  • Goes ahead: a prepared solver run of low or medium estimated cost, on this machine or on a saved remote profile, one run or a batch; creating folders or empty files inside the project.

  • Always asks: moving, copying or deleting files; writing into a file; reorganising the folder; running a program or an analysis script; a high-cost run on this machine; a run whose size cannot be estimated.

After twelve runs or twenty folder creations since your last message, the next request asks you. Every automatic approval is recorded; /approvals-log lists them. /approve-for-me off returns to asking. There is no mode that approves everything.

Analysis and plotting scripts. A custom analysis or figure script that LatticeMind writes always asks first, whatever the approval mode. The request shows the Python source and its time limit; read it before you approve. LatticeMind runs the script without your API keys and restricts where it may read and write, but these checks are not an operating-system sandbox, so approve only code you are comfortable running. LatticeMind’s own standard band and DOS plots do not need this approval.

1.6. Waiting for calculations

After you approve a launch, the conversation waits for the job and then reads its results in the same turn, so an SCF, band structure and DOS asked for together are carried through in one go. Runs approved together launch one after another.

You can close the terminal while a job runs: the solver keeps running, and latticemind in the same folder reopens the conversation and picks the results up. Sending a message while a job runs does not cancel it; use /cancel-job <run> for that. The computer running the job must stay on.

1.7. Plotting results you already have

Say, “Plot the bands from this run. Do not run it again.” LatticeMind reads the saved output of the run you name and draws a new figure without starting the solver. Standard plots cover RESCU band structures and DOS, NanoDCAL bulk bands and total DOS, and VASP bands and total DOS (including spin-polarized runs). Band plots are labelled with the path’s high-symmetry points and, where the occupations allow, referenced to the valence-band maximum.

A figure shows what a run produced. It does not by itself show that the result is converged or agrees with a paper.

1.8. Band edges and magnetism

For a finished run, ask “What is the band gap, and is it direct?” LatticeMind reads the band edges from the solver’s own eigenvalues and Fermi level:

  • RESCU reports the gap, valence-band maximum and conduction-band minimum, per spin for collinear runs, with the spin splitting of the top valence band, and the total and per-atom magnetic moments.

  • VASP reports the highest filled and lowest empty sampled states, whether the gap is direct or indirect at the sampled points, and the energy at each labelled path point. Spin-polarized runs (ISPIN=2) report both channels, the two-channel gap, the spin splitting and the net moment.

  • NanoDCAL band structures report NanoDCAL’s own band gap and the per-spin band edges along the path.

A metal, or a state inside the smearing window, is reported as such instead of as a gap.

1.9. Using a relaxed structure

Say, “Inspect the finished relaxation. Prepare an SCF at its final geometry.” LatticeMind checks that the relaxation finished and converged, then builds the next calculation from the relaxed cell and positions; nothing is retyped. The new calculation needs its own launch approval, and the relaxation is left as it is. Only the geometry is reused, not the density.

This works for fixed-cell RESCU relaxations with a force tolerance, NanoDCAL conjugate-gradient relaxations with fixed lattice vectors, and VASP relaxations of the ions (ISIF=2) or of the ions and the cell (ISIF=3). For a variable-cell VASP run LatticeMind reports the starting and relaxed cell lengths and the final pressure, with the Pulay-stress caveat. A converged relaxation does not by itself establish the equilibrium lattice or phase stability.

1.10. NanoDCAL transport

For a finished transport run, ask, “Report the conductance, and say what the run did and did not establish.” LatticeMind reports conductance in units of the conductance quantum G0 (twice the electron charge squared divided by Planck’s constant) and current in amperes, for a single zero-bias, spin-free lead pair. It keeps electrode convergence, device convergence and property completion separate, and a device calculation must have converged before its transmission is computed.

A smooth transmission curve does not prove convergence with respect to energy integration, transverse k-sampling or device buffer length; those need their own studies.

1.11. Projects from latticemind quick

A project the pipeline created can be opened for reading. Reading, quoting and comparing its results work straight away, and nothing in the folder is changed. To run one of its calculations again, ask LatticeMind to set it up in the conversation first.

1.12. In the browser

latticemind-web runs the same conversation in a browser, with a Control room beside it. See The web console.