Skip to main content

tmscoring

Python implementation of the TMscore program to compare structures of the same protein.

Usage:

We provide three classes, TMscoring, Sscoring, and RMSDscoring, that only differ in their default optimisation score.

They are initialised with the file paths to two PDB files:

alignment = tmscoring.TMscore('structure1.pdb', 'structure2.pdb')

# Find the optimal alignment
alignment.optimise()

# Get the TM score:
alignment.tmscore(**alignment.get_current_values())

# Get the TM local scores:
alignment.tmscore_samples(**alignment.get_current_values())

# RMSD of the protein aligned according to TM score
alignment.rmsd(**alignment.get_current_values())

# Returns the transformation matrix between both structures:
alignment.get_matrix(**alignment.get_current_values())

# Save the aligned files:
alignment.write(outputfile='aligned.pdb', append=True)

The structures can be matched by index (default), or performing a global sequence alignment with Smith-Waterman using a match score of 2, mismatch of -1, a gap penalty of -0.5 for opening and -0.1 for extending.

Utility functions:

get_tm(path_to_pdb1, path_to_pdb2) and get_rmsd(pdb1, pdb2) are simple wrappers that compute TM score or RMSD.

What is different?

tmscoring is a Python library that conveniently exposes all the necessary variables. This removes the necessity to parse files.

Also, the minimisation engine is MINUIT's Migrad, a powerful and robust derivative-free minimisation algorithm, heavily tested by particle physicists for decades. In our testing, tmscoring yields the same or slightly better scores than upstream TMscore.

Metadata

Release files for tmscoring 0.4.post0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tmscoring 0.4.post0
File Size Uploaded Provenance
tmscoring-0.4.post0.tar.gz 5.3 kB Without provenance Details

Release files / tmscoring-0.4.post0.tar.gz

Download URL tmscoring-0.4.post0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7cabd668e4db548719e840ceb188b197f93cd77cb6c6db81a22ed045300e92be
BLAKE2b-256 checksum
How to use checksums
7cebd8713651b8b2236b3fe1459dc410fdc409595f43bda2f94a9df28d0977b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.6.8

Security for tmscoring 0.4.post0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page