general-presentation
learningmatter-mit/AtomisticSkills/.agents/skills/general-presentation/SKILL.md
Generate and iteratively refine PowerPoint presentations from simulation results using python-pptx.
Skill172 starsChanged 4 months ago
What's in it
- Presentation Generation
- Goal
- Instructions
- 1. Import the Helper Library
- 2. Build Slides Using Helper Functions
- 3. Customize the Theme (Optional)
- 4. Save and Iterate Visually
- Examples
- Constraints
---
name: general-presentation
description: Generate and iteratively refine PowerPoint presentations from simulation results using python-pptx.
category: [general]
---
# Presentation Generation
## Goal
Create professional PowerPoint presentations from simulation results (plots, tables, parameters) using `python-pptx`. The agent writes standalone Python scripts using a helper library, enabling direct iteration with the user on the script to refine slides.
## Instructions
### 1. Import the Helper Library
All scripts should import `slide_utils` from this skill:
```python
# Env: base-agent
import sys
sys.path.insert(0, ".agents/skills/general-presentation/scripts")
from slide_utils import *
```
### 2. Build Slides Using Helper Functions
Available functions:
| Function | Purpose |
|---|---|
| `create_presentation(title, subtitle, author)` | Create a new presentation with a styled title slide |
| `add_title_slide(prs, title, subtitle)` | Additional title/divider slides |
| `add_section_slide(prs, title)` | Section divider (colored background) |
| `add_image_slide(prs, title, image_path, caption, notes)` | Single image/plot slide |
| `add_two_image_slide(prs, title, left_img, right_img, ...)` | Side-by-side images |
| `add_image_and_text_slide(prs, title, image_path, text, ...)` | Image + text layout |
| `add_table_slide(prs, title, headers, rows)` | Data table slide |
| `add_bullets_slide(prs, title, bullets)` | Bullet point slide |
| `add_autofit_box(slide, left, top, height, text, bg_color)` | Add a colored box that auto-scales width to text |
| `save_presentation(prs, path)` | Save to `.pptx` file |
Every builder function returns the `Slide` (or Shape) object, allowing further customization with raw `python-pptx` calls if needed.
### 3. Customize the Theme (Optional)
Override the `THEME` dictionary before building slides:
```python
from slide_utils import *
THEME["primary"] = RGBColor(0x00, 0x50, 0x80)
THEME["font_family"] = "Arial"
```
### 4. Save and Iterate Visually
```python
save_presentation(prs, "output.pptx")
```
The agent edits the Python script and re-runs to reflect changes.
**CRITICAL ITERATION LOOP**: The agent **MUST** visually inspect the generated slides using their VLM capabilities to ensure elements do not overlap, text fits perfectly within boxes, and the slide space is used efficiently with a universal, professional design style.
To preview a slide as an image for visual inspection:
```bash
# Render PPTX to PDF using LibreOffice, then to PNG
libreoffice --headless --convert-to pdf output.pptx --outdir .
pdftocairo -png output.pdf output
# This generates output-1.png, which you can visually inspect.
```
## Examples
Generating a simulation report:
```python
# Env: base-agent
import sys
sys.path.insert(0, ".agents/skills/general-presentation/scripts")
from slide_utils import *
prs = create_presentation("LiFePO4 Stability", "MACE-MP Results", "Research Agent")
add_image_slide(prs, "Phonon DOS", "phonon_dos.png", caption="No imaginary modes observed")
add_table_slide(prs, "Parameters", ["Param", "Value"], [["Model", "MACE-MP"], ["fmax", "0.02 eV/A"]])
add_bullets_slide(prs, "Conclusions", ["Dynamically stable", "E_hull = 0 meV/atom"])
save_presentation(prs, "LiFePO4_report.pptx")
```
See [amorphorization example](examples/amorphorization/) for a complete runnable example with structure images, tables, and RDF plots.
## Constraints
- **Environment**: Scripts require `base-agent` with `python-pptx` installed.
- **Image formats**: PNG, JPG, BMP, GIF, TIFF supported.
- **Slide dimensions**: Default 16:9 (13.333 × 7.5 inches). Override via `THEME["width"]` / `THEME["height"]`.
- **Tables**: Large tables (>15 rows) may overflow the slide — split across multiple slides.
---
**Author:** Bowen Deng
**Contact:** [GitHub @learningmatter-mit](https://github.com/learningmatter-mit)
More agent context in learningmatter-mit/AtomisticSkills
133 other files this repository gives its agents, the first 60 shown.
AGENTS.md
CLAUDE.md
Skill
- chem-bond-dissociation.agents/skills/chem-bond-dissociation/SKILL.md
- chem-conformer-search.agents/skills/chem-conformer-search/SKILL.md
- chem-db-mof.agents/skills/chem-db-mof/SKILL.md
- chem-db-qmof.agents/skills/chem-db-qmof/SKILL.md
- chem-db-spectra.agents/skills/chem-db-spectra/SKILL.md
- chem-dft-orca-advanced-calculation.agents/skills/chem-dft-orca-advanced-calculation/SKILL.md
- chem-dft-orca-optimization.agents/skills/chem-dft-orca-optimization/SKILL.md
- chem-dft-orca-singlepoint.agents/skills/chem-dft-orca-singlepoint/SKILL.md
- chem-docking-void.agents/skills/chem-docking-void/SKILL.md
- chem-hazard-toxicity.agents/skills/chem-hazard-toxicity/SKILL.md
- chem-irc-verification.agents/skills/chem-irc-verification/SKILL.md
- chem-msms-predict.agents/skills/chem-msms-predict/SKILL.md
- chem-neb-barrier.agents/skills/chem-neb-barrier/SKILL.md
- chem-nmr-analysis.agents/skills/chem-nmr-analysis/SKILL.md
- chem-nmr-predict.agents/skills/chem-nmr-predict/SKILL.md
- chem-react-ot.agents/skills/chem-react-ot/SKILL.md
- chem-similarity-search.agents/skills/chem-similarity-search/SKILL.md
- chem-solution-md.agents/skills/chem-solution-md/SKILL.md
- chem-sorption-gcmc.agents/skills/chem-sorption-gcmc/SKILL.md
- chem-sorption-relax.agents/skills/chem-sorption-relax/SKILL.md
- chem-sorption-widom.agents/skills/chem-sorption-widom/SKILL.md
- chem-spectrum-matcher.agents/skills/chem-spectrum-matcher/SKILL.md
- chem-thermochemistry.agents/skills/chem-thermochemistry/SKILL.md
- chem-ts-optimization.agents/skills/chem-ts-optimization/SKILL.md
- chem-vibration.agents/skills/chem-vibration/SKILL.md
- drug-admet-prediction.agents/skills/drug-admet-prediction/SKILL.md
- drug-binding-site-definition.agents/skills/drug-binding-site-definition/SKILL.md
- drug-bioactivity-assay.agents/skills/drug-bioactivity-assay/SKILL.md
- drug-complex-system-builder.agents/skills/drug-complex-system-builder/SKILL.md
- drug-db-chembl.agents/skills/drug-db-chembl/SKILL.md
- drug-db-pdb.agents/skills/drug-db-pdb/SKILL.md
- drug-db-pubchem.agents/skills/drug-db-pubchem/SKILL.md
- drug-docking-analysis.agents/skills/drug-docking-analysis/SKILL.md
- drug-docking-vina.agents/skills/drug-docking-vina/SKILL.md
- drug-ligand-prep.agents/skills/drug-ligand-prep/SKILL.md
- drug-mmpbsa-gbsa.agents/skills/drug-mmpbsa-gbsa/SKILL.md
- drug-molecular-fingerprints.agents/skills/drug-molecular-fingerprints/SKILL.md
- drug-pocket-detection.agents/skills/drug-pocket-detection/SKILL.md
- drug-pose-validation.agents/skills/drug-pose-validation/SKILL.md
- drug-protein-ligand-md.agents/skills/drug-protein-ligand-md/SKILL.md
- drug-protein-prep.agents/skills/drug-protein-prep/SKILL.md
- drug-redocking-rmsd.agents/skills/drug-redocking-rmsd/SKILL.md
- drug-retrosynthesis.agents/skills/drug-retrosynthesis/SKILL.md
- drug-trajectory-analysis.agents/skills/drug-trajectory-analysis/SKILL.md
- general-arxiv-search.agents/skills/general-arxiv-search/SKILL.md
- general-biorxiv-search.agents/skills/general-biorxiv-search/SKILL.md
- general-chemical-literature.agents/skills/general-chemical-literature/SKILL.md
- general-chemical-pricing.agents/skills/general-chemical-pricing/SKILL.md
- general-deep-research.agents/skills/general-deep-research/SKILL.md
- general-fair-data-review.agents/skills/general-fair-data-review/SKILL.md
- general-patent-search.agents/skills/general-patent-search/SKILL.md
- general-peer-review.agents/skills/general-peer-review/SKILL.md
- general-plot-digitizer.agents/skills/general-plot-digitizer/SKILL.md
- general-property-units.agents/skills/general-property-units/SKILL.md
- general-query-literature-database.agents/skills/general-query-literature-database/SKILL.md
- general-workflow-planner.agents/skills/general-workflow-planner/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

