Skip to main content

Atomaestro: Atomistic Structure Visualization and Scientific Workbench

License: MIT Python Version PyPI CI

Package migration: The GitHub project is Atomaestro (formerly MatterVis). The command stays mat-vis, and Python imports stay mat_viewer. For the renamed release, see atomaestro on PyPI. Do not install both full distributions in one environment. Details: migration guide and issue #316.

Overview

Atomaestro (formerly MatterVis) is a Python toolkit for deterministic, publication-quality atomistic structure visualization and scientific analysis. Its lightweight core renders PNG/PDF/SVG on the CPU; Plotly, Dash/Web APIs, Textual, Cube isosurfaces, and animation encoders are optional frontends. The broader roadmap includes integrated structure modeling, multi-structure scene composition, and agent-driven scientific workflows.

Scenes and scientific revisions

A Scene is an interactive view slot: camera, Display and selection. A scientific revision is an immutable structure plus operation/provenance and checks, owned by the workflow. Closing a Scene does not delete scientific evidence; opening a Scene does not create a new scientific revision. Undo restores a view, not its historical revision binding.

Workflows may opt into the small in-memory Structure Catalog API to retain inputs and derived snapshots independently of open Scenes. It adds no panel or canvas and no automatic persistence. Existing external revision stores can use the revision/write APIs directly without adopting the catalog.

Key Features

  • ASCII-first chemistry TUI — A non-visual model can rotate the projected structure, select stable atom IDs, traverse bonds, and read MolCrysKit names, line notation, CIP descriptors, crystal enantiomer composition, warnings, and evidence without treating JSON as the primary observation
  • Stateful agent sessions — Python and JSONL callers can choose each next semantic camera or selection action from the latest deterministic Unicode or ASCII-7 observation without driving a browser or PTY
  • Agent-ready CLI — Six explicit subcommands (inspect, capabilities, skills, render, serve, tui) separate bounded diagnosis, skill discovery, dependency preflight, browser-free static output, Web service, and terminal interaction
  • Bundled Agent Skills — mat-vis skills list|show|tree exposes progressive, read-only access to the shipped skill entrypoints and references
  • Browser Viewer — Drag-and-drop CIF upload and interactive 3D display with Mesh3d atoms and bonds. Scatter3d fast rendering is used only when explicitly selected; atom count never changes the representation
  • Coordination Topology — Automatic coordination-number detection via the nearest-neighbour gap, continuous shape measure (CShM) classification against 12 ideal polyhedra (CN 4–12), planarity RMS, and prism/antiprism twist analysis
  • Publication Export — The base CPU backend renders PNG with per-pixel depth handling and emits true-vector PDF/SVG from the same backend-neutral geometry. Cube journal figures use that CPU export: Taubin-smoothed isosurfaces at stride 1. build_cube_figure is a raw marching-cubes preview, not that publication mesh
  • Multi-Panel Figures — uniform_viewport(scenes) stamps a shared world-cube on any list of scenes so every build_figure call emits at the same physical length per pixel
  • Composable 3-D geometry: validated Cartesian meshes, lattice/HKL-aligned through-cylinders, and bounded implicit surfaces use the depth-tested Mesh3d path.
  • Automation API — REST + WebSocket endpoints on the same Flask server; drive the viewer from notebooks, agents, or subprocesses
  • Zero Catalog Required — Ships with a bundled DAP-4.cif so mat-vis serve works out of the box


Caffeine disorder with occupancy drawn as opacity on atoms and bonds, DAP-7 with one highlighted A and one highlighted B perchlorate hull, and a mock nitrate displacement on PETN.

Installation

The command is mat-vis. Imports remain mat_viewer. This repository's distribution name is atomaestro. See the migration guide.

From PyPI

For the renamed release, use a new environment or uninstall the legacy matter-vis package first:

python -m pip uninstall -y matter-vis
python -m pip install atomaestro

The old distribution owns the same mat_viewer package and mat-vis script. Do not install both in one environment. Upgrading matter-vis does not migrate to the new package.

From source (development)

git clone https://github.com/SchrodingersCattt/Atomaestro.git
cd Atomaestro
pip install -e .

All dependencies are declared in pyproject.toml; requires-python = ">=3.10". Install only the frontend the requested output needs:

Extra Adds
base CPU 3D and Matplotlib 2D PNG/PDF/SVG, inspection, ORTEP, rings, and polyhedra
[plotly] Interactive Plotly/WebGL HTML
[plotly-export] Plotly + Kaleido static export
[web] Dash, REST, WebSocket, compression, and Plotly
[tui] Textual terminal UI
[cube] Cube input inspection and isosurfaces
[vtk] PyVista offscreen cube figures
[animation] GIF/MP4 encoders
[all] Every optional frontend
[test] Test tools

Browser screenshots and the Web UI's default static export combine [web] with [plotly-export]. Ask the resolver for the exact combined command:

mat-vis capabilities --require web-screenshot --json
mat-vis capabilities --require static-web-export --json

MolCrysKit is required and is the only chemistry structure source. Atomaestro does not fall back to private MolCrysKit fields or local chemistry heuristics. Extended versus molecular presentation comes from MolecularCrystal.get_connectivity_report(). Ball-and-stick strokes both covalent and coordination edges from BondRecord.role; ball and space-filling do not draw those sticks. This checkout requires molcrys-kit[desktop]>=0.9.0,<0.10.0 for that contract.

Quick Start

CLI — one-liner from CIF to figure

The command is mat-vis. Render a crystal structure:

