Skip to content

choudarykvsp/pymbd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pymbd — Many-body dispersion method

GitHub license

Python 2/3 package for calculating many-body dispersion energies.

Most functionality is implemented in the Fortran module in src/mbd.f90.

Installation

There are two basic ways how to install pymbd.

Both ways require a Fortran compiler, Lapack, CFFI, and Numpy. Optional MPI support requires mpi4py installed from source. All these need to be installed before installing pymbd.

On Ubuntu:

apt-get install gfortran libblas-dev liblapack-dev [mpi-default-dev mpi-default-bin]

On macOS:

brew install gcc [mpich]

Using pip

pip install cffi numpy [mpi4py]
pip install git+https://github.com/azag0/pymbd.git

If you have pytest installed, you can run tests with

pytest --pyargs pymbd -v --durations=3

Using Cmake

This is the recommended way for developing or if installing via pip runs into problems.

git clone https://github.com/azag0/pymbd.git && cd pymbd
mkdir build && pushd build && cmake .. && make && popd
pip install -r requirements.txt
python setup.py build_ext -i

Tests can be run with

make -C build check
pytest -v --durations=3

Usage

Pymbd doesn't have any input files, it is called directly from Python scripts.

For examples, see the tests.

About

Many-body dispersion method

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Fortran 88.1%
  • Python 10.2%
  • Other 1.7%