https://github.com/open2c/polykit
https://github.com/open2c/polykit
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/open2c/polykit
- Owner: open2c
- License: mit
- Created: 2023-03-27T20:36:09.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-08-13T01:35:52.000Z (10 months ago)
- Last Synced: 2025-08-13T02:36:12.946Z (10 months ago)
- Language: Python
- Homepage:
- Size: 4.77 MB
- Stars: 6
- Watchers: 8
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# polykit
Generic toolkit for polymer simulation setup and analysis
## Installation
The `renderers` module for Jupyter-notebook-embedded visualization requires the [**`fresnel`**](https://fresnel.readthedocs.io/en/v0.13.5/) library, which can be installed through conda:
~~~shell
conda install -c conda-forge fresnel
~~~
## Usage
All functions within the `analysis` module should work as described in the [**Polychrom**](https://polychrom.readthedocs.io/en/latest/index.html) documentation, on condition that an appropriate [**`load_function`**](https://polychrom.readthedocs.io/en/latest/polychrom.hdf5_format.html#polychrom.hdf5_format.load_URI) is provided to parse the required trajectory files. For [**HOOMD-blue**](https://glotzerlab.engin.umich.edu/hoomd-blue/)'s native [**GSD**](https://gsd.readthedocs.io/en/stable/index.html) file format, the corresponding function takes the following form:
~~~python
def load_gsd(URI):
filename, group = URI.split("::")
with gsd.hoomd.open(name=filename, mode="rb") as traj:
return traj[int(group)].particles.position
~~~