Open-source library for analyzing the results produced by ABINIT

Overview
Package PyPi version Download with Anaconda Supported versions
Continuous Integration Travis status Coverage status
Documentation AbiPy Documentation Launch nbviewer Launch binder

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.

The official documentation is hosted on github pages. Check out our gallery of plotting scripts and the gallery of AbiPy workflows.

AbiPy can be used in conjunction with matplotlib, pandas, scipy, seaborn, ipython and jupyter notebooks thus providing a powerful and user-friendly environment for data analysis and visualization.

To learn more about the integration between jupyter and AbiPy, visit our collection of notebooks or click the Launch Binder badge to start a Docker image with Abinit, AbiPy and all the other python dependencies required to run the code inside the jupyter notebooks. The notebook will be opened in your browser after building.

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.

Important

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" 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).

Links to talks

This section collects links to some of the talks given by the AbiPy developers.

Getting AbiPy

Stable version

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

pip install abipy --user

Note that you may need to install some optional 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 Anaconda (or conda). See Installing conda to install conda itself. We routinely use conda to test new developments with multiple Python versions and multiple virtual environments. The anaconda distribution already provides the most critical dependencies (matplotlib, scipy, numpy, netcdf4-python) in the form of pre-compiled packages that can be easily installed with e.g.:

conda install numpy scipy netcdf4

