ESP Surface Analysis
Use this skill to discover local wavefunction/structure files, run Multiwfn when needed, and render ESP-colored molecular surface figures with VMD or ChimeraX.
Quick Start
For a user request containing --ESP, run:
bashpython3 scripts/esp_pipeline.py --ESP --workdir <user-project-dir> --execute
Use --input <file> when the user names a wavefunction/cube file. Use --search-root <dir> repeatedly when the user wants files found outside the current project.
Workflow
- Read
references/esp-workflow.mdbefore running an analysis. - Run
scripts/esp_pipeline.py --ESP --workdir ...without--executeif you need to inspect the selected files and tools first. - Run again with
--executeonce the selected inputs are plausible. - If Multiwfn fails, read
references/multiwfn-recipes.md, inspect the generatedmultiwfn_*.inpand logs, then patch or rerun with--recipe <file>. - If rendering fails, read
references/visualization.md, inspect the generated.cxcor.tcl, and rerun with--renderer chimeraxor--renderer vmd. - Return the rendered image path, manifest path, exact commands used, and any scientific caveats.
Tool Selection
Prefer this order:
- Existing ESP and density cube files: render directly.
- Wavefunction file plus Multiwfn: generate cube files, then render.
- ChimeraX renderer: prefer for robust offscreen PNG output and large molecular systems.
- VMD renderer: prefer when ChimeraX is unavailable or VMD cube styling is requested.
Do not claim that an ESP figure was generated unless manifest.json shows a rendered image file that exists and passes the script QA checks.
Output Contract
The pipeline writes an output folder containing:
manifest.jsonwith selected files, discovered tools, commands, warnings, and outputs.multiwfn_*.inpandmultiwfn_*.logwhen Multiwfn is used.render_chimerax.cxcorrender_vmd.tclwhen rendering is prepared.- A rendered image when rendering succeeds, usually PNG from ChimeraX or TGA from VMD.
If a dependency is missing, report exactly what was discovered and which file or program is needed next.


