Metadata-Version: 2.4
Name: pyztraj
Version: 0.6.0
Summary: Fast molecular dynamics trajectory analysis powered by Zig
Project-URL: Repository, https://github.com/N283T/ztraj
Project-URL: Issues, https://github.com/N283T/ztraj/issues
Author: Tsubasa Nagae
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Chemistry
Requires-Python: >=3.11
Requires-Dist: cffi>=1.15
Requires-Dist: numpy>=1.24
Provides-Extra: dev
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Requires-Dist: ty>=0.0.1a0; extra == 'dev'
Description-Content-Type: text/markdown

# pyztraj

Fast molecular dynamics trajectory analysis powered by Zig.

## Installation

### From PyPI (recommended)

```bash
pip install pyztraj
# or
uv pip install pyztraj
```

Pre-built wheels are available for Linux (x86_64/aarch64), macOS (x86_64/ARM64), and Windows (amd64) with Python 3.11–3.13.

### From source

Requires [Zig 0.15.2+](https://ziglang.org/download/).

```bash
git clone https://github.com/N283T/ztraj.git
cd ztraj/python
pip install .
```

## Usage

```python
import pyztraj

# Load a PDB structure
struct = pyztraj.load_pdb("structure.pdb")

# Compute pairwise distances
distances = pyztraj.compute_distances(struct.coords, pairs)

# Stream XTC trajectory frames
with pyztraj.open_xtc("trajectory.xtc", struct.n_atoms) as reader:
    for frame in reader:
        rg = pyztraj.compute_rg(frame.coords, struct.masses)
```
