Skip to content
/ abipy Public
forked from abinit/abipy

Open-source library for analyzing the results produced by ABINIT

License

Notifications You must be signed in to change notification settings

GingrasO/abipy

 
 

Repository files navigation

https://travis-ci.org/abinit/abipy.svg?branch=develop https://coveralls.io/repos/github/abinit/abipy/badge.svg?branch=develop

About

AbiPy is a Python library to analyze the results produced by ABINIT, an open-source program for the ab-initio calculations of the physical properties of materials within Density Functional Theory and Many-Body perturbation theory. It also provides tools to generate input files and workflows to automate ab-initio calculations and typical convergence studies. AbiPy is interfaced with Pymatgen and this allows users to benefit from the different tools and python objects available in the pymatgen ecosystem

Official documentation of the stable version available at the abipy docpage.

AbiPy can be used in conjunction with matplotlib, pandas, ipython and jupyter thus providing a powerful and user-friendly environment for data analysis and visualization. Check out the list of plotting scripts available in our examples/plot gallery. To learn more about the integration between jupyter and AbiPy, visit our collection of notebooks and the AbiPy lessons.

AbiPy supports both Python 2.7 as well as Python >= 3.4. Python 2.7 is more intensively tested than py3k especially at the level of workflows so we still recommend py2.7 if you plan to run automatic calculations with AbiPy.

Note that the majority of the post-processing tools available in AbiPy require output files in netcdf format so we strongly suggest to compile Abinit with netcdf support (use --with_trio_flavor="netcdf-fallback" at configure time to activate the internal netcdf library, to link Abinit against an external netcdf library please consult the configuration examples provided by abiconfig.

AbiPy is free to use. However, we also welcome your help to improve this library by making your own contributions. Please report any bugs and issues at AbiPy's Github page.

Getting AbiPy

Stable version

The version at the Python Package Index (PyPI) is always the latest stable release that can be installed with:

pip install abipy

Note that you may need to install pymatgen and other critical dependencies manually. In this case, please consult the detailed installation instructions provided by the pymatgen howto to install pymatgen and then follow the instructions in our howto.

The installation process is greatly simplified if you install the required python packages through one of the following python distributions:

We routinely use conda to test new developments with multiple versions of Python and multiple virtual environments. The anaconda distribution already provides the most critical dependencies (matplotlib, scipy, numpy) in the form of pre-compiled packages and netcdf4 can be easily installed with:

conda install netcdf4

Additional information on the steps required to install AbiPy with anaconda are available in the anaconda howto. We are also working with the Spack community to provide packages for AbiPy and Abinit in order to facilitate the installation on large supercomputing centers.

Optional dependencies

Optional libraries that are required if you need certain features:

ipython

Required to interact with the AbiPy/Pymatgen objects in the ipython shell (strongly recommended, already provided by conda).

jupyter and nbformat

Required to generate jupyter notebooks. Install these two packages with conda install jupyter nbformat or use pip. Recommended but you will also need a web browser to open the notebook.

wxPython and wxmplot for the GUI

Use conda install wxpython The directory abipy.gui.demos contains demos that can be used to test the installation. of the GUI (run the script runall.py to have an overview of the different graphical interfaces).

Developmental version

Getting the developmental version of AbiPy is easy. You can clone it from the github repository using this command:

$ git clone https://github.com/abinit/abipy

After cloning the repository, type:

$ python setup.py install

or alternately:

$ python setup.py develop

to install the package in developmental mode (this is the recommended approach, especially if you are planning to implement new features).

The documentation of the developmental version is hosted on github pages.

The Github version include test files for complete unit testing. To run the suite of unit tests, make sure you have pytest (recommended) or nose installed and then just type:

$ pytest

or:

$ nosetests

in the AbiPy root directory. Unit tests require two additional packages that can be installed with:

$ pip install nose-exclude scripttest

Note that several unit tests check the integration between AbiPy and Abinit. In order to run the tests, you need a working set of Abinit executables and a manager.yml configuration file. A pre-compiled sequential version of Abinit for Linux and OSx can be installed directly from the anaconda cloud with:

$ conda install abinit -c abinit

For further information on the syntax of the configuration file, please consult the workflows section.

Contributing to AbiPy is relatively easy. Just send us a pull request. When you send your request, make develop the destination branch on the repository AbiPy uses the Git Flow branching model. The develop branch contains the latest contributions, and master is always tagged and points to the latest stable release.

Using AbiPy

Basic usage

There are a variety of ways to use AbiPy, and most of them are illustrated in the abipy/examples directory. Below is a brief description of the different directories found there:

  • plot

    scripts showing how to produce plots with matplotlib

  • notebooks

    jupyter notebooks (use jupyter notebook FILE to open the notebook in your browser, use conda install jupyter to install the package)

The directory abipy/data/runs contains python scripts that can be used to automate typical ab-initio calculations.

Command line tools

The following scripts can be invoked directly from the terminal:

  • abiopen.py
  • abistruct.py
  • abicomp.py
  • abicheck.py

For further information, please consult the official documentation.

Advanced Usage

Users are strongly encouraged to explore the detailed api docs.

License

AbiPy is released under the GNU GPL license. For more details see the LICENSE file.

About

Open-source library for analyzing the results produced by ABINIT

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Jupyter Notebook 75.2%
  • Python 24.7%
  • Other 0.1%