Skip to content
 
 

Repository files navigation

Pretty Lattice

Pretty Lattice is a crystal visualization tool for creating beautiful, publication-ready figures.

Build status PyPI Python 3.12+ License: MIT

English | 简体中文

  • Pretty: tasteful defaults for colors, materials, lighting, and depth
  • Simple: an intuitive browser GUI for loading, viewing, and exporting structures
  • Reliable: structure parsing and analysis powered by the mature pymatgen package
  • Scalable: smooth interaction with systems up to 10k atoms
  • Customizable: tune colors, radii, materials, opacity, orientation, and export settings

Pretty Lattice interface preview

Why

I always find it harder than it should be to make a good-looking crystal figure.

Traditional crystallographic tools such as VESTA are powerful, but their visual defaults often feel outdated: harsh color palettes, low-quality 3D shading, and a lot of manual tweaking before the result looks acceptable. You could import the structure into professional 3D software such as Cinema 4D or Blender, but that feels like overkill and comes with a much steeper learning curve.

Pretty Lattice is my attempt to fill that gap. Built on Three.js, it stays (relatively) lightweight without compromising visual quality. It offers a modern, intuitive interface with familiar controls researchers expect, and produces clean, aesthetically pleasing figures out of the box.

Install

pip install pretty-lattice

Or install as an isolated tool with uv:

uv tool install pretty-lattice

Requirements:

  • Python 3.12+
  • macOS, Linux, or Windows
  • Any modern browser

Quick start

After installation, start the local GUI:

prl gui

Pretty Lattice starts a local server and opens your browser automatically.

Run once without installing:

uvx --from pretty-lattice prl gui

Useful launch options:

prl gui --no-open     # start the server without opening a browser
prl gui -p 0          # choose any available port automatically

Examples

Material presets

SrTiO3 material preset examples

Color scheme presets

Ba2Ca2Cu3HgO8 color scheme examples

License

Pretty Lattice is released under the MIT License.

About

A crystal visualization tool for creating pretty figures. Demo ⬇️

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages