https://github.com/glotzerlab/spatula
Python package for calculation of symmetry based order parameters in molecular simulation systems.
https://github.com/glotzerlab/spatula
Last synced: 8 months ago
JSON representation
Python package for calculation of symmetry based order parameters in molecular simulation systems.
- Host: GitHub
- URL: https://github.com/glotzerlab/spatula
- Owner: glotzerlab
- License: bsd-3-clause
- Created: 2022-08-05T18:51:26.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-10-02T06:13:04.000Z (8 months ago)
- Last Synced: 2025-10-02T08:26:04.947Z (8 months ago)
- Language: Python
- Homepage: https://spatula.readthedocs.io
- Size: 6.55 MB
- Stars: 2
- Watchers: 9
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- Changelog: changelog.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Authors: AUTHORS.rst
Awesome Lists containing this project
README
=======
SPATULA
=======
Overview
--------
``SPATULA`` (Symmetry Pattern Analysis Toolkit for Understanding Local Arrangements) is a Python package for computing the continuous symmetry ordering of the neighbors of a point in space.
In general, this is to compute the local ordering of particles (molecules) in simulations or experiments over time.
The package serves as an extension of `freud `__ with a new order parameter.
``spatula`` currently supports all point groups of finite order:
- All crystallographic point groups
- Cyclical groups :math:`C_n`
- Cyclical groups with vertical reflection :math:`C_{nv}`
- Cyclical groups with horizontal reflection :math:`C_{nh}`
- Dihedral groups :math:`D_n`
- Dihedral groups with horizontal reflection :math:`D_{nh}`
- Dihedral groups with diagonal reflections :math:`D_{nd}`
- Polyhedral groups :math:`T, T_h, T_d, O, O_h, I, I_h`
- Rotoreflection groups :math:`S_n`
- Inversion group: :math:`C_i`
- Reflection group: :math:`C_s`
Resources
=========
- `Reference Documentation `__: Examples, tutorials, and package Python APIs.
- `Installation Guide `__: Instructions for installing and compiling **spatula**.
- `GitHub repository `__: Download the **spatula** source code.
- `Issue tracker `__: Report issues or request features.
Related Tools
=============
- `HOOMD-blue `__: Perform MD / MC simulations that
can be analyzed with **spatula**.
- `freud `__: Analyze particle simulations.
- `signac `__: Manage your workflow with **signac**.
Citation
========
When using **spatula** to process data for publication, please refer to the `documentation instructions
`__.
Installation
============
**Spatula** is available on PyPI and conda-forge.
See the Installation Guide for more information.
Example
-------
.. code-block:: python
import freud
import spatula
system = freud.data.UnitCell.fcc().generate_system(3)
optimizer = spatula.optimize.Union.with_step_gradient_descent(
optimizer=spatula.optimize.Mesh.from_grid()
)
PGOP_Oh_Ih = spatula.PGOP(["Oh","Ih"], optimizer)
PGOP_Oh_Ih.compute(system, sigmas=None, neighbors={"r_max": 1.2, "exclude_ii": True})
print(PGOP_Oh_Ih.order)