Package: coxeter
coxeterWelcome to the documentation forcoxeter!
ThecoxeterPython library provides tools for working with common geometric objects in two and three dimensions.
Named for the20th century geometerbest known for his work on polytopes,coxeteris 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.
Sincecoxeteroriginally 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 ofcoxeterinclude: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 oncoxeter’s features and examples of how to use them may be found in thedocumentation.SetupThe recommended methods for installing coxeter are usingpiporconda.Installation via pipTo install the package from PyPI, execute:pipinstallcoxeter--userInstallation via condaTo install the package from conda, first add theconda-forgechannel:condaconfig--addchannelsconda-forgeAfter theconda-forgechannel has been added, you can install coxeter by executingcondainstallcoxeterInstallation from sourceStart by executing the following:gitclonehttps://github.com/glotzerlab/coxeter.gitcdcoxeterTo install coxeter and other optional dependencies, choose one of the following:pipinstall.# Install with no additional dependenciespipinstall.[tests]# RECOMMENDED: Install with dependencies required to run pytestspipinstall.[tests,doc]# Install all dependencies required to develop for coxeterRequirementsPython >= 3.8NumPy >= 1.19.0SciPy >= 1.0.0rowan >= 1.2.0TestingThe 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):pipinstall-rtests/requirements.txtTo run the packaged unit tests, execute the following line from the root of the repository:pytestTo run the packaged unit tests with the coverage module:pytest--cov=coxeterBuilding DocumentationDocumentation for coxeter is written inreStructuredTextand compiled usingSphinx.
To build the documentation, first install Sphinx and the other required packages:pipinstall-rdoc/requirements.txtcondainstall-cconda-forgefresnelWarningThefresnelpackage on conda-forge must be used. The PyPI packagefresnelis different and will not function properly.You can then use Sphinx to create the actual documentation in either PDF or HTML form by running the following commands:cddocmakehtml# For html outputmakelatexpdf# For a LaTeX compiled PDF fileopenbuild/html/index.htmlSupport and ContributionThis package is hosted onGitHub.
Please report any bugs or problems that you find on theissue tracker.
All contributions to coxeter are welcomed via pull requests!