A decoding libary for the PDB mmtf format
Project description
[](https://travis-ci.org/rcsb/mmtf-python)
[](https://landscape.io/github/rcsb/mmtf-python/master)
[](https://github.com/rcsb/mmtf-python/) [](https://github.com/rcsb/mmtf-python/blob/master/LICENSE.txt)
[](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")
```
[](https://landscape.io/github/rcsb/mmtf-python/master)
[](https://github.com/rcsb/mmtf-python/) [](https://github.com/rcsb/mmtf-python/blob/master/LICENSE.txt)
[](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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size mmtf_python-1.0.6-py2.py3-none-any.whl (22.9 kB) | File type Wheel | Python version 2.7 | Upload date | Hashes View |
Filename, size mmtf-python-1.0.6.tar.gz (46.5 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for mmtf_python-1.0.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 402d170fc2f944bc9b3f7caee115db95f2cdcfaa1b8ffff5db4c799e8f471efd |
|
MD5 | 272c75ae4ff4d819ecddbd0fc6fbb90a |
|
BLAKE2-256 | 7364d5c784754742cbfb1df11ca6934d7cdea9d3864c88982e78a2783b44c707 |