https://github.com/tp5uiuc/elastica-pipelines
Pipelines for Elastica++ applications
https://github.com/tp5uiuc/elastica-pipelines
Last synced: 25 days ago
JSON representation
Pipelines for Elastica++ applications
- Host: GitHub
- URL: https://github.com/tp5uiuc/elastica-pipelines
- Owner: tp5uiuc
- License: mit
- Created: 2022-08-27T06:23:26.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-18T14:44:02.000Z (over 2 years ago)
- Last Synced: 2025-01-13T22:45:01.898Z (over 1 year ago)
- Language: Python
- Size: 603 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Elastica Pipelines
[][pypi_]
[][status]
[][python version]
[][license]
[][read the docs]
[][tests]
[][codecov]
[][pre-commit]
[][black]
[pypi_]: https://pypi.org/project/elastica-pipelines/
[status]: https://pypi.org/project/elastica-pipelines/
[python version]: https://pypi.org/project/elastica-pipelines
[read the docs]: https://elastica-pipelines.readthedocs.io/
[tests]: https://github.com/tp5uiuc/elastica-pipelines/actions?workflow=Tests
[codecov]: https://app.codecov.io/gh/tp5uiuc/elastica-pipelines
[pre-commit]: https://github.com/pre-commit/pre-commit
[black]: https://github.com/psf/black
## Features
### IO
- Lazy loading of simulation time-series data generated by **Elastica++** applications
- Track a single, or a subset, or whole group of rods, over time using familiar slicing API
## Installation
You can install _Elastica Pipelines_ via [pip] from [PyPI]:
```console
$ pip install elastica-pipelines
```
## Usage
Please see the [Command-line Reference] for details.
### IO
[![Python3][api-py3]](https://www.python.org/) ![Python3 API: Alpha][dev-alpha]
[api-py3]: https://img.shields.io/badge/language-Python3-yellowgreen "Python3 API"
[dev-alpha]: https://img.shields.io/badge/phase-alpha-yellowgreen "Status: Alpha"
```py
from elastica_pipelines import io
# ...
# Read only access to data written by Elastica++
series = io.series(metadata="elastica_metadata.h5")
# use series like a python Mapping
for t, snapshot in series.iterations():
print("Iteration: {0} at time {1}".format(t.iterate, t.time))
# Snapshot is a mapping contain system types such as CosseratRods & Spheres
# Here we access only cosserat rods
for rod_id, rod in snapshot.cosserat_rods().items(): # snapshot['CosseratRod'] also works!
if rod_id == 0:
print(" Rod '{0}' attributes:".format(rod_id))
# even rod is a Mapping, get its keys
print(" {0}".format(list(rod.keys())))
print(" Rod '{0}' position:".format(rod_id), rod['Position'])
```
## Contributing
Contributions are very welcome.
To learn more, see the [Contributor Guide].
## License
Distributed under the terms of the [MIT license][license],
_Elastica Pipelines_ is free and open source software.
## Issues
If you encounter any problems,
please [file an issue] along with a detailed description.
## Credits
This project was generated from [@cjolowicz]'s [Hypermodern Python Cookiecutter] template.
[@cjolowicz]: https://github.com/cjolowicz
[pypi]: https://pypi.org/
[hypermodern python cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python
[file an issue]: https://github.com/tp5uiuc/elastica-pipelines/issues
[pip]: https://pip.pypa.io/
[license]: https://github.com/tp5uiuc/elastica-pipelines/blob/main/LICENSE
[contributor guide]: https://github.com/tp5uiuc/elastica-pipelines/blob/main/CONTRIBUTING.md
[command-line reference]: https://elastica-pipelines.readthedocs.io/en/latest/usage.html