Create a new conda environment (let's call it abienv) based on python3.6 with:

conda create --name abienv python=3.6

and activate it with:

conda activate abienv

You should see the name of the conda environment in the shell prompt.

Now add conda-forge to your conda channels with:

conda config --add channels conda-forge

This is the channel from which we will download pymatgen, abipy and abinit.

Finally, install AbiPy with:

conda install abipy

Additional information on the steps required to install AbiPy with anaconda are available in the anaconda howto.

We are also collaborating with the spack community to provide packages for AbiPy and Abinit in order to facilitate the installation on large supercomputing centers.

Developmental version

Getting the developmental version of AbiPy is easy. Clone the github repository with:

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

For pip, use:

pip install -r requirements.txt
pip install -r requirements-optional.txt

If you are using conda (see Installing conda to install conda itself), create a new environment (abienv) based on python3.6 with:

conda create -n abienv python=3.6
source activate abienv

Add conda-forge, and abinit to your channels with:

conda config --add channels conda-forge
conda config --add channels abinit

and install the AbiPy dependencies with:

conda install --file ./requirements.txt
conda install --file ./requirements-optional.txt

The second command is needed for Jupyter only. Once the requirements have been installed (either with pip or conda), execute:

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.

Note, however, that the developmental version of AbiPy is kept in sync with the developmental version of pymatgen thus `python setup.py develop` may try to download new versions from the PyPi portal and then fail with e.g. the error message:

...
processing dependencies for abipy==0.6.0.dev0
error: scipy 1.0.0 is installed but scipy>=1.0.1 is required by {'pymatgen'}

due to inconsistent dependencies. To solve the problem, use conda to update scipy to a version >= 1.0.1 with:

conda install "scipy>=1.0.1"

then issue again python setup.py develop. If this fails, supposing you were upgrading abipy inside an already existing conda environment, try to restart by creating from scratch a fresh conda environment, see above.

Use:

conda info pymatgen

to display information about the installed version of pymatgen.

Also note that the BLAS/Lapack libraries provided by conda have multithreading support activated by default. Each process will try to use all of the cores on your machine, which quickly overloads things if there are multiple processes running. (Also, this is a shared machine, so it is just rude behavior in general). To disable multithreading, add these lines to your ~/.bash_profile:

export OPENBLAS_NUM_THREADS=1
export OMP_NUM_THREADS=1

and then activate these settings with:

source ~/.bash_profile

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

pytest

in the AbiPy root directory. A quicker check might be obtained with:

pytest abipy/core/tests -v

Unit tests require scripttest that can be installed with:

pip install scripttest

Two tests rely on the availability of a pymatgen PMG_MAPI_KEY <http://pymatgen.org/usage.html#setting-the-pmg-mapi-key-in-the-config-file> in ~/.pmgrc.yaml.

Note that several unit tests check the integration between AbiPy and Abinit. In order to run the tests, you will need a working set of Abinit executables and a manager.yml configuration file.

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.

Installing Abinit

One of the big advantages of conda over pip is that conda can also install libraries and executables written in Fortran. A pre-compiled sequential version of Abinit for Linux and OSx can be installed directly from the conda-forge channel with:

conda install abinit -c conda-forge

Otherwise, follow the usual abinit installation instructions, and make sure abinit can be run with the command:

abinit --version

Configuration files for Abipy

In order to run the Abipy tests, you will need a manager.yml configuration file. For a detailed description of the syntax used in this configuration file please consult the TaskManager documentation.

At this stage, for the purpose of checking the installation, you might take the shell_nompi_manager.yml file from the abipy/data/managers directory of this repository, and copy it with new name manager.yml to your $HOME/.abinit/abipy directory. Open this file and make sure that the pre_run section contains the shell commands needed to setup the environment before launching Abinit (e.g. Abinit is in $PATH), unless it is available from the environment (e.g. conda).

To complete the configuration files for Abipy, you might also copy the simple_scheduler.yml file from the same directory, and copy it with name scheduler.yml. Modifications are needed if you are developer.

Checking the installation

Now open the python interpreter and import the following three modules to check that the python installation is OK:

import spglib
import pymatgen
from abipy import abilab

then quit the interpreter.

For general information about how to troubleshoot problems that may occur at this level, see the :ref:`troubleshooting` section.

The Abinit executables are placed inside the anaconda directory associated to the abienv environment:

which abinit
/Users/gmatteo/anaconda3/envs/abienv/bin/abinit

To perform a basic validation of the build, execute:

abinit -b

Abinit should echo miscellaneous information, starting with:

DATA TYPE INFORMATION:
REAL:      Data type name: REAL(DP)
           Kind value:      8
           Precision:      15

and ending with:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Default optimizations:
  --- None ---


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

If successful, one can start to use the AbiPy scripts from the command line to analyze the output results. Execute:

abicheck.py

You should see (with minor changes):

$ abicheck.py
AbiPy Manager:
[Qadapter 0]
ShellAdapter:localhost
Hardware:
   num_nodes: 2, sockets_per_node: 1, cores_per_socket: 2, mem_per_node 4096,
Qadapter selected: 0

Abinitbuild:
Abinit Build Information:
    Abinit version: 8.8.2
    MPI: True, MPI-IO: True, OpenMP: False
    Netcdf: True

Abipy Scheduler:
PyFlowScheduler, Pid: 19379
Scheduler options: {'weeks': 0, 'days': 0, 'hours': 0, 'minutes': 0, 'seconds': 5}

Installed packages:
Package         Version
--------------  ---------
system          Darwin
python_version  3.6.5
numpy           1.14.3
scipy           1.1.0
netCDF4         1.4.0
apscheduler     2.1.0
pydispatch      2.0.5
yaml            3.12
pymatgen        2018.6.11


Abipy requirements are properly configured

If the script fails with the error message:

Abinit executable does not support netcdf
Abipy requires Abinit version >= 8.0.8 but got 0.0.0

it means that your environment is not property configured or that there's a problem with the binary executable. In this case, look at the files produced in the temporary directory of the flow. The script reports the name of the directory, something like:

CRITICAL:pymatgen.io.abinit.tasks:Error while executing /var/folders/89/47k8wfdj11x035svqf8qnl4m0000gn/T/tmp28xi4dy1/job.sh

Check the job.sh script for possible typos, then search for possible error messages in run.err.

The last test consists in executing a small calculation with AbiPy and Abinit. Inside the shell, execute:

abicheck.py --with-flow

to run a GS + NSCF band structure calculation for Si. If the software stack is properly configured, the output should end with:

Work #0: 
  , Finalized=True
  Finalized works are not shown. Use verbose > 0 to force output.

all_ok reached

Submitted on: Sat Jul 28 09:14:28 2018
Completed on: Sat Jul 28 09:14:38 2018
Elapsed time: 0:00:10.030767
Flow completed successfully

Calling flow.finalize()...

Work #0: 
  
   , Finalized=True
  Finalized works are not shown. Use verbose > 0 to force output.

all_ok reached


Test flow completed successfully

  
 

Great, if you've reached this part it means that you've installed AbiPy and Abinit on your machine! We can finally start to run the scripts in this repo or use one of the AbiPy script to analyze the results.

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:

  • examples/plot

    Scripts showing how to read data from netcdf files and produce plots with matplotlib

  • examples/flows.

    Scripts showing how to generate an AbiPy flow, run the calculation and use ipython to analyze the data.

Additional jupyter notebooks with the Abinit tutorials written with AbiPy are available in the abitutorial repository.

Users are strongly encouraged to explore the detailed API docs.

Command line tools

The following scripts can be invoked directly from the terminal:

  • abiopen.py Open file inside ipython.
  • abistruct.py Swiss knife to operate on structures.
  • abiview.py Visualize results from file.
  • abicomp.py Compare results extracted from multiple files.
  • abicheck.py Validate integration between AbiPy and Abinit
  • abirun.py Execute AbiPy flow from terminal.
  • abidoc.py Document Abinit input variables and Abipy configuration files.
  • abinp.py Build input files (simplified interface for the AbiPy factory functions).

Use SCRIPT --help to get the list of supported commands and SCRIPT COMMAND --help to get the documentation for COMMAND.

For further information, please consult the scripts docs section.

Installing conda

A brief install guide, in case you have not yet used conda ... For a more extensive description, see our Anaconda Howto.

Download the miniconda installer. Select python3.6 and the version corresponding to your operating system.

As an example, if you are a Linux user, download and install miniconda on your local machine with:

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh

while for MacOSx use:

curl -o https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash Miniconda3-latest-MacOSX-x86_64.sh

Answer yes to the question:

Do you wish the installer to prepend the Miniconda3 install location
to PATH in your /home/gmatteo/.bashrc ? [yes|no]
[no] >>> yes

Source your .bashrc file to activate the changes done by miniconda to your $PATH:

source ~/.bashrc

Troubleshooting

GLIBC error

The python interpreter may raise the following exception when importing one of the pymatgen modules:

from pymatgen.util.coord import pbc_shortest_vectors
File "/python3.6/site-packages/pymatgen/util/coord.py", line 11, in 
  
from . import coord_cython as cuc
ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /python3.6/site-packages/pymatgen/util/coord_cython.cpython-36m-x86_64-linux-gnu.so)`

 

This means that the pre-compiled version of pymatgen is not compatible with the GLIBC version available on your machine. To solve the problem, we suggest to build and install pymatgen from source using the local version of GLIBC and the gcc compiler. In the example below, we use a conda environment to install most of the dependencies with the exception of pymatgen and abipy.

Let's start by creating a conda environment with:

conda create -n glibc_env python=3.6
source activate glibc_env
conda config --add channels conda-forge

Use pip to install spglib:

pip install spglib

and try to import spglib inside the python terminal.

Download the pymatgen repository from github with:

git clone https://github.com/materialsproject/pymatgen.git
cd pymatgen

If git is not installed, use conda install git

Now use conda to install the pymatgen requirements listed in requirements.txt but before that make sure that gcc is in $PATH. If you are working on a cluster, you may want to issue:

module purge

to avoid compiling C code with the intel compiler (it's possible to use icc but gcc is less problematic).

Remove the line:

enum34==1.1.6; python_version < '3.4'

from requirements.txt as this syntax is not supported by conda then issue:

conda install -y --file requirements.txt

At this point, we can build pymatgen and the C extensions:

python setup.py install

then cd to another directory (important) and test the build inside the python terminal with:

import spglib
import pymatgen

Finally, we can install Abipy from source with:

git clone https://github.com/abinit/abipy.git
cd abipy && conda install -y --file ./requirements.txt

License

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

Comments
  • Nosetests fail kpoint test

    Nosetests fail kpoint test

    Hello,

    I find that nosetests fail to execute a kpoint test, as you can see below.

    • Is this a known issue? Is there a known fix?
    • Are others experiencing this problem, or am I seeing malicious version+compilation+machine+OS interference?
    • Is my analysis below correct?

    Cheers!

    Analysis:

    My limited understanding of ABIPY leads me to think that the error is due to the fact that the decorator @returns_None_onfail on the reading routines in class KpointsReaderMixin isn't catching undefined variables in the netcdf file.

    ABIPY tries to determine if a file contains a PATH or an IRR. BZ, but assumes an IRR. BZ by default. All variables are defined in the netcdf file, but when a PATH is present, the variables monkhorst_pack_folding, kpoint_grid_shift and kpoint_grid_vectors are not set.

    ABIPY fails to catch that these variables are not set, reads their values on disk, which I guess are a set of binary zeros (for signed int32, - 1/2 (2**32)+1 = -2147483647, a value that appears below). ABIPY then fails to realize it is dealing with a PATH, which crashes the nosetest!

    Failure output:

    ====================================================================FAIL: Test the reading of Kpoints from netcdf files.

    Traceback (most recent call last): File ".../abipy/abipy/core/tests/test_kpoints.py", line 167, in test_reading self.assertTrue(kpoints.is_path) AssertionError: False is not true -------------------- >> begin captured stdout << --------------------- About to read file: .../abipy/abipy/data/runs/data_si_ebands/outdata/si_scf_GSR.nc ksampling {'kptopt': None, 'shifts': array([ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36]), 'kptrlatt': array([[ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36], [ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36], [ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36]]), 'mpdivs': array([8, 8, 8], dtype=int32)} About to read file: .../abipy/abipy/data/runs/data_si_ebands/outdata/si_nscf_GSR.nc ksampling {'kptopt': None, 'shifts': array([ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36]), 'kptrlatt': array([[ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36], [ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36],

    [ 9.96920997e+36, 9.96920997e+36, 9.96920997e+36]]), 'mpdivs': array([-2147483647, -2147483647, -2147483647], dtype=int32)}

    enhancement portability problem 
    opened by rousseab 11
  • 'module' object has no attribute 'ebands'

    'module' object has no attribute 'ebands'

    I am trying to run the post process scripts (with AbinitGUI) to create Density of States and the band structure, and I encountered this error:

    bsanddos(args.inputDos,args.inputBand,args.outputDos,args.outputBand,args.outputBoth,args.titleBS,args.titleDOS,args.show); File "./H2/scripts/band+dos.py", line 9, in bsanddos ebands = abipy.ebands.ElectronBands.from_ncfile(inputBand) AttributeError: 'module' object has no attribute 'ebands' !

    Quick search suggested that an object 'ebands' exists in 'electrons' object, I tried that as well, did not work!

    I'm a newbie, what should I do?

    opened by jessepfrancis 9
  • abistruct.py for eBAND

    abistruct.py for eBAND

    I use abistruct.py for automatically generation of k-pat in output I have this:

    "# tolwfr 1e-20 iscf -2 # NSCF run"
    "# To read previous DEN file, use: getden -1 or specify filename via getden_path "out_DEN""
    
    "#K-path in reduced coordinates:"
     ndivsm 10
     kptopt -11
     kptbounds
        +0.00000  +0.00000  +0.00000  # $\Gamma$
        +0.50000  +0.00000  +0.00000  # M
        +0.33333  +0.33333  +0.00000  # K
        +0.00000  +0.00000  +0.00000  # $\Gamma$
        +0.00000  +0.00000  +0.50000  # A
        +0.50000  +0.00000  +0.50000  # L
        +0.33333  +0.33333  +0.50000  # H
        +0.00000  +0.00000  +0.50000  # A
        +0.50000  +0.00000  +0.50000  # L
        +0.50000  +0.00000  +0.00000  # M
        +0.33333  +0.33333  +0.00000  # K
        +0.33333  +0.33333  +0.50000  # H
    
    

    Well I input this generated data in my input file

    `#Dataset 2 : the band structure
     iscf2    -2
     getden2  -1 
     nband2 10 
     ndivsm2   10   
     kptopt2 -11
     kptbounds2
        +0.00000  +0.00000  +0.00000  # $\Gamma$
        +0.50000  +0.00000  +0.00000  # M
        +0.33333  +0.33333  +0.00000  # K
        +0.00000  +0.00000  +0.00000  # $\Gamma$
        +0.00000  +0.00000  +0.50000  # A
        +0.50000  +0.00000  +0.50000  # L
        +0.33333  +0.33333  +0.50000  # H
        +0.00000  +0.00000  +0.50000  # A
        +0.50000  +0.00000  +0.50000  # L
        +0.50000  +0.00000  +0.00000  # M
        +0.33333  +0.33333  +0.00000  # K
        +0.33333  +0.33333  +0.50000  # H
    
     tolwfr2  1.0d-12
     enunit2  1             # Will output the eigenenergies in eV`
    

    When calculation already done, I want to check band structure via abiopen.py and I have this structure: Unknown Why does it look so awful, and where is the k-path that is generated in abystruct.py?

    opened by namelessenko 8
  • MemoryError

    MemoryError

    Hello I just started study abinit and abipy and I am going through first base tutorial from abinit and when I wrote ( abiopen.py tbase1_1.out --expose) or something similar to it I will take memory error. I have ubuntu 16.04 LTS also 8 gb RAW memory. (base) vova@bobik:~/Abinit/abinit-8.10.3/tests/tutorial/Input/work$ abiopen.py tbase1_1.out --expose Traceback (most recent call last): File "/home/vova/miniconda3/bin/abiopen.py", line 15, in from abipy import abilab File "/home/vova/miniconda3/lib/python3.7/site-packages/abipy/abilab.py", line 43, in from abipy.electrons.ebands import (ElectronBands, ElectronBandsPlotter, ElectronDos, ElectronDosPlotter, File "/home/vova/miniconda3/lib/python3.7/site-packages/abipy/electrons/init.py", line 4, in from .gsr import * File "/home/vova/miniconda3/lib/python3.7/site-packages/abipy/electrons/gsr.py", line 20, in from abipy.tools.tensors import Stress File "/home/vova/miniconda3/lib/python3.7/site-packages/abipy/tools/tensors.py", line 9, in from pymatgen.analysis.elasticity.elastic import ElasticTensor # flake8: noqa File "/home/vova/miniconda3/lib/python3.7/site-packages/pymatgen/analysis/elasticity/init.py", line 5, in from .elastic import * File "/home/vova/miniconda3/lib/python3.7/site-packages/pymatgen/analysis/elasticity/elastic.py", line 20, in import sympy as sp File "/home/vova/miniconda3/lib/python3.7/site-packages/sympy/init.py", line 19, in import mpmath File "/home/vova/miniconda3/lib/python3.7/site-packages/mpmath/init.py", line 5, in from .ctx_fp import FPContext File "/home/vova/miniconda3/lib/python3.7/site-packages/mpmath/ctx_fp.py", line 1, in from .ctx_base import StandardBaseContext File "/home/vova/miniconda3/lib/python3.7/site-packages/mpmath/ctx_base.py", line 3, in from .libmp.backend import xrange File "/home/vova/miniconda3/lib/python3.7/site-packages/mpmath/libmp/init.py", line 17, in from .libmpc import (mpc_one, mpc_zero, mpc_two, mpc_half, File "/home/vova/miniconda3/lib/python3.7/site-packages/mpmath/libmp/libmpc.py", line 23, in from .libelefun import (
    File "/home/vova/miniconda3/lib/python3.7/site-packages/mpmath/libmp/libelefun.py", line 76, in cache_prec_steps += [min(2k,LOG_TAYLOR_PREC)+20] * 2(k-1) MemoryError (base) vova@bobik:~/Abinit/abinit-8.10.3/tests/tutorial/Input/work$ abiopen.py tbase1_1.out --seaborn Traceback (most recent call last): File "/home/vova/miniconda3/bin/abiopen.py", line 15, in from abipy import abilab File "/home/vova/miniconda3/lib/python3.7/site-packages/abipy/abilab.py", line 43, in from abipy.electrons.ebands import (ElectronBands, ElectronBandsPlotter, ElectronDos, ElectronDosPlotter, File "/home/vova/miniconda3/lib/python3.7/site-packages/abipy/electrons/init.py", line 4, in from .gsr import * File "/home/vova/miniconda3/lib/python3.7/site-packages/abipy/electrons/gsr.py", line 20, in from abipy.tools.tensors import Stress File "/home/vova/miniconda3/lib/python3.7/site-packages/abipy/tools/tensors.py", line 9, in from pymatgen.analysis.elasticity.elastic import ElasticTensor # flake8: noqa File "/home/vova/miniconda3/lib/python3.7/site-packages/pymatgen/analysis/elasticity/init.py", line 5, in from .elastic import * File "/home/vova/miniconda3/lib/python3.7/site-packages/pymatgen/analysis/elasticity/elastic.py", line 20, in import sympy as sp File "/home/vova/miniconda3/lib/python3.7/site-packages/sympy/init.py", line 19, in import mpmath File "/home/vova/miniconda3/lib/python3.7/site-packages/mpmath/init.py", line 5, in from .ctx_fp import FPContext File "/home/vova/miniconda3/lib/python3.7/site-packages/mpmath/ctx_fp.py", line 1, in from .ctx_base import StandardBaseContext File "/home/vova/miniconda3/lib/python3.7/site-packages/mpmath/ctx_base.py", line 3, in from .libmp.backend import xrange File "/home/vova/miniconda3/lib/python3.7/site-packages/mpmath/libmp/init.py", line 17, in from .libmpc import (mpc_one, mpc_zero, mpc_two, mpc_half, File "/home/vova/miniconda3/lib/python3.7/site-packages/mpmath/libmp/libmpc.py", line 23, in from .libelefun import (
    File "/home/vova/miniconda3/lib/python3.7/site-packages/mpmath/libmp/libelefun.py", line 76, in cache_prec_steps += [min(2k,LOG_TAYLOR_PREC)+20] * 2(k-1) MemoryError

    opened by Aplaus228 6
  • PackagesNotFoundError: The following packages are not available from current channels:

    PackagesNotFoundError: The following packages are not available from current channels:

    Hi, After successfully following the steps in the "Anaconda Howto" section (http://abinit.github.io/abipy/installation.html#contents), I got the following "strange" error message when trying to install abipy:

    [ogando@PedroBala:~]$ conda install abipy -c abinit Solving environment: failed

    PackagesNotFoundError: The following packages are not available from current channels:

    • abipy
    • prettytable
    • abipy
    • pymatgen==2018.3.14

    Current channels:

    • https://conda.anaconda.org/abinit/linux-64
    • https://conda.anaconda.org/abinit/noarch
    • https://repo.anaconda.com/pkgs/main/linux-64
    • https://repo.anaconda.com/pkgs/main/noarch
    • https://repo.anaconda.com/pkgs/free/linux-64
    • https://repo.anaconda.com/pkgs/free/noarch
    • https://repo.anaconda.com/pkgs/r/linux-64
    • https://repo.anaconda.com/pkgs/r/noarch
    • https://repo.anaconda.com/pkgs/pro/linux-64
    • https://repo.anaconda.com/pkgs/pro/noarch

    To search for alternate channels that may provide the conda package you're looking for, navigate to

    https://anaconda.org
    

    and use the search bar at the top of the page.

    Could you, please, help me ? All the best, Luis

    opened by lcodacal 6
  • How to run a flow with specific hosts?

    How to run a flow with specific hosts?

    Hi,

    I have just starting to experiment with abipy, which I plan to use to automate and optimize production calculations. I normally run ABINIT on a cluster without a queue system, and I would like to use the same method for running with abipy. Is there any way to specify the specific hosts I want to use with MPI without relying on a queue system?

    Thanks, Sean

    opened by roguephysicist 6
  • Parse error for abinit build options

    Parse error for abinit build options

    I get a parse error in abipy:

    In [3]: abipy.abilab.abicheck()
    AbiPy Manager:
    [Qadapter 0]
    ShellAdapter:localhost
    Hardware:
       num_nodes: 1, sockets_per_node: 1, cores_per_socket: 2, mem_per_node 4096,
    Qadapter selected: 0
    
    ---------------------------------------------------------------------------
    KeyError                                  Traceback (most recent call last)
    <ipython-input-3-a999053d8689> in <module>()
    ----> 1 abipy.abilab.abicheck()
    
    /usr/local/lib/python3.6/dist-packages/abipy/abilab.py in abicheck(verbose)
        334     if manager is not None:
        335         cprint("AbiPy Manager:\n%s\n" % str(manager), color="green")
    --> 336         build = AbinitBuild(manager=manager)
        337         if not build.has_netcdf: app("Abinit executable does not support netcdf")
        338         cprint("Abinitbuild:\n%s" % str(build), color="magenta")
    
    /usr/local/lib/python3.6/dist-packages/abipy/flowtk/tasks.py in __init__(self, workdir, manager)
       1163                 self.has_netcdf = "netcdf" in line
       1164             if "openMP support" in line: self.has_omp = yesno2bool(line)
    -> 1165             if "Parallel build" in line: self.has_mpi = yesno2bool(line)
       1166             if "Parallel I/O" in line: self.has_mpiio = yesno2bool(line)
       1167 
    
    /usr/local/lib/python3.6/dist-packages/abipy/flowtk/tasks.py in yesno2bool(line)
       1155         def yesno2bool(line):
       1156             ans = line.split()[-1].lower()
    -> 1157             return dict(yes=True, no=False, auto=True)[ans]
       1158 
       1159         # Parse info.
    
    KeyError: ':'
    
    

    I think this is because

    antoine@beta ~/abipy $ abinit -b
     DATA TYPE INFORMATION: 
     REAL:      Data type name: REAL(DP) 
                Kind value:      8
                Precision:      15
                Smallest nonnegligible quantity relative to 1: 0.22204460E-015
                Smallest positive number:                      0.22250739E-307
                Largest representable number:                  0.17976931E+309
     INTEGER:   Data type name: INTEGER(default) 
                Kind value: 4
                Bit size:   32
                Largest representable number: 2147483647
     LOGICAL:   Data type name: LOGICAL 
                Kind value: 4
     CHARACTER: Data type name: CHARACTER             Kind value: 1
      MPI-IO support is OFF
    
     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     CPP options activated during the build:
    
                        CC_GNU                   CXX_GNU                    FC_GNU
     
     HAVE_FC_ALLOCATABLE_DT...             HAVE_FC_ASYNC         HAVE_FC_BACKTRACE
     
      HAVE_FC_COMMAND_ARGUMENT      HAVE_FC_COMMAND_LINE        HAVE_FC_CONTIGUOUS
     
               HAVE_FC_CPUTIME              HAVE_FC_EXIT             HAVE_FC_FLUSH
     
                 HAVE_FC_GAMMA            HAVE_FC_GETENV   HAVE_FC_IEEE_ARITHMETIC
     
       HAVE_FC_IEEE_EXCEPTIONS          HAVE_FC_INT_QUAD             HAVE_FC_IOMSG
     
         HAVE_FC_ISO_C_BINDING  HAVE_FC_ISO_FORTRAN_2008        HAVE_FC_LONG_LINES
     
            HAVE_FC_MOVE_ALLOC  HAVE_FC_ON_THE_FLY_SHAPE           HAVE_FC_PRIVATE
     
             HAVE_FC_PROTECTED           HAVE_FC_SHIFTLR         HAVE_FC_STREAM_IO
     
                HAVE_FC_SYSTEM                HAVE_FFTW3        HAVE_FFTW3_THREADS
     
              HAVE_FORTRAN2003                 HAVE_HDF5        HAVE_LIBPAW_ABINIT
     
          HAVE_LIBTETRA_ABINIT                HAVE_LIBXC         HAVE_LINALG_AXPBY
     
            HAVE_LINALG_GEMM3M               HAVE_NETCDF       HAVE_NETCDF_FORTRAN
     
                    HAVE_NUMPY             HAVE_OS_LINUX         HAVE_TIMER_ABINIT
     
     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    
     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
     === Build Information === 
      Version       : 9.0.3
      Build target  : x86_64_linux_gnu7.5
      Build date    : 20200429
    
     === Compiler Suite === 
      C compiler       : gnu7.5
      C++ compiler     : gnu7.5
      Fortran compiler : gnu7.5
      CFLAGS           : -g -O2 -mtune=native -march=native
      CXXFLAGS         : -g -O2 -mtune=native -march=native
      FCFLAGS          : -g -ffree-line-length-none     -I/usr//include  -I/usr//include
      FC_LDFLAGS       : 
    
     === Optimizations === 
      Debug level        : @abi_debug_flavor@
      Optimization level : @abi_optim_flavor@
      Architecture       : unknown_unknown
    
     === Multicore === 
      Parallel build : 
      Parallel I/O   : 
      openMP support : 
      GPU support    : 
    
     === Connectors / Fallbacks === 
      LINALG flavor  : netlib+openblas
      FFT flavor     : fftw3-threads
      HDF5           : yes
      NetCDF         : yes
      NetCDF Fortran : yes
      LibXC          : yes
      Wannier90      : no
    
     === Experimental features === 
      Exports             : 
      GW double-precision : 
    
     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    
     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     Default optimizations:
       -O2 -mtune=native -march=native
    
    
     Optimizations for 43_ptgroups:
       -O0
    
    
     ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    

    and it's failing to parse the "multicore" section.

    This is for abinit 9.0.3.

    opened by antoine-levitt 5
  • getting abipy to launch jobs on my computing server

    getting abipy to launch jobs on my computing server

    Dear devs, I cannot get abipy to launch a job on my computing server. I believed that I set up the manager.yml and scheduler.yml properly.

    I adapted the run_relax.py script for my needs, which creates a flow_relax directory and the job submission script flow_relax/w0/t0/job.sh is well formed and could be manually submitted with sbatch. However, I want to get abirun.py to submit the whole flow.

    I tried: abirun.py flow_relax single or abirun.py flow_relax rapid or abirun.py flow_relax scheduler. In either case, it results in AbiCritical status, with an error message in the file flow_relax/w0/t0/run.err complaining about missing SLURM lines in the job script. Indeed, I can see that the file flow_relax/w0/t0/job.sh has been overwritten, because all the SLURM preemble that was in this file is now gone.

    What is going on? Am I missing the basic usage here?

    opened by GkAntonius 5
  • ImportError: No module named serializers.json_coders

    ImportError: No module named serializers.json_coders

    hi,dear when i test this example http://pythonhosted.org/abipy/examples/plot/plot_bz.html It give me this message: `ImportError Traceback (most recent call last) in () ----> 1 from abipy.abilab import abiopen 2 import abipy.data as abidata 3 4 # Open the WKF file. 5 wfk_file = abiopen(abidata.ref_file("si_scf_WFK.nc"))

    /opt/anaconda2/lib/python2.7/site-packages/abipy/init.py in () 16 #----------------------------------------------------------------------------- 17 ---> 18 from abipy.core import release 19 #from abipy.profile import abipy_env 20 #from abipy.htc import Launcher, MassLauncher, AbinitInput

    /opt/anaconda2/lib/python2.7/site-packages/abipy/core/init.py in () 1 """Core objects.""" ----> 2 from .kpoints import * 3 from .structure import * 4 from .symmetries import * 5 from .gsphere import *

    /opt/anaconda2/lib/python2.7/site-packages/abipy/core/kpoints.py in () 14 from monty.functools import lazy_property 15 from pymatgen.core.lattice import Lattice ---> 16 from pymatgen.serializers.json_coders import pmg_serialize 17 from pymatgen.serializers.pickle_coders import SlotPickleMixin 18 from abipy.iotools import ETSF_Reader

    ImportError: No module named serializers.json_coders`

    The pymatgen is already installed, pip show pymatgen Name: pymatgen Version: 2017.12.16 Summary: Python Materials Genomics is a robust materials analysis code that defines core object representations for structures and molecules with support for many electronic structure codes. It is currently the core analysis code powering the Materials Project (https://www.materialsproject.org). Home-page: http://www.pymatgen.org Author: Shyue Ping Ong Author-email: [email protected] License: MIT Location: /opt/anaconda2/lib/python2.7/site-packages Requires: numpy, six, requests, ruamel.yaml, monty, scipy, pydispatcher, tabulate, spglib, matplotlib, palettable, sympy, pandas, enum34 could you tell me how to solve it. thank you very much!

    opened by tlsong 5
  • Cannot import name SlotPickleMixin from pymatgen

    Cannot import name SlotPickleMixin from pymatgen

    Hello!

    I'm trying to run the example plot_bands.py from http://pythonhosted.org/abipy/examples/plot/plot_bands.html and gets the following error message:

    python2.7 getbands.py Traceback (most recent call last): File "getbands.py", line 5, in from abipy.abilab import abiopen File "/usr/local/lib/python2.7/dist-packages/abipy-0.1.0-py2.7.egg/abipy/init.py", line 18, in from abipy.core import release File "/usr/local/lib/python2.7/dist-packages/abipy-0.1.0-py2.7.egg/abipy/core/init.py", line 2, in from .kpoints import * File "/usr/local/lib/python2.7/dist-packages/abipy-0.1.0-py2.7.egg/abipy/core/kpoints.py", line 15, in from pymatgen.serializers.pickle_coders import SlotPickleMixin ImportError: cannot import name SlotPickleMixin

    I just changed the script name to getbands.py. After searching in pymatgen source I found that in the file

    /usr/local/lib/python2.7/dist-packages/pymatgen/serializers/pickle_coders.py

    the function SlotPickleMixin is not defined. So, I'm wondering if I'm using the wrong or incompatible version of pymatgen. Thanks in advance,

    Camilo.

    opened by cespejo79 5
  • Lobster cohp/coop/dos plotting import error

    Lobster cohp/coop/dos plotting import error

    I installed abipy 0.6.0 devel version. I tried the lobster notebook tutorial for plotting cohp.

    for this given command line in the jupyter notebook,

    from abipy.abilab import LobsterAnalyzer

    it is giving the below error:

    ImportError: cannot import name 'LobsterAnalyzer'

    opened by bradraj 4
  • add option to convert from phonopy yaml file to ddb

    add option to convert from phonopy yaml file to ddb

    Phonopy can store the unitcell/supercell/forceconstants/etc into a yaml file. https://phonopy.github.io/phonopy/output-files.html#phonopy-yaml-and-phonopy-disp-yaml Add the option to convert this file into ddb.

    opened by mailhexu 0
  • error in import abilib

    error in import abilib

    Dear abipy developer,

    I am using ubuntu 18.04 and abinit9. After installation using conda and running this command

    "from abipy import abilab" I get the falling error:


    ImportError Traceback (most recent call last) Cell In [4], line 1 ----> 1 from abipy import abilab

    File ~/Desktop/abipy/abipy/abipy/init.py:18 12 del sys 14 #----------------------------------------------------------------------------- 15 # Setup the top level names 16 #----------------------------------------------------------------------------- ---> 18 from abipy.core import release 20 # Release data 21 author = ''

    File ~/Desktop/abipy/abipy/abipy/core/init.py:3 1 """Core objects.""" 2 # flake8: noqa ----> 3 from .kpoints import * 4 from .structure import * 5 from .symmetries import *

    File ~/Desktop/abipy/abipy/abipy/core/kpoints.py:16 14 from monty.string import marquee 15 from pymatgen.core.lattice import Lattice ---> 16 from pymatgen.util.serialization import pmg_serialize, SlotPickleMixin 17 from abipy.iotools import ETSF_Reader 18 from abipy.tools.derivatives import finite_diff

    ImportError: cannot import name 'SlotPickleMixin' from 'pymatgen.util.serialization' (/home/rd/miniconda3/envs/my_pymatgen/lib/python3.10/site-packages/pymatgen/util/serialization.py)


    Could you please help to resolve the issue?

    Many thanks and regards, Rajesh

    opened by rajeshatiitm 7
  • python3.6.2 package not found error

    python3.6.2 package not found error

    I create conda environment using conda create -n testenv python=3.6.2. I got the following error. May I know how can I solve the issue?

    PackagesNotFoundError: The following packages are not available from current channels:
    
      - python=3.6.2
    
    Current channels:
    
      - https://repo.anaconda.com/pkgs/main/linux-aarch64
      - https://repo.anaconda.com/pkgs/main/noarch
      - https://repo.anaconda.com/pkgs/r/linux-aarch64
      - https://repo.anaconda.com/pkgs/r/noarch
      - https://conda.anaconda.org/conda-forge/linux-aarch64
      - https://conda.anaconda.org/conda-forge/noarch
    
    To search for alternate channels that may provide the conda package you're
    looking for, navigate to
    
        https://anaconda.org
    
    and use the search bar at the top of the page.
    
    opened by Charxil 0
  • Erroneous energy conversion?

    Erroneous energy conversion?

    There might be an error in the conversion of units in "def read_denpot" (at line 1172 in abipy/core/fields.py): "fact = pmgu.Ha_to_eV / pmgu.bohr_to_angstrom ** 3" converts units as if the energy were given in Hartree/bohr**3 when in fact they are just Hartree (at least according to https://docs.abinit.org/guide/abinit/#56-the-potential-files).

    opened by m-schwendt 0
  • Schedular error

    Schedular error

    Hi, I'm VERY new abipy but I need to do the flow work for a project.

    I keep getting the error: Using scheduler v>= 3.0.0

    And thus I think that why the scheduler keeps getting stuck.

    I am not sure if I have configured my manager and scheduler correctly either🤦🏼‍♀️

    PLEASE HELP! ITS URGENT!

    16541692174257731280535270825338 16541692402664710414425059270030 16541692884103682559100336909733 16541693052393088090253392949972 16541693729256486925103554303486

    opened by Bloop10 0
  • PhononWork -> generating too many DFPT calculations

    PhononWork -> generating too many DFPT calculations

    Hello,

    Is anyone familiar with the PhononWork calculations? From what I understand, and from what I could decipher from the code, there seems to be an issue with generating the correct number of calculations (perhaps at the qpoint steps).

    When looking at just qpt = (0,0,0):

    1. I was trying a surface of Silicon in the 2x1 reconstruction and when I generate the PhononWork DFPT steps it generates 24 calculations, all of which have the same input...

    2. I also had the same issue with crystalline cubic Si. It generated two tasks with the same input for DFPT, and when analyzed, each task had the same phonon frequencies (of course).

    opened by cpashartis 5
Python package for handling and analyzing PSRFITS files

PyPulse A pure-Python package for handling and analyzing PSRFITS files. Read the documentation here. This is an alternate code base from PSRCHIVE. Req

Michael Lam 15 Nov 30, 2022
chiarose(XCR) based on chia(XCH) source code fork, open source public chain

chia-rosechain 一个无耻的小活动 | A shameless little event 如果您喜欢这个项目,请点击star 将赠送您520朵玫瑰,可以去 facebook 留下您的(xcr)地址,和github用户名。 If you like this project, please

ddou123 376 Dec 14, 2022
Source-o-grapher is a tool built with the aim to investigate software resilience aspects of Open Source Software (OSS) projects.

Source-o-grapher is a tool built with the aim to investigate software resilience aspects of Open Source Software (OSS) projects.

Aristotle University 5 Jun 28, 2022
PyMedPhys is an open-source Medical Physics python library

PyMedPhys is an open-source Medical Physics python library built by an open community that values and prioritises code sharing, review, improvement, and learning from each other. I

PyMedPhys 238 Dec 27, 2022
The FLARE team's open-source library to disassemble Common Intermediate Language (CIL) instructions.

dncil is a Common Intermediate Language (CIL) disassembly library written in Python that supports parsing the header, instructions, and exception hand

MANDIANT 95 Jan 8, 2023
Results of Robot Framework 5.0 survey

Robot Framework 5.0 survey results We had a survey asking what features Robot Framework community members would like to see in the forthcoming Robot F

Pekka Klärck 2 Oct 16, 2021
This Python3 script will monitor Upwork RSS feed and then email you the results.

Upwork RSS Parser This Python3 script will monitor Upwork RSS feed and then email you the results. Table of Contents General Info Technologies Used Fe

Chris 5 Nov 29, 2021
Bring A Trailer(BAT) is a popular online auction website for enthusiast cars. This traverse auction results and saves them as CSV

BaT Data Grabber Bring A Trailer(BAT) is a popular online auction website for enthusiast cars. This traverse auction results and saves them as CSV Bri

Elliot Weil 2 Oct 31, 2021
This is a simple python script for checking A/L Examination results of srilankan students

AL-Result-Checker This is a simple python script for checking A/L Examination results of srilankan students INSTALLATION [Termux] [Linux] : apt-get up

Razor Kenway 8 Oct 24, 2022
A faster Python generator that get function results from multi-process workers

multiyield This package implements a Python generator that get function results from multi-process workers. The faster_fifo Queue (instead of the stan

Xin Du 1 Nov 18, 2021
A streamlit app for exploring image search results from HuggingPics

title emoji colorFrom colorTo sdk app_file pinned huggingpics-explorer ?? blue red streamlit app.py false huggingpics-explorer A streamlit app for exp

Nathan Raw 4 Sep 10, 2022
An example repository for how to generate results using PyBaMM

PyBaMM results This repository provides a template for generating results (for example, for a paper) using PyBaMM Installation Install PyBaMM using a

PyBaMM Team 7 Oct 9, 2022
Data wrangling & common calculations for results from qMem measurement software

qMem Datawrangler This script processes output of qMem measurement software into an Origin ® compatible *.csv files and matplotlib graphs to quickly v

Julian 1 Nov 30, 2021
Scripts for BGC analysis in large MAGs and results of their application to soil metagenomes within Chernevaya Taiga RSF-funded project

Scripts for BGC analysis in large MAGs and results of their application to soil metagenomes within Chernevaya Taiga RSF-funded project

null 1 Dec 6, 2021
Dungeon Dice Rolls is an aplication that the user can roll dices (d4, d6, d8, d10, d12, d20 and d100) and store the results in one of the 6 arrays.

Dungeon Dice Rolls is an aplication that the user can roll dices (d4, d6, d8, d10, d12, d20 and d100) and store the results in one of the 6 arrays.

Bracero 1 Dec 31, 2021
Python script to combine the statistical results of a TOPAS simulation that was split up into multiple batches.

topas-merge-simulations Python script to combine the statistical results of a TOPAS simulation that was split up into multiple batches At the top of t

Sebastian Schäfer 1 Aug 16, 2022
March-madness - March Madness results 1985-2021

march-madness Results for all 2,268 NCAA Division I Men's Basketball Tournament games since the modern format was introduced in 1985. Includes years,

Darik Harter 2 Feb 26, 2022
MeepoBenchmark - This project aims at providing the scripts, logs, and analytic results for Meepo Blockchain

MeepoBenchmark - This project aims at providing the scripts, logs, and analytic results for Meepo Blockchain

Peilin Zheng 3 Aug 16, 2022
Nuclei - Burp Extension allows to run nuclei scanner directly from burp and transforms json results into the issues

Nuclei - Burp Extension Simple extension that allows to run nuclei scanner directly from burp and transforms json results into the issues. Installatio

null 106 Dec 22, 2022