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.
This package is under active development. The API is liable to change between release versions.
To install using pip, simply run
pip install pytngTo install the latest development version from source, run
git clone [email protected]:MDAnalysis/pytng.git
cd pytng
python setup.py installFor help using this library, please drop by the GitHub issue tracker.