Skip to main content

Minimal Cython wrapper of the TNG trajectory library

Project description

https://travis-ci.com/MDAnalysis/pytng.svg?branch=master 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.

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.2.2a2.tar.gz (10.5 MB view details)

Uploaded Source

File details

Details for the file pytng-0.2.2a2.tar.gz.

File metadata

  • Download URL: pytng-0.2.2a2.tar.gz
  • Upload date:
  • Size: 10.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200712 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for pytng-0.2.2a2.tar.gz
Algorithm Hash digest
SHA256 bf8736008ae7e4f5e5fe64a98f1e31aa21b092bf02d565573f6bd9ddbb81fe43
MD5 53217456d88dcace22e53ae4a3865f6c
BLAKE2b-256 427c3339ce520b3613ee35f201807b2147765e6898ee39c757a30a01bcf67266

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