# Primary terminal observation and chemistry inspection
mat-vis tui structure.cif
# Large molecular cells start with a readable molecule/framework overview;
# force an atom-level view when a local geometry needs every site
mat-vis tui structure.cif --no-interaction --level atom

# Stateful online agent session (one JSON action per stdin line)
printf '%s\n' '{"action":"observe"}' '{"action":"close"}' | \
  mat-vis tui structure.cif --session-format jsonl --charset ascii7

# PNG with default ball-and-stick style
mat-vis inspect structure.cif --json
mat-vis render structure.cif -o figure.png --backend cpu --check --json
mat-vis render structure.cif -o figure.png --backend cpu --json

# CPU-only surface preset. metal and glass are rejected. Plotly and GPU reject non-matte presets.
mat-vis render structure.cif -o plastic.png --backend cpu \
  --surface-material hard_plastic --renderer general

# Optional native offscreen GPU PNG (explicit; no CPU fallback).
# Published extra today:
python -m pip install "matter-vis[gpu]==0.0.6"
# This source checkout: python -m pip install -e ".[gpu]"
# Future, only after atomaestro is on PyPI: python -m pip install "atomaestro[gpu]"
mat-vis capabilities --require gpu --json
mat-vis render structure.cif -o figure-gpu.png --backend gpu --json

# True projected 2D ball-and-stick (Matplotlib; no 3D lighting)
mat-vis render structure.cif -o figure-2d.png --backend matplotlib --json \
  --view unit_cell --style ball_stick --camera-axis c --orthogonal

# PDF, full unit cell, ORTEP hatch marks over flat-shaded ellipsoids
mat-vis render structure.cif -o figure.pdf \
  --backend cpu --view unit_cell --style ortep --shading flat \
  --ortep-mode ortep_hatch --missing-adp-policy error

# Interactive HTML for supplementary information
mat-vis render structure.cif -o si_figure.html --backend plotly \
  --show-hydrogen --show-labels

# Launch the interactive browser viewer (Dash 2.18.2 or newer).
# Published extra today:
python -m pip install "matter-vis[web]==0.0.6"
# This source checkout: python -m pip install -e ".[web]"
# Future, only after atomaestro is on PyPI: python -m pip install "atomaestro[web]"
mat-vis serve --cif structure.cif

See docs/cli.md for the full flag reference and common recipes.

Python API — programmatic control

from mat_viewer.agent import load_structure, prepare_render, render
from mat_viewer.render.contracts import RenderSpec, ViewSpec

structure = load_structure("scripts/data/DAP-4.cif")
plan = prepare_render(
    structure,
    view=ViewSpec(display="unit_cell"),
    render_spec=RenderSpec(backend="cpu", width=900, height=720),
)
result = render(plan, output="dap4.svg", backend="cpu")

Command Line Interface

Installing atomaestro provides the mat-vis command. There is no second command. The CLI is self-documenting; use --help at any level to see the exact arguments:

mat-vis --help
mat-vis inspect --help
mat-vis capabilities --help
mat-vis render --help
mat-vis serve --help
mat-vis tui --help
mat-vis skills --help
mat-vis skills list --json
mat-vis skills show visualize-materials --file references/quickstart.md

The main subcommands cover:

  • mat-vis tui ... — ASCII structure observation, deterministic atom selection, and chemistry inspector for non-visual agents
  • mat-vis inspect ... --json — optional bounded structure/source metadata for programmatic callers
  • mat-vis capabilities ... --json — availability and exact install commands
  • mat-vis render ... — render atomistic structures and trajectories from CIF, Cube, VASP, XYZ, ASE, and LAMMPS inputs to PNG/PDF/SVG/HTML/GIF/MP4
  • mat-vis serve ... — launch the interactive Dash browser viewer with drag-and-drop CIF upload, topology analysis, and REST + WebSocket API

Documentation

You are… Start here
Understanding the design Architecture
Using the library API Reference · CLI Reference
AI agent (calling Atomaestro) Caller API Contracts
AI agent (modifying code) AGENTS.md · Developer Notes
Contributing CONTRIBUTING.md
Topology scores Scores Reference

mat_viewer/ — source code · scripts/ — runnable demo scripts · docs/ — full documentation

License

This project is licensed under the MIT License — see the LICENSE file for details.

Metadata

Release files for atomaestro 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for atomaestro 0.0.7
File Size Uploaded Provenance Actions
atomaestro-0.0.7.tar.gz 5.9 MB With provenance Details for atomaestro-0.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for atomaestro 0.0.7
File Interpreter ABI Platform Actions
atomaestro-0.0.7-py3-none-any.whl Python 3 none any Details for atomaestro-0.0.7-py3-none-any.whl

Total release size: 7.1 MB

Release files / atomaestro-0.0.7.tar.gz

Download URL atomaestro-0.0.7.tar.gz
Size 5.9 MB
Tags Source
SHA-256 checksum
How to use checksums
9ea5298c079997f8679caecc7f9fdfdb238121d0181cc9d162d2d5fad6b71b1b
BLAKE2b-256 checksum
How to use checksums
33107ff32bf7e586ea600b2119b045ed5bde1237a64127e275b8a89e34904896
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Release files / atomaestro-0.0.7-py3-none-any.whl

Download URL atomaestro-0.0.7-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c876730e65f88309f8e17b3af622523aa445f86d1f56bd2852520b3640579a13
BLAKE2b-256 checksum
How to use checksums
008231a9d4add760822dfad5b9102294d296904ceb6233a263a63ee3bd1ee810
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

Security for atomaestro 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for atomaestro-0.0.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page