Basic Utilities for Protein Structure Data
Project description
PDBBasic
Basic Functions for Protein Structure Data
Usage
import numpy as np
import torch
import pdbbasic as pdbb
# read PDB file
coord1, info1 = pdbb.readpdb('filename.pdb', with_info=True)
ca1 = coord1[:,1]
ca2 = pdbb.readpdb('filename.pdb', CA_only=True)
# calc RMSD
rmsd_np = pdbb.rmsd(ca1, ca2)
# Kabsch superposition
coo_sup1, coo_sup2 = pdbb.kabsch(ca1, ca2)
# torsion angle
torsion = pdbb.torsion_angles(coord1)
# distance matrix
distmat_within = pdbb.distance_matrix(ca1)
distmat_between = pdbb.distance_matrix(ca1, ca2)
# torch Tensor is also applicable
rmsd_torch = pdbb.rmsd(torch.Tensor(ca1), torch.Tensor(ca2))
# batched calculation is applicable
ca_batch1 = np.repeat(np.expand_dims(ca1, axis=0), 100, axis=0)
ca_batch2 = np.repeat(np.expand_dims(ca2, axis=0), 100, axis=0)
bb_batch = np.repeat(np.expand_dims(coord1, axis=0), 100, axis=0)
rmsd_batch = pdbb.rmsd(ca_batch1, ca_batch2)
sup_batch1, sup_batch2 = pdbb.kabsch(ca_batch1, ca_batch2)
torsion_batch = pdbb.torsion_angles(bb_batch)
distmat_batch = pdbb.distance_matrix(ca_batch1)
# all against all RMSD calculation
rmsd_matrix = pdbb.rmsd_many_vs_many(ca_batch1)
Requirement
- python3
- numpy
- pandas
- pytorch
- einops
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file pdbbasic-0.4.0.post1.dev0-py3-none-any.whl
.
File metadata
- Download URL: pdbbasic-0.4.0.post1.dev0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb1e537790ab25fb7f0c6317300fbee234b5f8789a326f89b9333b1172196e44 |
|
MD5 | 958294ed37e5dadcc482b2f1c0b76f5c |
|
BLAKE2b-256 | b8e94c75486003417be173cd6e12529b724f399c9aa326c027dbdb7071030fc6 |