A package for simulating biomolecules on a lattice.
Project description
LatticePy
A python package for MCMC simulations of folding and phase separation in biomolecules on a lattice. LatticePy currently supports the simulation of amino acids and protein polymers on a lattice with any given number of units.
Installation
Stable Release
Run the following command in bash:
pip3 install LatticePy
Developers Release
Run the following command in bash:
pip3 install git+https://github.com/sohitmiglani/LatticePy#egg=LatticePy
Tutorial
- Import the package and initialize the lattice. You can customize the bounds of the lattice, the compactness energy, the beta (1/Temperature), and the lattice type.
from LatticePy import lattice
mylattice = lattice(bound=50, E_c=1.5, beta=0, lattice_type='simple_cubic')
- Add your polymer
- By a list of polarities
polymer = [-1, -1, -1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1]
mylattice.add_polymer(polymer, n_polymers=1, placement='straight') # to add it in a straight line
mylattice.add_polymer(polymer, n_polymers=1, placement='randomly') # to add it in a random fashion which may cause knots
- By sequence
sequence = 'MTKSHSEEVIVPEFNSSAKELPRPLAEKCPSIIKKFISAYDAKPDFVARSPGRVNLIGEH'
mylattice.add_protein(sequence, type='straight', n_polymers=1)
- Simulate your polymers with annealing
Change the parameters as you see fit
mylattice.simulate(n_mcmc=200000,
interval=1000,
record_intervals = True,
anneal=True,
beta_lower_bound=0,
beta_upper_bound=2,
beta_interval=0.05)
- Visualize the energy variation over all the MCMC steps
mylattice.energy_variation_graph()
- Visualize in an interactive 3-D lattice
mylattice.visualize()
You can see the interactive 3-D lattice for this run here.
- Get important statistics
mylattice.native_contacts
20
mylattice.energy
-58.7
mylattice.non_covalent_hydrophobic_contacts
9
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
latticepy-0.3.2.tar.gz
(91.6 kB
view details)
Built Distribution
latticepy-0.3.2-py3-none-any.whl
(12.6 kB
view details)
File details
Details for the file latticepy-0.3.2.tar.gz
.
File metadata
- Download URL: latticepy-0.3.2.tar.gz
- Upload date:
- Size: 91.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1820b0524735df35f0d0e553eb9343900dc11a9d3835953a59f48e8ec3b4a54f |
|
MD5 | aca4b285b2b23416460c4a8789115d50 |
|
BLAKE2b-256 | 0378463d4de4e1cdf22862d2bab7da7492f16f9e1afca83445b0faeda3c1f221 |
File details
Details for the file latticepy-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: latticepy-0.3.2-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 105c2c89739800852f181da6d1cedd606d6f0a160d7c454aad927d6942949e17 |
|
MD5 | 51a2f312e29d74c9f4f0b8a213450ad1 |
|
BLAKE2b-256 | 2dae9081f68313433a061217d1ea6c32434c57ff4dcd24fe21a3e05a356a2826 |