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.4-blue.svg?style=flat)](https://github.com/rcsb/mmtf-python/) [![License](http://img.shields.io/badge/license-Apache 2.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")
```
[![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.4-blue.svg?style=flat)](https://github.com/rcsb/mmtf-python/) [![License](http://img.shields.io/badge/license-Apache 2.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
Release history Release notifications | RSS feed
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.5.tar.gz
(21.8 kB
view details)
Built Distribution
File details
Details for the file mmtf-python-1.0.5.tar.gz
.
File metadata
- Download URL: mmtf-python-1.0.5.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 121ce4555915e16e5009db0e22d33b57df4aeebad2cc358e5be7ec064630fb68 |
|
MD5 | 8c61d43e738e8950d55dab649460ef0a |
|
BLAKE2b-256 | 4b5668f3cda7b98cfb86a2154ef03f2ef5f2f38e2382fe05ca054860db25e317 |
Provenance
File details
Details for the file mmtf_python-1.0.5-py2.py3-none-any.whl
.
File metadata
- Download URL: mmtf_python-1.0.5-py2.py3-none-any.whl
- Upload date:
- Size: 22.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebe09f3ac3e2ae51125fe91241f920e30340d1557d13e83cc2adcc2dbc03917b |
|
MD5 | e05999a4b324d4b86315fe1685ca3718 |
|
BLAKE2b-256 | 5b3009d8b4ec288bfed92495e6cc07899de68bf3cab2f8c7406ae0e35ca0534d |