1. Settings & configuration reference

This page lists defaults and explicit overrides. LatticeMind still requires an AI provider configuration and the LatticeMind license described in The LatticeMind license. A solver command, its own license, and its licensed data are required only when that solver executes.

1.1. Where settings come from

LatticeMind reads configuration from several places, in order of precedence (later sources override earlier ones):

  1. Defaults built into LatticeMind.

  2. Config file — ~/.latticemind/config.json (or a file named by LATTICEMIND_CONFIG_FILE).

  3. Your saved settings — ~/.latticemind/.env (or the file named by LATTICEMIND_USER_ENV_FILE), written by latticemind setup, /model and the browser setup screen.

  4. The folder’s .env — in the folder you start in, or the nearest one in a folder above it.

  5. Environment variables.

  6. Choices made in a session, such as /model, /remote and latticemind-web flags.

A conversation keeps the model and execution settings it began with; changing a default affects new conversations.

Tip

When /model or the browser saves a value, it writes to the folder’s own .env if there is one, otherwise to ~/.latticemind/.env. For servers and reproducibility, prefer .env or real environment variables.

1.2. AI provider & models

Variable

Purpose

RESCU_LLM_PROVIDER

openai (default) | claude | gemini | qwen | ollama. /model writes it.

LATTICEMIND_<PROVIDER>_MODEL

The model a research conversation uses with that provider, e.g. LATTICEMIND_OPENAI_MODEL=gpt-5.6-sol. /model writes it.

LATTICEMIND_USER_ENV_FILE

A different file for your saved settings instead of ~/.latticemind/.env. When set, it is the only file /model and latticemind setup write to.

OPENAI_API_KEY

OpenAI API key.

OPENAI_MODEL_QUICK / OPENAI_MODEL_THOROUGH

latticemind quick only: fast/default and higher-effort OpenAI models (e.g. gpt-5.4-mini / gpt-5.4).

OPENAI_ORG_ID / OPENAI_PROJECT_ID

Only if your account uses org/project scoping.

CLAUDE_API_KEY (or ANTHROPIC_API_KEY)

Anthropic Claude key.

CLAUDE_MODEL_QUICK / CLAUDE_MODEL_THOROUGH

latticemind quick only: Claude models (e.g. claude-sonnet-4-6 / a stronger Claude model).

GEMINI_API_KEY (or GOOGLE_API_KEY)

Google Gemini key.

GEMINI_MODEL_QUICK / GEMINI_MODEL_THOROUGH

latticemind quick only: Gemini models (e.g. gemini-3-flash-preview / gemini-3.1-pro-preview).

DASHSCOPE_API_KEY

Qwen (DashScope) key.

DASHSCOPE_MODEL_QUICK / DASHSCOPE_MODEL_THOROUGH

latticemind quick only: Qwen models (e.g. qwen3-max).

OLLAMA_BASE_URL

