Skip to main content

A GUI tool to set and adjust unit cell parameters for crystal structures.

Project description

CelleditPy — A Python Crystal Cell Editor

DOI

CelleditPy is a Python-based GUI application designed for crystallographers and computational chemists. It provides a visual, interactive environment to load molecular structures (from .mol or .cif files), define or adjust unit cell parameters, and reposition the molecule within the cell before saving the result as a .cif file.

This tool is built using PyQt6, PyVista, and ASE (Atomic Simulation Environment).

Features

  • Load Structures: Load molecular structures from .mol and .cif files.
  • Save as CIF: Save the final structure, including the unit cell, in .cif format.
  • Interactive Cell Editing: Manually set or adjust unit cell parameters (a, b, c, alpha, beta, gamma).
  • Auto-Fit Cell: Automatically calculate and apply the minimum cell dimensions (a, b, c) required to contain the molecule, while preserving the current cell angles.
  • 3D Manipulation:
    • Translation: Move the molecule along Cartesian (XYZ) axes or fractional cell (ABC) axes.
    • Rotation: Rotate the molecule around Cartesian (XYZ) axes (centered on a selected atom) or cell (ABC) axes (centered on the axis itself).
  • Molecule Fitting:
    • Fit Molecule to Axis: Align the molecule to a specific cell axis (a, b, or c) by defining the molecular direction using two or more atoms.
    • Fit in Cell (Auto-fit): Automatically detects atoms lying on a cell axis, fixes them, and rotates the rest of the molecule to best fit within the cell boundaries.
  • Coordinate Wrapping: Wrap atomic coordinates to fit all atoms inside the defined unit cell (0.0 to 1.0 fractional coordinates).
  • Visualization:
    • 3D visualization powered by PyVista.
    • Toggle the display of atom indices.
    • Reset the camera view.

Installation

Prerequisites:

  • Python 3.8+
  • The following libraries (and their dependencies) are required:
    • PyQt6
    • pyvista
    • pyvistaqt
    • ase
    • numpy
    • scipy

These dependencies will be installed automatically when installing the package.

Install from Source:

Install the package using pip. This will also install all required dependencies and register the command-line entry point. bash pip install celleditpy

Usage

After installation, you can run the application by simply typing the following command in your terminal:

celleditpy

This will launch the main application window.

License

This project is licensed under the GNU General Public License v3.0 (GPL-v3) License. See the LICENSE file for details.

Author

  • HiroYokoyama

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

celleditpy-0.4.1.tar.gz (40.1 kB view details)

Uploaded Source

Built Distribution

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

celleditpy-0.4.1-py3-none-any.whl (40.7 kB view details)

Uploaded Python 3

File details

Details for the file celleditpy-0.4.1.tar.gz.

File metadata

  • Download URL: celleditpy-0.4.1.tar.gz
  • Upload date:
  • Size: 40.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for celleditpy-0.4.1.tar.gz
Algorithm Hash digest
SHA256 1ca073642f2495f672e39046311560aedd8cee4679f401df57323e1266c6a7a8
MD5 01b1e8da0bf55340bcaf3564c1e1d5cd
BLAKE2b-256 2ea01c49b20ce1cb4ab4cfb971bf2e619a8da6fd878c807d0a5ae47891d5f2fa

See more details on using hashes here.

File details

Details for the file celleditpy-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: celleditpy-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 40.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for celleditpy-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b386757297b0b5a0e28a90018f177f31c92caa781a5d895482d1478a1fa5dee2
MD5 5ad63ec481320b4c9bdd0379bf7d8f5a
BLAKE2b-256 63e5b02abcbfb6ab33c4f6da17320b598efdb8354f4fbece0f5f6b16db8caadb

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