Skip to main content

CRYSTALLine

A desktop app for building, editing and visualising CRYSTAL structures and their vibrational (phonon) modes — built on CRYSTALClear.

Python 3.9+ PySide6 PyVista Cross-platform GPLv3 license


Features

Structure viewer

  • Interactive 3D view (PyVista/VTK): ball-and-stick atoms, bonds, hydrogen bonds (dashed D–H···A contacts), coordination polyhedra (VESTA-style, shown by default), the unit-cell wireframe and an a/b/c gizmo.
  • One-click view alignment down the a, b or c axis.
  • A rich, dockable Display panel: atom size/opacity, per-element colours, bond radius/tolerance, hydrogen bonds, cell & axes, polyhedra, measurement colours, background colour, projection, an orientation marker and element labels.
  • Crystallographic Info panel, dimensionality-aware: space group(3D) or layer group(2D slabs), point group, lattice parameters, cell volume/area, density and formula — recomputed live as you edit — plus CRYSTAL-computed properties (total energy, band gap, Fermi energy) read from the output.

Geometry & measurements

  • Measure a selection: distance (2 atoms), angle (3), dihedral (4) or a least-squares plane (3+); mark single-atom points.
  • Overlay measurements in 3D and colour them per item or by type default.

Phonons

  • Loads vibrational modes automatically when the CRYSTAL output has them.
  • Animate any mode in place — bonds, polyhedra and hydrogen bonds follow the motion; export the animation as GIF / MP4 / PNG frames with configurable resolution, frame count and frame rate.

Editing

  • Select atoms (click / Ctrl-click), drag them in 3D (periodic images move together), drag a whole selection as one piece, or nudge with the arrow keys.
  • Add, delete, duplicate, translate and re-element atoms — with a visual periodic-table, element picker — and full undo / redo.
  • Cell tools: conventional cell, supercells, boundary completion and editable lattice parameters.

Import / export

  • Open CRYSTAL .out / .gui / .f34 files and .cif** structures.
  • Import atoms from .xyz / .pdb / .cif into the current structure.
  • Save the structure as .gui or .cif (symmetry-reduced).
  • Export the 3D view as an image (PNG/JPEG/TIFF/SVG/PDF/EPS) with resolution and transparency options.

Input builder

  • Write a ready-to-run CRYSTAL .d12 deck for the current structure, with a live preview of the exact input before you save it.
  • Geometry is derived from the structure — space group and asymmetric unit for a crystal, and the right coordinate convention for slabs, polymers and molecules.
  • Choose the method (HF or DFT, one functional keyword or separate exchange and correlation), basis set, SCF settings and the calculation: single point, geometry optimisation, frequencies with IR/Raman, phonon dispersion, QHA, equation of state, elastic constants, CPHF, anharmonic runs and spin–orbit coupling.

Property plots (via CRYSTALClear, shown in a dockable tabbed panel)

  • IR & Raman spectra, elastic surfaces (Young's modulus, linear compressibility, shear, Poisson), equation of state.
  • Electronic & phonon band structures and densities of states, simulated XRD.

Screenshots

Main window
The main window — crystallographic info, the interactive 3D view and the phonon-mode list (brucite, Mg(OH)₂).

Raman spectrum and animation export
A computed Raman spectrum beside the structure, with the phonon-animation export dialog (thiourea).

Display panel, polyhedra and elastic surface
The Display panel and coordination polyhedra on a 2×2×2 supercell, with a Young's modulus elastic surface.

Architecture

The package is deliberately layered so the domain logic stays independent of the Qt UI — and therefore unit-testable without a display:

src/crystalline/
├── core/        domain model — Structure, phonons, cells, bonds, undo (no Qt)
├── crystalio/   thin adapter over CRYSTALClear (load/save, property plots)
├── viz/         PyVista/VTK rendering, phonon animation, image/movie export (no Qt)
├── ui/          PySide6 widgets: 3D viewport, dockable panels, main window
└── resources/   bundled assets (logo)

Only ui/ (and the viewport that embeds the VTK interactor) imports Qt. Adding a new property (a new plot, panel, …) is a matter of dropping a widget into ui/panels/ and wiring its signals in MainWindow.

Usage

python -m crystalline
# or, after install, just:
crystalline

Use File → Open to load a CRYSTAL .out/.gui/.34 file or a .cif. If a CRYSTAL output contains a vibrational calculation, the phonon modes are loaded too — pick one in the Phonons panel and press Play. Otherwise the geometry is shown on its own. Tweak the look from the Display panel, measure geometry from the Geometry panel, and build property plots from the Plot menu.

Enable Edit → Editing mode (Ctrl+E) to edit atoms: click to select, drag or arrow-key the selection to move it, Del to delete, and pick elements from the visual periodic table.

CRYSTALLine runs on Linux, macOS and Windows — anywhere PySide6 and a working OpenGL/VTK stack are available.

Testing

pytest

The suite runs headless and exercises the Qt-free core, the renderer (via an off-screen PyVista plotter), the plotting adapter and the file I/O.

License

GNU General Public License v3.0 or later.

Acknowledgements

Built on the CRYSTALClear I/O and plotting framework for the CRYSTAL quantum chemistry code.

This software was developed with the assistance of Claude (Anthropic), using Claude Code.

Release files for CRYSTALLine 0.1.2

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

Source distribution (sdist)

Source distribution for CRYSTALLine 0.1.2
File Size Uploaded
crystalline-0.1.2.tar.gz 187.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CRYSTALLine 0.1.2
File Interpreter ABI Platform
crystalline-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 346.0 kB

Release files / crystalline-0.1.2.tar.gz

Download URL crystalline-0.1.2.tar.gz
Size 187.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d23b94f5eaf28a1e7f7ef33a29121329e846ccebe0bb953702b5fba295e4cf35
BLAKE2b-256 checksum
How to use checksums
2817daab0100acf78cb08b3c7ce695255068a2791598eb84f362f6850752eb29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 26, 2026.

Transparency log

Release files / crystalline-0.1.2-py3-none-any.whl

Download URL crystalline-0.1.2-py3-none-any.whl
Size 158.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1582b8f69c5df34d85e8e8f7cf4640545e96c1a7e9e6348cc1a65f129e9705b5
BLAKE2b-256 checksum
How to use checksums
505d16c76d756aac1e6e8f4f6660be2f626324a6506216da9287fcaa485653c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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 Jul 26, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.3

2 release files

This release

0.1.2 This release

2 release files

0.1.1

2 release 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