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.0.tar.gz (10.9 MB view details)

Uploaded Source

File details

Details for the file pytng-0.3.0.tar.gz.

File metadata

  • Download URL: pytng-0.3.0.tar.gz
  • Upload date:
  • Size: 10.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for pytng-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f563f9ea260ca8c8e17b3bcf9458bae35aedd5c58e1c5ac4dfff77a1e036506e
MD5 521c8a83a1717e8f0a54630d58fd99cf
BLAKE2b-256 2eaed9b5e5d9b48c6509d9ea5013a9f9d4618fca3b1ec7c4f8cfa0477b370c54

See more details on using hashes here.

Provenance

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