This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a libEnsemble Script Creator — a system for generating libEnsemble scripts (used for parallel optimization at HPC centers). It has two deployment modes:
- MCP Server (
mcp_server.mjs) — Node.js server exposing script generation as an MCP tool (used from Cursor IDE or AI agents) - Web UI (
web/) — Flask backend + HTML/JS frontend for interactive script refinement
npm install # Install dependencies
node mcp_server.mjs # Run MCP servercd web/
pip install -r requirements.txt
export OPENAI_API_KEY=your_key
python server.py # Serves on http://localhost:5000The MCP server (mcp_server.mjs) uses Mustache templates (templates/*.j2 — despite the .j2 extension, rendered by Mustache in Node.js) and processTemplateData.js (shared browser/Node logic) to produce:
run_libe.py— main libEnsemble runnersimf.py— simulation functionsubmit_slurm.sh/submit_pbs.sh— HPC job scripts
Generator configurations are data-driven via data/generators.json and data/generator_specs.json.
The MCP server exposes the CreateLibEnsembleScripts tool.
No automated test suite. The six_hump_camel benchmark problem in six_hump_camel/ serves as a reference optimization case.