Skip to main content Switch to mobile version cavitas 0.3.1 Periodic cavity detection and deterministic rigid-guest insertion
pip install cavitas Copy PIP instructions
Cavitas is a viewer and geometry toolkit for periodic materials and their molecular-dynamics runs. It opens crystal structures and trajectories, plays runs of up to a million atoms, puts structures side by side on one playhead with linked cameras, and finds the empty cavities of porous frameworks such as metal–organic frameworks.
The same viewer comes in three forms, built from one source:
What a structure looks like, how a run plays and what a setting means is the same in all three, because the app and the Python package both draw with the web component.
CIF (with symmetry), mmCIF, POSCAR/CONTCAR, XDATCAR, XYZ and extended XYZ, PDB, LAMMPS data and dump, XTC and DCD with their topology, and anything else pymatgen or ASE reads from Python.
The app is the viewer's Workspace in a window: files open in tabs, tabs drag into columns and rows, and one playhead and one camera can be shared across them, each link switchable. Rust reads the files and builds their scenes; no Python, notebook kernel or local server is involved.
Build it from a checkout, with Node, pnpm, stable Rust and the platform's Tauri prerequisites:
cd web pnpm install --frozen-lockfile pnpm desktop:build --bundles app How to use it: docs/desktop.md.
What it must do: spec/desktop/app.md, spec/desktop/workspace.md, spec/desktop/readers.md.
pip install "cavitas[viewer,widget]" Python 3.11 or 3.12. From a checkout: pip install -e ".[viewer,widget]".
import cavitas view = cavitas.View("framework.cif") # a structure, with its cavities run = cavitas.View(cavitas.Trajectory.read("run.extxyz"), fps=12) # an MD run, read as it plays cavitas.Split(view, run) # side by side, one playhead, linked cameras In a notebook the last line draws the viewer inline: classic Jupyter, JupyterLab, VS Code and Colab. There is no notebook extension to install, because the viewer is one self-contained page shipped inside the package. From a script, view.show() opens a browser, or serves the page when there is no display; from a cluster, cavitas show framework.cif prints the SSH tunnel to type on your own machine.
The package also exports what it shows:
And it holds the cavity engine on its own:
from ase.io import read from cavitas import cavity space = cavity.from_ase(read("host.extxyz")) found = space.cavities(probe=1.26) found.table # one row per cavity: label, class, volume, widest point Start here: docs/quickstart.md, then the topic guides in docs/; cavities in docs/cavities.md and docs/cavity-component.md.
Every keyword of cavitas.View: docs/python-keywords.md.
What it must do: spec/library/components.md, spec/reach/notebook-transport.md, spec/library/static-export.md, spec/rendering/cavities.md.
The viewer is published as three packages:
How to use it: docs/library.md.
What it must do: spec/library/packages.md, spec/library/element.md, spec/library/mount.md, spec/library/react.md, spec/library/source.md.
An agent in a shell can read what a person has open, in the app, a notebook or a served page, set the view, select atoms for them, hear the atoms they click and take exact pictures, with the cavitas command:
cavitas viewing # every open view: title, frame, camera, selection cavitas set --frame 0 --option stick_radius=0.2 cavitas shot --size 800x600 -o view.png An agent starts at AGENTS.md and skill/llms.txt; the commands are in docs/agent.md and the protocol in spec/agent/channel.md.
They stand on one core of readers, bonds, radii and atom identity, written in Python and in Rust (rust/). The viewer is TypeScript and WebGL/WebGPU (web/).
Every behaviour is written down as the user asked for it, one topic a file, in spec/: the demand in the user's words, what a person sees, the designs that were rejected, and the tests that hold it. Code follows the spec. The main sets:
Released: Dec 1, 2026
Both files in this release have provenance metadata.
View provenance details
MIT View SPDX License List
Python <3.13, >=3.11
viewer widget figures test volume md export native
molecular dynamics trajectory viewer crystal structure periodic structures materials science computational chemistry visualization jupyter notebook webgl cif poscar xdatcar extxyz vasp ase pymatgen metal-organic frameworks porous materials cavity detection host-guest ai agents
Development Status 3 - Alpha
Jupyter :: JupyterLab
Intended Audience Science/Research
Operating System OS Independent
Programming Language JavaScript
Topic Scientific/Engineering :: Chemistry
Scientific/Engineering :: Physics
Scientific/Engineering :: Visualization
Release files for cavitas 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 5.2 MB
Release files / cavitas-0.3.1.tar.gz
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 Dec 1, 2026.
Release files / cavitas-0.3.1-py3-none-any.whl
Security for cavitas 0.3.1
Both files in this release have been uploaded with provenance metadata.
With provenance cavitas-0.3.1.tar.gz Dec 1, 2026
With provenance cavitas-0.3.1-py3-none-any.whl Dec 1, 2026
Attestation for cavitas-0.3.1.tar.gz
Attestation for cavitas-0.3.1-py3-none-any.whl
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
Dec 1, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from a8e35ed











