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 baked into LatticeMind.

  2. Config file~/.latticemind/config.json (or a file named by LATTICEMIND_CONFIG_FILE) and the Web UI’s ~/.latticemind/dashboard_settings.json.

  3. The .env file in the folder you launch from.

  4. Environment variables.

  5. Interactive commands (/rescu, /compute, /language, …) and latticemind-web flags, for the current session.

Tip

The Web UI persists your choices to ~/.latticemind/dashboard_settings.json automatically. 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.

OPENAI_API_KEY

OpenAI API key.

OPENAI_MODEL_QUICK / OPENAI_MODEL_THOROUGH

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

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

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

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

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

Root folder for projects and outputs (default ./latticemind_outputs). Point at persistent storage on shared machines and cloud.

LATTICEMIND_SUBDIR

1 (default) creates a project subdirectory under the root 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; the Web UI’s Project subdirectory checkbox is the same setting.

RESCU_REPORT_FORMAT

html (default) or off to disable report generation.

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

Atomic cache written by version_check.py. A successful index result is reused for 24 hours; an unavailable-index result is reused for one hour. When LATTICEMIND_CONFIG_FILE names another config file, this cache is written beside that file.

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

Which interface to start in: cli (the default), dashboard for the terminal dashboard, or web for the Web UI in your browser. These are two different screens (see The three interfaces). Inside a session, /dashboard on and /dashboard off toggle the terminal dashboard.

1.6. Solver commands, license & pseudopotentials

LatticeMind stores one launch command per solver. The Web UI persists these to ~/.latticemind/dashboard_settings.json under solver_commands; 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 corresponding dashboard_settings.json shape:

{
  "solver": "rescu",
  "solver_commands": {
    "rescu": "/opt/esapp/rescu",
    "vasp": "vasp_std",
    "nanodcal": "/opt/nanodcal/bin/nanodcal"
  }
}

1.7. Parallel execution

Control local and remote parallel launches (also set from the Web UI Settings panel), and mapped to Slurm resources for remote jobs.

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). These variables select and describe the active target:

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 an 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
OPENAI_MODEL_QUICK=gpt-5.4-mini
OPENAI_MODEL_THOROUGH=gpt-5.4

# --- Output & reports ---
LATTICEMIND_ARTIFACTS_DIR=/data/latticemind_outputs
LATTICEMIND_SUBDIR=1
RESCU_REPORT_FORMAT=html

# --- 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