Local Ollama endpoint (default http://127.0.0.1:11434).

OLLAMA_MODEL_QUICK / OLLAMA_MODEL_THOROUGH

latticemind quick only: local Ollama models (e.g. qwen3:8b).

LATTICEMIND_MAX_COST_PER_TURN_USD / LATTICEMIND_MAX_COST_PER_SESSION_USD

Spending caps on metered providers, in estimated USD (defaults 5 and 25). A turn or session that would exceed its cap stops before the next model call and says so. LATTICEMIND_MAX_TOKENS_PER_SESSION (default 20 million) caps prompt and completion tokens the same way.

1.3. Reports & output location

Variable

Purpose

LATTICEMIND_ARTIFACTS_DIR

Overrides the project folder. By default a conversation works in the folder you start it in, and latticemind quick in ./latticemind_outputs. Point it at persistent storage on shared machines and cloud.

LATTICEMIND_SUBDIR

latticemind quick only. 1 (default) creates a project subdirectory for each new project; 0 works in the folder LatticeMind was started from. Home, root, system, and software folders always get a subdirectory. /subdir on|off changes it for one session.

RESCU_REPORT_FORMAT

latticemind quick only: html (default) or off to disable the automatic report. In a conversation, /report writes one on request.

LATTICEMIND_REPORT_LANGUAGE

auto (default) | en | fr | zh. auto follows the prompt language.

1.4. Release update notice

Variable or file

Purpose

LATTICEMIND_UPDATE_CHECK

1 (default) checks the public Nanoacademic package index during interactive CLI and Web startup; 0 disables the check.

~/.latticemind/update_check.json

The last check’s result. A successful check is reused for 24 hours; an unavailable index is retried after one hour. When LATTICEMIND_CONFIG_FILE names another config file, this file is written beside it.

1.5. Web UI

Variable

Purpose

LATTICEMIND_WEB_HOST

Bind host (default 127.0.0.1). The Web UI has no authentication of its own, so it is reached through the platform’s proxy rather than published.

LATTICEMIND_WEB_PORT

Bind port (default 7865).

LATTICEMIND_WEB_OPEN_BROWSER

0 to never open a local browser.

LATTICEMIND_WEB_BASE_PATH

Explicit proxy prefix (e.g. /proxy/7865) for reverse proxies.

LATTICEMIND_CLOUD_MODE

1 enables cloud-friendly defaults (no browser, proxy-aware base path).

LATTICEMIND_UI_MODE

cli (the default) starts the conversation in the terminal; web opens the web console in your browser instead (see Terminal and browser). The earlier terminal dashboard has been retired.

LATTICEMIND_RUNTIME

quick makes latticemind start the one-shot pipeline and latticemind-web open the classic dashboard. Unset, you get the research conversation.

1.6. Solver commands, license & pseudopotentials

LatticeMind stores one launch command per solver. latticemind setup and the browser’s Save path write them to ~/.latticemind/.env; environment variables override them.

Variable

Purpose

LATTICEMIND_RESCU_CMD (or RESCU_CMD / RESCU_EXECUTABLE)

RESCU launch command (default: rescu on PATH).

LATTICEMIND_NANODCAL_CMD

NanoDCAL launch command.

LATTICEMIND_NANODCAL_DATA_PATH (or NANODCAL_DATA_PATH)

Extracted NeutralAtomDatabase root. LatticeMind searches it recursively for the *.nad or *.mat files required by the requested elements.

LATTICEMIND_VASP_CMD

VASP launch command (e.g. vasp_std).

LATTICEMIND_LICENSE_FILE (or LATTICEMIND_LICENSE_PATH)

Exact LatticeMind license file used at startup. If unset, LatticeMind expects exactly one *.lic or *.license file under ~/.nanoacademic/LATTICEMIND. This is LatticeMind’s own license, not a RESCU one, and the check applies to every solver selection.

LATTICEMIND_PSEUDO_ROOT (or RESCU_PSEUDO)

Pseudopotential database folder (containing nano_tm_lda/ and nano_tm_pbe/). The wheel ships a runtime bundle, so this is optional.

VASP_PP_PATH

VASP POTCAR library directory.

LATTICEMIND_RESCU_SERIAL_ONLY_CALC_TYPES

Comma-separated calc types forced to run serially (default covers dfpt-phonon-bs, dfpt-phonon-dos, dfpt-optic, dfpt-raman).

The classic dashboard (/classic) keeps its own choices in ~/.latticemind/dashboard_settings.json; a research conversation does not read that file.

1.7. Parallel execution

Control local and remote parallel launches for latticemind quick (also set from the classic dashboard’s settings), mapped to Slurm resources for remote jobs. In a conversation, the thread count is set on the browser setup card or with latticemind research chat --solver-threads.

Variable

Purpose

LATTICEMIND_PARALLEL_ENABLED

1 to enable parallel execution.

LATTICEMIND_PARALLEL_LAUNCHER

none | mpirun | mpiexec | srun | custom | profile.

LATTICEMIND_PARALLEL_CUSTOM_LAUNCHER

Custom launcher prefix, e.g. jsrun -n 4.

LATTICEMIND_MPI_RANKS

MPI rank count (also Slurm --ntasks).

LATTICEMIND_THREADS_PER_RANK

OpenMP/BLAS threads per rank (also Slurm --cpus-per-task).

LATTICEMIND_VASP_KPAR / LATTICEMIND_VASP_NCORE / LATTICEMIND_VASP_NPAR

Optional VASP INCAR parallelization overrides.

1.8. Remote / HPC execution

Remote targets are defined in ~/.latticemind/remote_profiles.toml (see Step 2 — Describe the target). In a conversation, /remote chooses one. These variables select and describe the target for latticemind quick:

Variable

Purpose

LATTICEMIND_EXECUTION_BACKEND

local | remote | slurm.

LATTICEMIND_REMOTE_PROFILE

Default remote profile name.

LATTICEMIND_REMOTE_PROFILE_<SOLVER>

Per-solver remote profile override (e.g. LATTICEMIND_REMOTE_PROFILE_NANODCAL).

LATTICEMIND_REMOTE_SCHEDULER

direct | slurm.

LATTICEMIND_RESCU_PLOT

Set 0 to disable RESCU’s built-in plotter (rescu -p) for this session; Python post-processing still generates every figure. Use on machines without a MATLAB Java runtime (JVM). /rescu-plotting off saves the same choice permanently with your settings.

LATTICEMIND_RUNTIME_PROFILE

Named runtime/deployment profile.

LATTICEMIND_SYSTEM_DESCRIPTION / LATTICEMIND_ENVIRONMENT_NOTES

Advisory deployment context used when planning run scripts and reports.

LATTICEMIND_OPERATOR_PROMPT_FILE

File of advisory operator instructions (deployment context only).

1.9. Documentation retrieval

The RESCU documentation is built in and works offline — no configuration required. Optional overrides:

Variable

Purpose

RESCU_DOCS_DIR

Read the RESCU docs from a different local folder.

RESCU_RAG_BACKEND

Set to openai to retrieve from your own OpenAI vector store instead of the built-in docs.

OPENAI_VECTOR_STORE_ID

Your vector store ID (vs_…) when RESCU_RAG_BACKEND=openai.

1.10. Structure sourcing

Variable

Purpose

MATERIALS_PROJECT_API_KEY

Enables seeding structures from the Materials Project database.

1.11. A complete .env example

# --- AI provider ---
RESCU_LLM_PROVIDER=openai
OPENAI_API_KEY=your_key_here
LATTICEMIND_OPENAI_MODEL=gpt-5.6-sol

# --- Optional: a fixed project folder for automation ---
# LATTICEMIND_ARTIFACTS_DIR=/data/latticemind_outputs

Continue in the same .env file with the license and solver paths:

# --- LatticeMind license ---
LATTICEMIND_LICENSE_FILE=/opt/licenses/latticemind.lic

# --- RESCU solver ---
LATTICEMIND_RESCU_CMD=/opt/esapp/rescu

# --- NanoDCAL solver (when selected) ---
LATTICEMIND_NANODCAL_CMD=/opt/nanodcal/bin/nanodcal
LATTICEMIND_NANODCAL_DATA_PATH=/opt/nanodcal/NeutralAtomDatabase

# --- Optional: Materials Project structure sourcing ---
MATERIALS_PROJECT_API_KEY=your_key_here