Live PyProcar Electronic Structure Agent

Direct interactive session with the PyProcar AI Agent and Virtual Corresponding Author.

β†— Open Full Screen
⏳ First-Time Load Note: The computational backend is hosted on a serverless container environment that scales to zero when idle. If the app has not been accessed recently, please allow 15–25 seconds for the container to "warm up" and initialize on first load.

Reimagining PyProcar as an Autonomous AI Agent

A Paper2Agent Demonstration & Implementation Guide for Prof. Aldo H. Romero

Institution: West Virginia University β€” Department of Physics & Astronomy / Research Computing

Contributor: Mike Snodgrass, AI Specialist @ Google

Live Interactive Prototype: https://pyprocar-agent-33007372238.us-central1.run.app

⏳ Note: As a serverless deployment that scales to zero when idle, the instance requires a 15–20 second "warm up" period on first launch.

1. Executive Summary

On September 16, 2026, researchers from Stanford University (Jiacheng Miao, James Zou et al.) published a landmark framework in Nature:

"Reimagining research papers as interactive and reliable AI agents" (Nature, doi:10.1038/s41586-026-11044-y).

The paper argues that the traditional scientific publicationβ€”a static PDF artifactβ€”creates severe friction for dissemination, reuse, and reproducibility. The authors introduced Paper2Agent, an automated methodology that converts a scientific paper, its code, and its datasets into an interactive AI agent powered by a Model Context Protocol (MCP) server.

To demonstrate how this applies to computational condensed matter physics, we selected Prof. Aldo H. Romero's flagship software publication:

"PyProcar: A Python library for electronic structure pre/post-processing"
Uthpala Herath, Pedram Tavadze, Xu He, Eric Bousquet, Sobhit Singh, Francisco MuΓ±oz, Aldo H. Romero
Computer Physics Communications 251 (2020) 107080.

Using Google Antigravity, we implemented a complete Paper2Agent prototype and deployed it live as a web application. This document outlines what this prototype proves, how it functions, and the exact 4-step Antigravity prompt template so Dr. Romero and his research group can replicate this for any paper or tool in their laboratory.

2. What the Implementation Proves

Proof 1: Research Moves from "Passive Artifact" to "Active Computational Endpoint"

Proof 2: The "Virtual Corresponding Author" Eliminates Knowledge Bottlenecks

Proof 3: Zero-Code Electronic Structure Analysis (Democratizing Tools)

Proof 4: Permanent Reproducibility and Self-Verification

Proof 5: Interoperability with Autonomous "AI Co-Scientists"

3. The 4-Step Antigravity Recipe: How to Replicate This for Any Paper

This entire prototype was researched, built, tested, and deployed in under 30 minutes using Google Antigravity. Below are the 4 core steps with both the PyProcar prompt and a generalized template you can copy and adapt for your own research:

Step 1: Research Catalog Discovery

Identify software tools, algorithms, or methodologies within a researcher's published catalog.

Example Prompt Used:
"find a recent research paper by aldo romero from WVU."
🎯 Recommended Generalized Template:
"Research the published papers, preprints, and open-source computational tools by [Researcher Name / Lab Name / University or Research Topic]. Summarize their primary software libraries, computational workflows, and key scientific focus areas."

Step 2: Feed the Nature Paper to Antigravity to Pick the Best Candidate

Instruct Antigravity to ingest the live Nature paper on Paper2Agent, evaluate the tools against the paper's criteria, and recommend the best candidate.

Example Prompt Used:
"which of his research papers would be a good candidate to turn into an AI agent based on the idea suggested by this paper: https://www.nature.com/articles/s41586-026-11044-y"
🎯 Recommended Generalized Template:
"Read the Nature paper on Paper2Agent at https://www.nature.com/articles/s41586-026-11044-y. Using the criteria outlined in the paper (accessible open-source codebase, clear computational input/output workflows, high reuse potential, and modular Python APIs), evaluate the computational papers and tools from [Researcher / Lab Name] and identify the best candidate to convert into an interactive Model Context Protocol (MCP) agent. Detail the scientific and practical rationale for your recommendation."

Step 3: Implement the Paper2Agent Prototype (MCP Server + Virtual Author)

Direct Antigravity to scaffold the agent: ground the theoretical knowledge, wrap the Python library into standard MCP tools, and create self-verifying test datasets.

