Skip to main content

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.

[!NOTE] By design, Pretty Lattice focuses on visualization. It is not intended to replace mature materials-analysis tools such as VESTA and Materials Studio, and it does not try to provide complex structure editing or analysis workflows. Input files are treated as read-only. The intended workflow is to prepare and analyze structures with more specialized tools, then bring the final structure into Pretty Lattice for viewing, styling, and export.

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

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

Run once without installing:

uvx --from pretty-lattice prl

Useful launch options:

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

prl gui is kept as a compatibility alias for the same GUI launcher.

Examples

Material presets

SrTiO3 material preset examples

Color scheme presets

Ba2Ca2Cu3HgO8 color scheme examples

Contributing

This project is still in an early stage, and the main functionality is not complete yet.

For now, development is maintainer-led, and I’m not accepting pull requests. This helps keep the project direction focused while the core experience is still being shaped.

You’re welcome to fork the project or open issues for bug reports, suggestions, or feedback.

License

Pretty Lattice is released under the MIT License.

Download files

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

Source Distribution

pretty_lattice-0.2.0.tar.gz (11.0 MB view details)

Uploaded Source

Built Distribution

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

pretty_lattice-0.2.0-py3-none-any.whl (10.2 MB view details)

Uploaded Python 3

File details

Details for the file pretty_lattice-0.2.0.tar.gz.

File metadata

  • Download URL: pretty_lattice-0.2.0.tar.gz
  • Upload date:
  • Size: 11.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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 pretty_lattice-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d18f659b199259b245edd2672cbe0e08ede9da665a1fed3ddc8e6b9b990199a5
MD5 0c2819042d6ac5e426f717367fa55032
BLAKE2b-256 cded8cb4e992052f3d02de2770fe837ac79054e3ddba51ea0b7e72501fa8ef52

See more details on using hashes here.

File details

Details for the file pretty_lattice-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pretty_lattice-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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 pretty_lattice-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9489ef6476c7d77f6029a9f445293e5632041fc09de0c43a5da08e62765211c
MD5 12989421516510b2eaf8729b17df2b9b
BLAKE2b-256 c2457488b1fafc55106eba111b9fe42877d2c4433773cefd248308ec21156534

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

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