Skip to main content

Investigate molecular dynamics with elastic network models

Project description

Springcraft

Springcraft is a Biotite extension package, that allows the analysis of AtomArray objects via Elastic Network Models (ENMs). An ENM can be thought of as a system that connects residues via springs: Interaction of nearby residues is governed by a harmonic potential, with the native (input) conformation representing the energy minimum. Normal mode analysis allows the researcher to investigate global functional movements of a protein in a fast coarse-grained manner.

Installation

Springcraft can be installed via

$ pip install springcraft

or

$ conda install -c conda-forge springcraft

You can also install Springcraft from source. The package uses Poetry for building distributions. Via PEP 517 it is possible to install the package from local source code via pip:

$ git clone https://github.com/biotite-dev/springcraft.git
$ pip install ./springcraft

Example

import numpy as np
import biotite.structure.io.pdbx as pdbx
import springcraft


pdbx_file = pdbx.PDBxFile.read("path/to/1l2y.cif")
atoms = pdbx.get_structure(pdbx_file, model=1)
ca = atoms[(atoms.atom_name == "CA") & (atoms.element == "C")]
ff = springcraft.InvariantForceField(cutoff_distance=7.0)
gnm = springcraft.GNM(ca, ff)
kirchhoff = gnm.kirchhoff

np.set_printoptions(linewidth=100)
print(kirchhoff)

Output:

[[ 4. -1. -1. -1. -1.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.]
 [-1.  6. -1. -1. -1. -1.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0. -1.  0.]
 [-1. -1.  7. -1. -1. -1. -1.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0. -1.  0.]
 [-1. -1. -1.  7. -1. -1. -1. -1.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.]
 [-1. -1. -1. -1.  8. -1. -1. -1. -1.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.]
 [ 0. -1. -1. -1. -1.  9. -1. -1. -1.  0. -1.  0.  0.  0.  0.  0.  0. -1.  0.  0.]
 [ 0.  0. -1. -1. -1. -1.  8. -1. -1. -1. -1.  0.  0.  0.  0.  0.  0.  0.  0.  0.]
 [ 0.  0.  0. -1. -1. -1. -1.  7. -1. -1. -1.  0.  0.  0.  0.  0.  0.  0.  0.  0.]
 [ 0.  0.  0.  0. -1. -1. -1. -1.  7. -1. -1.  0.  0. -1.  0.  0.  0.  0.  0.  0.]
 [ 0.  0.  0.  0.  0.  0. -1. -1. -1.  7. -1. -1. -1. -1.  0.  0.  0.  0.  0.  0.]
 [ 0.  0.  0.  0.  0. -1. -1. -1. -1. -1.  8. -1. -1. -1.  0.  0.  0.  0.  0.  0.]
 [ 0.  0.  0.  0.  0.  0.  0.  0.  0. -1. -1.  7. -1. -1. -1. -1. -1.  0.  0.  0.]
 [ 0.  0.  0.  0.  0.  0.  0.  0.  0. -1. -1. -1.  5. -1. -1.  0.  0.  0.  0.  0.]
 [ 0.  0.  0.  0.  0.  0.  0.  0. -1. -1. -1. -1. -1.  7. -1. -1.  0.  0.  0.  0.]
 [ 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0. -1. -1. -1.  4. -1.  0.  0.  0.  0.]
 [ 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0. -1.  0. -1. -1.  5. -1. -1.  0.  0.]
 [ 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0. -1.  0.  0.  0. -1.  4. -1. -1.  0.]
 [ 0.  0.  0.  0.  0. -1.  0.  0.  0.  0.  0.  0.  0.  0.  0. -1. -1.  5. -1. -1.]
 [ 0. -1. -1.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0. -1. -1.  5. -1.]
 [ 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0. -1. -1.  2.]]

Project details


Download files

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

Source Distribution

springcraft-0.2.0.tar.gz (38.0 kB view details)

Uploaded Source

Built Distribution

springcraft-0.2.0-py3-none-any.whl (40.1 kB view details)

Uploaded Python 3

File details

Details for the file springcraft-0.2.0.tar.gz.

File metadata

  • Download URL: springcraft-0.2.0.tar.gz
  • Upload date:
  • Size: 38.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.9.12

File hashes

Hashes for springcraft-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b4c0f67a02a4d600ac9ea0209b054c490799fba4e70fb6d5bb431c3645d57f9e
MD5 a590706d71eece8f02b934d0d49df20b
BLAKE2b-256 7550977d0d5921f5829397588e5c61df989900629230ec33e6739f3c414b0d90

See more details on using hashes here.

File details

Details for the file springcraft-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: springcraft-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 40.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.9.12

File hashes

Hashes for springcraft-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c7e4234f3da3f000cfbc2bebb3f59cc7960ed9a3d4589974ccabe019c80ced7
MD5 f0891015c2fa63669bcb59fb419ddf1e
BLAKE2b-256 82c76e58a26cd4e8fcb718a9b42f2bfab77f96cb0f4025fd240d20e1120ef79d

See more details on using hashes here.

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