Skip to main content

Crystal structure visualization and Materials Project search tool

Project description

CeraViz

Crystal structure visualization and Materials Project search tool.

Render 3D crystal structures from the Materials Project database with PyVista, complete with CrystalNN bond detection, split-bond coloring, and interactive atom inspection.

Features

  • 3D crystal visualization with atoms, bonds, and unit cell wireframe
  • CrystalNN bond detection with split-bond coloring per element
  • Jmol/CPK color scheme for all elements
  • Interactive CLI search across the Materials Project database
  • Supercell expansion (arbitrary nx×ny×nz)
  • Click-to-inspect atom info (element, coordinates, oxidation state)

Installation

pip install ceraviz

For Jupyter notebook support:

pip install ceraviz[jupyter]

Setup

You need a free Materials Project API key:

  1. Sign up at materialsproject.org
  2. Set the environment variable:
export MP_API_KEY="your_api_key_here"

Quick Start

Python API

from ceraviz import render_material

# Render a crystal structure by Materials Project ID
render_material("mp-1234")

# With supercell expansion
render_material("mp-1234", supercell=(2, 2, 2))

CLI Search

ceraviz

This launches an interactive CLI where you can:

  1. Search by elements (e.g., Li,Fe)
  2. Search by chemical system (e.g., Li-Fe)
  3. Search with wildcards (e.g., Li-Fe-*-*)
  4. Search by exact formula (e.g., Li3Fe)
  5. View any result as a 3D crystal structure

Dependencies

  • pymatgen — crystal structure analysis
  • PyVista — 3D visualization
  • mp-api — Materials Project API client
  • Rich — CLI formatting

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ceraviz-0.1.1.tar.gz (18.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ceraviz-0.1.1-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file ceraviz-0.1.1.tar.gz.

File metadata

  • Download URL: ceraviz-0.1.1.tar.gz
  • Upload date:
  • Size: 18.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ceraviz-0.1.1.tar.gz
Algorithm Hash digest
SHA256 66eb52f4535f413e03a82ba6bac46c1e2cedb8cd64d844c7c050950ad17bedd3
MD5 17e91766668a1a8287288ca05b8843c3
BLAKE2b-256 99732beea036e7e6300e17f50ff62c5a63ac9571ca8504947e960088a4603307

See more details on using hashes here.

File details

Details for the file ceraviz-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ceraviz-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ceraviz-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce9abed6e7e237f9007790c361f0e983ffa04f53a6c01a8928d10d210c4bd5ab
MD5 f35c062ec4b25eba0483a89d4e325621
BLAKE2b-256 9cfd4f4cc6b18de47bde11da7fccb186c50d9ce262f8aca2d4b7d5be0d300fe4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page