Example Prompt Used:
"go ahead and implement a paper2agent prototype for the PyProcar paper"
🎯 Recommended Generalized Template:
"Implement a complete Paper2Agent prototype for [Selected Paper/Tool Name] following the Nature Paper2Agent paradigm:
1. Virtual Corresponding Author: Construct a structured knowledge base containing the manuscript's citations, core mathematical formulas (in LaTeX), supported input/output formats, and theoretical explanations.
2. Model Context Protocol (MCP) Server: Expose the library's 4–6 primary computational workflows (e.g., data ingestion, calculations, property analyses, and publication-ready plotting) as standard MCP tools over stdio.
3. Reproducibility & Benchmarks: Include canonical benchmark datasets and automated unit tests (using pytest) to verify that calculations reproduce expected physical values."

Step 4: Build an Interactive Web Showcase & Workbench

Wrap the agent into an accessible web application (using Streamlit) so collaborators, students, or reviewers can immediately interact with it without writing code or installing packages.

Example Prompt Used:
"Build an interactive web demo of this prototype to show the researcher."
🎯 Recommended Generalized Template:
"Build an interactive web application (using Streamlit) for this Paper2Agent prototype:
1. Virtual Author Q&A: A natural language chat interface with quick-prompt buttons that answers theoretical questions using LaTeX equations and automatically executes computational tools when appropriate.
2. Interactive Workbench: A visual dashboard allowing users to select benchmark materials/datasets, adjust parameters, compute properties, and inspect generated figures in real time.
3. Manuscript Knowledge Tab: A section displaying the original paper's abstract, full citations, mathematical derivations, and registered MCP tool schemas."

4. Blueprint for Other Papers from Dr. Romero's Lab

Dr. Romero's group can apply this exact 4-prompt blueprint to their other open-source software libraries:

  1. MechElastic: Create an autonomous mechanical screening agent that computes Born stability criteria, directional elastic moduli (Young's, shear, bulk), and Pugh's ductility ratio from elastic stiffness matrices.
  2. PyChemia: Create an autonomous materials design agent executing Firefly crystal structure search algorithms and orchestrating high-throughput DFT calculations.
  3. ParquetDB: Create a high-speed scientific data agent providing conversational query capabilities over large-scale materials databases.

Created with Google Antigravity • Paper2Agent Case Study • September 2026

Model Context Protocol (MCP) Server Architecture

The PyProcar agent implements the standard Model Context Protocol over stdio (pyprocar_agent.server), exposing 8 standard tool endpoints:

1. get_paper_metadata() -> Dict[str, Any]
2. query_paper_knowledge(query: str) -> List[Dict[str, Any]]
3. list_benchmark_materials() -> List[Dict[str, str]]
4. calculate_band_gap(material_id: str) -> Dict[str, Any]
5. compute_projected_dos_tool(material_id, energy_min, energy_max, sigma) -> Dict[str, Any]
6. analyze_spin_texture_tool(material_id, band_index) -> Dict[str, Any]
7. plot_band_structure_tool(material_id, orbital_projection, output_path) -> Dict[str, Any]
8. plot_fermi_surface_tool(material_id, output_path) -> Dict[str, Any]

Repository Structure

find_aldo_romero_paper/
β”œβ”€β”€ src/pyprocar_agent/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ paper_knowledge.py      # Virtual Corresponding Author & Theory
β”‚   β”œβ”€β”€ core_tools.py           # Band gap, DOS, spin texture, Fermi surface
β”‚   β”œβ”€β”€ server.py               # FastMCP JSON-RPC server
β”‚   └── cli.py                  # CLI runner and benchmark command
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ test_core_tools.py      # Pytest validation
β”‚   β”œβ”€β”€ test_mcp_server.py      # MCP schema & tool validation
β”‚   └── test_paper_knowledge.py # Knowledge grounding validation
β”œβ”€β”€ app.py                      # Interactive Streamlit application
β”œβ”€β”€ paper2agent_guide.html      # Comprehensive demonstration guide
β”œβ”€β”€ Dockerfile                  # Container definition
└── README.md                   # Hugging Face Space documentation
πŸ’» Official PyProcar GitHub πŸ“– PyProcar Paper (CPC 2020)