The python implementation of the MMTF API, decoder and encoder.
Latest commit e36d4e2 Nov 24, 2016 @abradle abradle Updated changelog
Failed to load latest commit information.
mmtf Changed classes to new style Nov 24, 2016
.gitignore Added gitignore Aug 2, 2016
.travis.yml Just do 3.5 for osx Jun 16, 2016
LICENSE.txt add Manifest file Nov 22, 2016 Update for version 1.0.4 Sep 16, 2016
README.rst Added build proccess Apr 17, 2016

Build Status Code Health Version License Changelog

The macromolecular transmission format (MMTF) is a binary encoding of biological structures.

This repository holds the Python 2 and 3 compatible API, encoding and decoding libraries.

The MMTF python API is available from pip:

pip install mmtf-python

Quick getting started.

1) Get the data for a PDB structure and print the number of chains:

from mmtf import fetch
# Get the data for 4CUP
decoded_data = fetch("4CUP")
print("PDB Code: "+str(decoded_data.structure_id)+" has "+str(decoded_data.num_chains)+" chains")

2) Show the charge information for the first group:

print("Group name: "+str(decoded_data.group_list[0]["groupName"])+" has the following atomic charges: "+",".join([str(x) for x in decoded_data.group_list[0]["formalChargeList"]]))

3) Show how many bioassemblies it has:

print("PDB Code: "+str(decoded_data.structure_id)+" has "+str(len(decoded_data.bio_assembly))+" bioassemblies")