Skip to main content

A decoding libary for the PDB mmtf format

Project description

[![Build Status](https://travis-ci.org/rcsb/mmtf-python.svg?branch=master)](https://travis-ci.org/rcsb/mmtf-python)
[![Code Health](https://landscape.io/github/rcsb/mmtf-python/master/landscape.svg?style=flat)](https://landscape.io/github/rcsb/mmtf-python/master)
[![Version](http://img.shields.io/badge/version-1.0.7-blue.svg?style=flat)](https://github.com/rcsb/mmtf-python/)
[![License](http://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat)](https://github.com/rcsb/mmtf-python/blob/master/LICENSE.txt)
[![Changelog](https://img.shields.io/badge/changelog--lightgrey.svg?style=flat)](https://github.com/rcsb/mmtf-python/blob/master/CHANGELOG.md)


The **m**acro**m**olecular **t**ransmission **f**ormat (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:
```python
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:
```python
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:
```python
print("PDB Code: "+str(decoded_data.structure_id)+" has "+str(len(decoded_data.bio_assembly))+" bioassemblies")
```

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

mmtf-python-1.0.7.tar.gz (46.5 kB view details)

Uploaded Source

Built Distribution

mmtf_python-1.0.7-py2.py3-none-any.whl (22.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file mmtf-python-1.0.7.tar.gz.

File metadata

  • Download URL: mmtf-python-1.0.7.tar.gz
  • Upload date:
  • Size: 46.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mmtf-python-1.0.7.tar.gz
Algorithm Hash digest
SHA256 e91c9ec2aef02c9a1136f0e481b934c18667f04584ad29e28855fc3316c6f055
MD5 2ad34dddfe81ef6598c9510b70a7fd7b
BLAKE2b-256 ec8d937affce884fb217ebf840ce189306e29bcc95a1ab9005b2940489bb70bb

See more details on using hashes here.

File details

Details for the file mmtf_python-1.0.7-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for mmtf_python-1.0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a372222e9b14acb07a9b6440a11bd79d1edefe2a99b15b8491f7623c59b3242b
MD5 90338fb7fa58779ba27b4d7438097667
BLAKE2b-256 05cfc007c7ffe19a0b8945cd41db9c534096ef33ebf9fb467ff1d3c5f0e1d6f8

See more details on using hashes here.

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