Skip to main content

Minimal Cython wrapper of the TNG trajectory library

Project description

https://github.com/MDAnalysis/pytng/workflows/build/badge.svg https://github.com/MDAnalysis/pytng/workflows/docs/badge.svg https://badge.fury.io/py/pytng.svg https://codecov.io/gh/MDAnalysis/pytng/branch/master/graph/badge.svg https://zenodo.org/badge/92180386.svg

This package provides the TNGFileIterator object to allow simple Pythonic access to data contained within TNG files.

import pytng
import numpy as np

with pytng.TNGFileIterator('traj.tng', 'r') as tng:

  positions = np.empty(shape=(tng.n_atoms,3), dtype=np.float32)

  for ts in tng:
    time = ts.get_time()
    positions = ts.get_positions(positions)

This package contains Python bindings to libtng for TNG file format[1] [2]. This is used by molecular simulation programs such as Gromacs for storing the topology and results from molecular dynamics simulations.

Warning

This package is under active development. The API is liable to change between release versions.

Installation

To install using pip, simply run

pip install pytng

To install the latest development version from source, run

git clone git@github.com:MDAnalysis/pytng.git
cd pytng
python setup.py install

Getting help

For help using this library, please drop by the GitHub issue tracker.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytng-0.3.1.tar.gz (10.6 MB view hashes)

Uploaded Source

Built Distributions

pytng-0.3.1-cp312-cp312-win_amd64.whl (693.6 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

pytng-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

pytng-0.3.1-cp312-cp312-macosx_10_9_x86_64.whl (666.9 kB view hashes)

Uploaded CPython 3.12 macOS 10.9+ x86-64

pytng-0.3.1-cp311-cp311-win_amd64.whl (698.8 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

pytng-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.8 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pytng-0.3.1-cp311-cp311-macosx_10_9_x86_64.whl (679.1 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

pytng-0.3.1-cp310-cp310-win_amd64.whl (700.0 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

pytng-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pytng-0.3.1-cp310-cp310-macosx_10_9_x86_64.whl (686.1 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pytng-0.3.1-cp39-cp39-win_amd64.whl (702.1 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

pytng-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pytng-0.3.1-cp39-cp39-macosx_10_9_x86_64.whl (684.0 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page