sohitmiglani / LatticePy

A one-stop package for simulating biomolecules on a lattice.
MIT License
2 stars 0 forks source link

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.

GitHub Workflow Status PyPI version License PyPI - Downloads

Installation

Run the following command in your Terminal:

pip3 install 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

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 <a href="https://www.sohitmiglani.com/LatticePy_figure" target="_blank" rel="noopener noreferrer">here.

- Get important statistics

mylattice.native_contacts

20

mylattice.energy

-58.7

mylattice.non_covalent_hydrophobic_contacts

9