geoparticle
A Python package for geometry construction in particle-based simulation.
I mainly use this package for geometry construction in LAMMPS, with some examples provided in the repository; of course, it can also be used for other software.
Installation
Installing from pypi
pip install geoparticle
Installing from the source code
Download and enter the source code directory, then
pip install .
Documentation
The documentation is hosted on Read the Docs.
Background
Particles of specified geometries are typically created by the lattice command in LAMMPS, which can lead to rough surfaces when the particle spacing is not small enough. However, too small spacing can result in too many particles and thus increase the computational cost.
The case is the same when one creates atoms based on an external STL file (an example STL file exported by COMSOL is shown below):
Features
To resolve this problem, I developed this package for easy construction of geometries where smooth surfaces are required. Miscellaneous geometries are provided, including 1D geometries (lines and curves):
2D geometries (rectangles and circles):
3D geometries (blocks, cylinders, tori, and spheres):
all of which can be surface, thick shells, or filled bodies.
Diverse operations are also provided, including translation, mirror, rotation, stack, clipping, union, intersection, and subtraction.
Some utility functions are also provided.
Quick start
examples/gallery.py provided detailed scripts to yield the geometries above.
Two more examples are given to shown how to couple geoparticle with LAMMPS. The first example is the 2D gas-liquid dam break, while the second is a 3D intestine connected with an inlet and an outlet.
See the documentation for details.
Limitations
The particle spacings may be not exactly as specified in order to create a smooth surface.
Resultant geometries of boolean operations can have more particles than expected in some cases, because
- For intersection and subtraction, only particles with distances smaller than
rmaxwill be identified the same. Users should align particles of different geometries to get the expected results. - For union, particles of all the given geometries will be collected to yield the union. Users should ensure no particles are overlapped.
Metadata
Release files for geoparticle 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| geoparticle-1.0.4.tar.gz | 23.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| geoparticle-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.1 kB
Release files / geoparticle-1.0.4.tar.gz
| Download URL | geoparticle-1.0.4.tar.gz |
|---|---|
| Size | 23.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57a41407252103f8d9182218453501bbcfa1560ba0e8def518de52d24db6a914
|
|
BLAKE2b-256 checksum How to use checksums |
085d5c01a9a9a1481e97d4d6dd0d5a90c91e6d797e2383c79a7fab582d281121
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Nov 23, 2025.
Transparency logRelease files / geoparticle-1.0.4-py3-none-any.whl
| Download URL | geoparticle-1.0.4-py3-none-any.whl |
|---|---|
| Size | 24.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
649e0599422fc182e537aa2157f8f2e3f3c42fa5ee0e5a4e0c0ca674aa5a7088
|
|
BLAKE2b-256 checksum How to use checksums |
150372eaf6e8df717251add42a8a1d87bb46c6e955d4b46d86f33c48486b099f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Nov 23, 2025.
Transparency logSecurity for geoparticle 1.0.4
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for geoparticle-1.0.4.tar.gz
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 Nov 23, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.