Skip to main content

Tools for creating and manipulating shapes.

Project description

coxeter

JOSS ReadTheDocs PyPI conda-forge

Welcome to the documentation for coxeter! The coxeter Python library provides tools for working with common geometric objects in two and three dimensions. Named for the 20th century geometer best known for his work on polytopes, coxeter is especially focused on polygons and polyhedra, but it also support various standard curved shapes such as spheres and ellipsoids.

The package emphasizes working with shapes as mutable objects whose geometric attributes may be accessed using property-based APIs. Since coxeter originally arose to support representations of anisotropic nanoparticles, many shapes support calculations of physical properties (such as form factors and inertia tensors) in addition to purely geometric ones. However, the package is designed with more general audiences in mind as well, and it aims to support precise calculations of a wide range of geometric quantities that are useful in a number of fields.

Some core features of coxeter include:

  • Libraries of common shapes to support easy construction.

  • Mutable shape objects that can be rescaled in a variety of ways to suit a number of needs.

  • Immediate access to geometric properties of shapes via Python properties of shape objects.

  • Plotting functionality to make it easy to visualize shapes in both two and three dimensions.

More detailed information on coxeter’s features and examples of how to use them may be found in the documentation.

Setup

The recommended methods for installing coxeter are using pip or conda.

Installation via pip

To install the package from PyPI, execute:

pip install coxeter --user

Installation via conda

To install the package from conda, first add the conda-forge channel:

conda config --add channels conda-forge

After the conda-forge channel has been added, you can install coxeter by executing

conda install coxeter

Installation from source

Start by executing the following:

git clone https://github.com/glotzerlab/coxeter.git
cd coxeter

To install coxeter and other optional dependencies, choose one of the following:

pip install . # Install with no additional dependencies
pip install .[tests] # RECOMMENDED: Install with dependencies required to run pytests
pip install .[tests,doc] # Install all dependencies required to develop for coxeter

Requirements

  • Python >= 3.8

  • NumPy >= 1.19.0

  • SciPy >= 1.0.0

  • rowan >= 1.2.0

Testing

The package is currently tested for Python >= 3.8 on Unix-like systems. Continuous integrated testing is performed using Github actions on these Python versions.

First, install the packages required to test coxeter (if not already done):

pip install -r tests/requirements.txt

To run the packaged unit tests, execute the following line from the root of the repository:

pytest

To run the packaged unit tests with the coverage module:

pytest --cov=coxeter

Building Documentation

Documentation for coxeter is written in reStructuredText and compiled using Sphinx. To build the documentation, first install Sphinx and the other required packages:

pip install -r doc/requirements.txt
conda install -c conda-forge fresnel

You can then use Sphinx to create the actual documentation in either PDF or HTML form by running the following commands:

cd doc
make html # For html output
make latexpdf # For a LaTeX compiled PDF file
open build/html/index.html

Support and Contribution

This package is hosted on GitHub. Please report any bugs or problems that you find on the issue tracker. All contributions to coxeter are welcomed via pull requests!

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

coxeter-0.9.0.tar.gz (202.5 kB view details)

Uploaded Source

Built Distribution

coxeter-0.9.0-py3-none-any.whl (195.6 kB view details)

Uploaded Python 3

File details

Details for the file coxeter-0.9.0.tar.gz.

File metadata

  • Download URL: coxeter-0.9.0.tar.gz
  • Upload date:
  • Size: 202.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for coxeter-0.9.0.tar.gz
Algorithm Hash digest
SHA256 af38542c7280d707931cb1aad795323e465518f1c5476af5929f770eda30e816
MD5 773e88aafda06cbd59790aa5b09ac63d
BLAKE2b-256 c429b65f708cc5cf373d167811887d086754fd818a6cf3cc6d090733e7d88e92

See more details on using hashes here.

Provenance

File details

Details for the file coxeter-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: coxeter-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 195.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for coxeter-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01eec6422d3b4f89493f9a056b6499897bdbd2b763a0d6f937a09b8164de2ba0
MD5 352cc91ed7bfe330a9ab930109c2bcfe
BLAKE2b-256 f40cbf8315c0378453ceaaf752f4e2dd42d26bca6eb4deea859cbba0b6cbdc42

See more details on using hashes here.

Provenance

Supported by

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