Python based lipid BILayer molecular simulation analysis Toolkit¶
PyBILT is a Python toolkit developed to analyze molecular simulation trajectories of lipid bilayers systems. The toolkit includes a variety of analyses from various lipid bilayer molecular simulation publications.¶
The analyses include:
Mean Squared Displacement (MSD)
Diffusion coefficent estimators (from MSD curves) - includes Einstein relation, linear fit, and anomalous diffusion fit.
Area per lipid estimators
Displacement Vector (flow) maps and correlations
Deuterium order parameter
Mass and Electron Density Estimators
PyBILT has the following core dependencies:
Python version support¶
pybilt package has been tested using Anaconda Python 2.7, 3.6, and 3.7.
Sunsetting of Python 2¶
Please be aware that Python 2 is scheduled to be sunset on January 1 2020. You can read about it here: https://www.python.org/doc/sunset-python-2/ Parallel to the sunsetting of Python 2 many open source packages are also dropping support for Python 2 (https://python3statement.org/), including some of PyBILT’s core dependencies. As such, after January 1, 2020, PyBILT will also likely sunset its support for Python 2.7.
You can install the latest version of the
pybilt package using
pip sourced from the GitHub repo:
pip install -e git+https://github.com/LoLab-VU/PyBILT@v0.2.0#egg=pybilt
However, this will not automatically install the core dependencies. You will have to do that separately:
pip install MDAnalysis numpy scipy matplotlib seaborn six future
First make sure you have the
conda-forge channel in your channel list; that is the channel from which MDAnalysis is installed. You can use the following command to add it to the bottom of your channel list:
conda config --append channels conda-forge
Then you can install the
pybilt package from the
blakeaw Anaconda Cloud channel,
conda install -c blakeaw pybilt
The core dependencies will be automatically installed.
Recommended additional software¶
The following software is not required for the basic operation of PyBILT, but provides extra capabilities and features when installed.
pybilt test suite is designed to be run with pytest, so if you want to run the tests then you will need to install pytest.
Note that the notebooks have not been updated for Python 3 yet.
Documentation and Usage¶
Quick overview of PyBILT¶
PyBILT is composed of 2 primary analysis packages:
bilayer_analyzer – The bilayer_analyzer is an analysis package that is designed to analyze (quasi) planar lipid bilayer systems. It is accessed through the BilayerAnalyzer object, which can be imported via:
from pybilt.bilayer_analyzer import BilayerAnalyzer. The BilayerAnalyzer features automatic dynamic unwrapping of coordinates and leaflet detection. The bilayer_analyzer works on a multiple-representation model, whereby the various analyses are conducted using different representations of the bilayer lipids. Bilayer lipids can be represented using the following four representations:
Centers-of-mass – Each lipid (or selection of atoms from each lipid) is reduced to a center-of-mass.
Grid (or lipid grid) – The lipids are mapped to two-dimensional grids (one for each leaflet) in the style of the GridMAT-MD method
Vectors - Each lipid is converted to a vector representation using select reference atoms (or sets of reference atoms) that are used to compute the head and tail of the vector; e.g., a lipid tail atom to lipid head atom, or P-N vectors.
The bilayer_analyzer features various types of analyses and the use of different representations is handled internally based the requirements and design of each analysis type. See the documentation for list of analyses that can be added to intances of the BilayerAnalyzer.
mda_tools – This package includes various modules and functions for directly analyzing and operating on MDAnalysis trajectories and objects. e.g. functions to compute density profiles.
Additional packages include:
lipid_grid – The lipid grid module can be used construct “lipid grid” grid representations of lipid bilayers, which can be used to accurately estimate quantities such as area per lipid.
com_trajectory – This module can be used to construct a center of mass trajectory (COMTraj) out of an MDAnalysis trajectory, which is useful for computing quantities like mean squared displacement. The COMTraj is designed to work with bilayers.
plot_generation – This module has several pre-written plotting functions (using matplotlib and seaborn) for some of the properties that can be computed from functions in the other modules. e.g. mean squared displacement and area per lipid.
Visit the PyBILT docs on Read the Docs. Docs can also be viewed offline/locally by opening the PyBILT/docs/build/html/index.html file from the repo in a web browser; however, this build of the docs is not updated often.
If you would like to contribute directly to PyBILT’s development please
Fork the repo (https://github.com/LoLab-VU/PyBILT/fork)
Create a new branch for your feature (git checkout -b feature/foo_bar)
Create test code for your feature
Once your feature passes its own test, run all the tests using pytest (python -m pytest)
Once your feature passes all the tests, commit your changes (git commit -am ‘Add the foo_bar feature.’)
Push to the branch (git push origin feature/foo_bar)
Create a new Pull Request
A special thanks to James Pino (https://github.com/JamesPino) for his inciteful comments and suggestions that have helped improve the quality of this code, and thanks to him for pointing out some very useful coding tools.
Thanks to my advisors, Carlos F. Lopez and Arvind Ramanathan, for catalyzing this project and for providing me with the space and means to pursue it.
If you use the PyBILT software as a part of your research, please cite the its use. You can export the PyBILT software citation in your preferred format from its Zenodo DOI entry.
Also, please cite the following references as appropriate for scientific/research software used with/via PyBILT:
Packages from the SciPy ecosystem¶
These include NumPy, SciPy, and Matplotlib for which references can be obtained from: https://www.scipy.org/citing.html