skillfed

biotraj

Basic trajectory file format functionality for Biotite; forked from MDTraj

biotraj v1.2.2 2.2M downloads/30d#3,211 on PyPI1
Copyleft license GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted… (full text in the JSON record) AGING released

What it is and what it does

biotraj is a minimal, standalone library for reading and writing molecular dynamics trajectory files. It is extracted from the larger MDTraj project and provides I/O functionality for XTC, TRR, NetCDF, and DCD formats—the standard file types produced by molecular dynamics simulations. The package exists primarily as a dependency for Biotite, a bioinformatics toolkit, because Biotite cannot directly integrate MDTraj due to license incompatibility.

The package depends only on numpy and scipy, making it lightweight for trajectory file operations. It is classified as Beta (Development Status 4) and targets researchers and developers working with biomolecular simulation data. The library is not intended as a general-purpose replacement for MDTraj but rather as a focused tool for trajectory I/O when Biotite's license constraints apply.

Use it for:

  • Load molecular dynamics simulation trajectories in XTC or TRR format for analysis within Biotite workflows.
  • Convert trajectory files between supported formats (XTC, TRR, NetCDF, DCD) for compatibility with different simulation engines.
  • Extract trajectory data programmatically in Python without requiring the full MDTraj installation.
  • Integrate trajectory file handling into bioinformatics pipelines that use Biotite as a dependency.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Reads and writes molecular dynamics trajectory files in XTC, TRR, NetCDF, and DCD formats, extracted from MDTraj as a standalone library for use by Biotite.

Yes, if you are using Biotite or need lightweight trajectory I/O for XTC, TRR, NetCDF, or DCD files. The package is stable and dependency-light (numpy, scipy only). However, maintenance is aging (last release 650 days ago), so verify that the formats you need are fully supported and check Biotite's current requirements before installing. Not recommended as a standalone replacement for MDTraj unless you have a specific license constraint.

Install

biotraj on PyPI

pip

pip install biotraj

uv

uv add biotraj

poetry

poetry add biotraj

Installing biotraj

Before you install

Medium install friction due to compiled wheels across multiple Python versions and platforms (3.10–3.13, macOS, Linux, Windows). Maintenance is aging—last release was 650 days ago, though the repository remains active and the package is a dependency for Biotite.

License in practice

Licensed under GNU Lesser General Public License v2.1 or later (copyleft). If you distribute software that links biotraj, you must provide source code and allow recipients to modify and relink the library; proprietary applications can use it but must comply with LGPLv2+ terms.

Quickstart

import biotraj
# Load a trajectory file
traj = biotraj.load('trajectory.xtc', top='topology.pdb')
# Save to a different format
biotraj.save('output.dcd', traj)

Requires numpy and scipy; Python >= 3.10 is required.

Verify before relying

  • Whether biotraj can be used independently or is intended only as a Biotite dependency despite being on PyPI.
  • Performance characteristics and memory efficiency for large trajectory files.
  • Completeness of format support relative to the original MDTraj library.

Package facts

License GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted… (full text in the JSON record) (copyleft)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies 2 — numpy, scipy
Maintenance aging — 650 days since the last release
Last repo commit
First released
Downloads 2,207,289/month — #3,211 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: biotraj-1.2.2-cp310-cp310-macosx_10_9_x86_64.whl; biotraj-1.2.2-cp310-cp310-macosx_11_0_arm64.whl; biotraj-1.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; biotraj-1.2.2-cp310-cp310-win_amd64.whl; biotraj-1.2.2-cp311-cp311-macosx_10_9_x86_64.whl; biotraj-1.2.2-cp311-cp311-macosx_11_0_arm64.whl; biotraj-1.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; biotraj-1.2.2-cp311-cp311-win_amd64.whl; biotraj-1.2.2-cp312-cp312-macosx_10_9_x86_64.whl; biotraj-1.2.2-cp312-cp312-macosx_11_0_arm64.whl; biotraj-1.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; biotraj-1.2.2-cp312-cp312-win_amd64.whl; biotraj-1.2.2-cp313-cp313-macosx_10_13_x86_64.whl; biotraj-1.2.2-cp313-cp313-macosx_11_0_arm64.whl; biotraj-1.2.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; biotraj-1.2.2-cp313-cp313-win_amd64.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)Natural Language :: EnglishOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonTopic :: Scientific/Engineering :: Bio-Informatics

Tags

molecular dynamics trajectory file ioread write xtc trr dcd netcdftrajectory format conversionmdtraj trajectory readerbiomolecular simulation data
molecular-dynamicstrajectory-iobioinformatics

More Bio-Informatics packages