liedllab / X-Entropy

This package is meant to calculate the dihedral entropy of a biomolecule. However, it can also calculate the entropy of any binnable data or simply the KDE of that data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

X-Entropy

C++:CMake Python:Pip

License: MIT

This library is primarily meant to calculate dihedral entropies from MD simulation data. For this, we use a KDE with automatic bandwidth selection as suggested by Z. Botev et al. We tried to keep the package as generalized as possible, therefore, the package can be used to calculate the entropy of any data, or also to simply calculate the KDE.

Installation

Using Conda

This is probably the easiest way to install this package. After cloning this repository (or downloading the conda directory directly), you can easily install the package using conda. Be aware that in this case you need Python 3.8 installed for Linux and MacOS and Python 3.7 for Windows.

conda install -c ${ABSOLUTE_PATH_TO_XENTROPY_REPOSITORY}/conda xentropy

This should work for Windows 10, Linux, MacOS. Be aware, that for Windows you need to specify the full path to the conda directory. If it for some reason does not work, you might have to build the conda installer yourself. If you want to do that, you need to install conda-build and conda-verify and then just build the installer in the xentropy root diretory with

conda-build package

On MacOS you will need to follow the instructions on https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html#macos-sdk before building the package.

Building with pip

Be aware that you are responsible for the dependencies, if you decide to build this way.

Please ensure that you have a python version higher than 3.3 for this package to work properly. First change to the directory containing the entropy module. The package can then be installed via

pip install .

Building with setup.py

Be aware that you are responsible for the dependencies, if you decide to build this way.

python setup.py build
python setup.py install

Import

After this, the package is callable by using

import xentropy

Dependencies

  • openmp
  • fftw3
  • numpy
  • Cython

If installed using conda, these are added automatically.

Usage

For usage examples, please check the examples folder.

Contributors

  • Johannes Kraml
  • Patrick Quoika
  • Florian Hofer

Bugs

As of now, there are no known bugs, if you find any, please contact me.

johannes@kraml.dev

License Info

This module was parallelized using the openmp toolkit (license: https://github.com/llvm-mirror/openmp/blob/master/LICENSE.txt). Parts of the module use the fftw3 library.

When using the code in a publication, please cite: Johannes Kraml, Florian Hofer, Patrick K. Quoika, Anna S. Kamenik, and Klaus R. Liedl Journal of Chemical Information and Modeling 2021 61 (4), 1533-1538 doi: 10.1021/acs.jcim.0c01375

The KDE in this package is based on the publication by Z. Botev: Kernel density estimation via diffusion Z. I. Botev, J. F. Grotowski, and D. P. Kroese (2010) Annals of Statistics, Volume 38, Number 5, pages 2916-2957 doi:10.1214/10-AOS799.

About

This package is meant to calculate the dihedral entropy of a biomolecule. However, it can also calculate the entropy of any binnable data or simply the KDE of that data.

License:MIT License


Languages

Language:Python 43.9%Language:C++ 35.3%Language:HTML 17.8%Language:Cython 1.8%Language:CMake 1.1%Language:Batchfile 0.1%Language:C 0.0%Language:Shell 0.0%