Skip to main content

Python bindings around the TM-align code for structural alignment of proteins

Project description

['TM-Tools\n', '========\n', '\n', 'Python bindings for the TM-align algorithm and code developed by Zhang et\n', 'al for protein structure comparison.\n', '\n', '\n', 'Installation\n', '------------\n', '\n', 'From the console, simply run\n', 'console\n', ' pip install git+https://github.com/jvkersch/tmtools.git#egg=tmtools\n', '\n', '\n', 'The package supports Python 3.6 and up. You will need a fairly recent version\n', 'of pip, as well as a C++ compiler that supports C++ 14.\n', '\n', 'This package supports Linux, macOS, and Windows.\n', '\n', 'Usage\n', '-----\n', '\n', 'The function tmtools.tm_align takes two NumPy arrays with coordinates for the\n', 'residues (with shape (N, 3)) and two sequences of peptide codes, performs the\n', 'alignment, and returns the optimal rotation matrix and translation, along with\n', 'the TM score:\n', 'python\n', '>>> import numpy as np\n', '>>> from tmtools import tm_align\n', '>>>\n', '>>> coords1 = np.array(\n', '... [[1.2, 3.4, 1.5],\n', '... [4.0, 2.8, 3.7],\n', '... [1.2, 4.2, 4.3],\n', '... [0.0, 1.0, 2.0]])\n', '>>> coords2 = np.array(\n', '... [[2.3, 7.4, 1.5],\n', '... [4.0, 2.9, -1.7],\n', '... [1.2, 4.2, 4.3]])\n', '>>>\n', '>>> seq1 = "AYLP"\n', '>>> seq2 = "ARN"\n', '>>>\n', '>>> res = tm_align(coords1, coords2, seq1, seq2)\n', '>>> res.t\n', 'array([ 2.94676159, 5.55265245, -1.75151383])\n', '>>> res.u\n', 'array([[ 0.40393231, 0.04161396, -0.91384187],\n', ' [-0.59535733, 0.77040999, -0.22807475],\n', ' [ 0.69454181, 0.63618922, 0.33596866]])\n', '>>> res.tm_norm_chain1\n', '0.3105833326322145\n', '>>> res.tm_norm_chain2\n', '0.414111110176286\n', '\n', '\n', 'If you already have some PDB files, you can use the functions from tmalign.io\n', 'to retrieve the coordinate and sequence data:\n', 'python\n', '>>> from tmtools.io import get_structure, get_residue_data\n', '>>> from tmtools.testing import get_pdb_path\n', '>>> s = get_structure(get_pdb_path("2gtl"))\n', '>>> s\n', '<Structure id=2gtl>\n', '>>> chain = next(s.get_chains())\n', '>>> coords, seq = get_residue_data(chain)\n', '>>> seq\n', "'DCCSYEDRREIRHIWDDVWSSSFTDRRVAIVRAVFDDLFKHYPTSKALFERVKIDEPESGEFKSHLVRVANGLKLLINLLDDTLVLQSHLGHLADQHIQRKGVTKEYFRGIGEAFARVLPQVLSCFNVDAWNRCFHRLVARIAKDLP'\n", '>>> coords.shape\n', '(147, 3)\n', '\n', '\n', 'These functions are light-weight wrappers around BioPython.\n', '\n', 'Credits\n', '-------\n', '\n', 'This package arose out of a personal desire to better understand both the\n', 'TM-score algorithm and the\n', 'pybind11 library to\n', 'interface with C++ code. At this point in time it contains no original research\n', 'code.\n', '\n', 'If you use the package for research, you should cite the original TM-score\n', 'papers:\n', '\n', '- Y. Zhang, J. Skolnick, Scoring function for automated assessment of protein\n', ' structure template quality, Proteins, 57: 702-710 (2004).\n', '- J. Xu, Y. Zhang, How significant is a protein structure similarity with\n', ' TM-score=0.5? Bioinformatics, 26, 889-895 (2010).\n', '\n', 'License\n', '-------\n', '\n', 'The original TM-align software (version 20210224, released under the MIT\n', 'license) is bundled with this repository (src/extern/TMalign.cpp). Some small\n', 'tweaks had to be made to compile the code on macOS and to embed it as a\n', 'library. This modifications are also released under the MIT license.\n', '\n', 'The rest of the codebase is released under the GPL v3 license.\n']

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

tmtools-0.0.1-cp310-cp310-win_amd64.whl (1.5 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

tmtools-0.0.1-cp310-cp310-win32.whl (1.5 MB view hashes)

Uploaded CPython 3.10 Windows x86

tmtools-0.0.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

tmtools-0.0.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl (1.6 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.12+ i686

tmtools-0.0.1-cp39-cp39-win_amd64.whl (1.5 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

tmtools-0.0.1-cp39-cp39-win32.whl (1.5 MB view hashes)

Uploaded CPython 3.9 Windows x86

tmtools-0.0.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

tmtools-0.0.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl (1.6 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

tmtools-0.0.1-cp39-cp39-macosx_11_0_arm64.whl (1.6 MB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

tmtools-0.0.1-cp39-cp39-macosx_10_9_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

tmtools-0.0.1-cp38-cp38-win_amd64.whl (1.5 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

tmtools-0.0.1-cp38-cp38-win32.whl (1.5 MB view hashes)

Uploaded CPython 3.8 Windows x86

tmtools-0.0.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

tmtools-0.0.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl (1.6 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

tmtools-0.0.1-cp38-cp38-macosx_11_0_arm64.whl (1.6 MB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

tmtools-0.0.1-cp38-cp38-macosx_10_9_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

tmtools-0.0.1-cp37-cp37m-win_amd64.whl (1.5 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

tmtools-0.0.1-cp37-cp37m-win32.whl (1.5 MB view hashes)

Uploaded CPython 3.7m Windows x86

tmtools-0.0.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

tmtools-0.0.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl (1.6 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

tmtools-0.0.1-cp37-cp37m-macosx_10_9_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

tmtools-0.0.1-cp36-cp36m-win_amd64.whl (1.5 MB view hashes)

Uploaded CPython 3.6m Windows x86-64

tmtools-0.0.1-cp36-cp36m-win32.whl (1.5 MB view hashes)

Uploaded CPython 3.6m Windows x86

tmtools-0.0.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

tmtools-0.0.1-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.whl (1.6 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ i686

tmtools-0.0.1-cp36-cp36m-macosx_10_9_x86_64.whl (1.6 MB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

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