HPlattice

HPlattice is a Python library for the HP lattice model of Dill and Chan. It is ideally used as a teaching tool, or as a way to quickly prototype 2D lattice simulation ideas with easy-to-use extensible code. HPlattice can either 1) enumerate conformations, or 2) perform replica exchange monte carlo “dynamics” for 2-dimensional, square-lattice “bead-on-a-string” type chains.

The easiest way to get started with HPlattice is to download and install the Anaconda Python distribution. After installing Anaconda or another Python distribution of your choice, here are the steps for installing HPlattice:

  1. Download Bento
  2. Install Bento
unzip Bento-master.zip
cd Bento-master
python bootstrap.py
./bentomaker configure
./bentomaker build
./bentomaker install
  1. Download HPlattice (or visit the GitHub Repo)
  2. Install HPlattice
tar xzf hp-lattice-1.0.tar.gz
cd hp-lattice-1.0
tar xzf HP-sequences.tgz # this step may take 30min to complete
cd hplattice/util
python setup.py build_ext --inplace
cd ../..
bentomaker install
  1. Run unit tests (optional)
conda install pytest # (or pip install pytest if Anaconda not installed)
py.test hplattice
  1. Try examples
cd examples/enumerate
python enumerate.py
cd ../mcrex
python mcrex.py

Indices and tables