Skip to main content

The AiiDA plugin for ABINIT.

Project description

Build Status Coverage Status Docs status PyPI version

aiida-abinit

ABINIT AiiDA

The AiiDA plugin for ABINIT.

ABINIT is a software suite to calculate the optical, mechanical, vibrational, and other observable properties of materials. Starting from the quantum equations of density functional theory, you can build up to advanced applications with perturbation theories based on DFT, and many-body Green's functions (GW and DMFT) . ABINIT can calculate molecules, nanostructures and solids with any chemical composition, and comes with several complete and robust tables of atomic potentials. On-line tutorials are available for the main features of the code, and several schools and workshops are organized each year.

This plugin was created using AiiDA plugin cutter.

Installation

Install Abinit (here for Abinit v.9.2.1)

wget https://www.abinit.org/sites/default/files/packages/abinit-9.2.1.tar.gz
tar -xvf abinit-9.2.1.tar.gz
cd abinit-9.2.1
mkdir build
cd build
../configure

The configure will likely tel you that you have missing mandatory libraries (Netcdf etc).

cd fallbacks
./build-abinit-fallbacks.sh

This will build HDF5, libXC, NetCDF and NetCDF Fortran (it will take time to compile ... go get a coffee) Next you need to create an .ac file to tell the code where these new libs are

vim max.ac 

Add the lines that the build-abinit-fallbacks.sh reported you to the max.ac file. You should also add the path to your MPI installation (like openmpi) if you want to run in parallel. For example:

with_mpi=/home/max/codes/openmpi-4.0.2/
enable_mpi_io="yes"
with_libxc=/home/max/codes/abinit-9.2.1/build/fallbacks/install_fb/gnu/7.5/libxc/4.3.4
with_hdf5=/home/max/codes/abinit-9.2.1/build/fallbacks/install_fb/gnu/7.5/hdf5/1.10.6
with_netcdf=/home/max/codes/abinit-9.2.1/build/fallbacks/install_fb/gnu/7.5/netcdf4/4.6.3
with_netcdf_fortran=/home/max/codes/abinit-9.2.1/build/fallbacks/install_fb/gnu/7.5/netcdf4_fortran/4.5.2
with_xmlf90=/home/max/codes/abinit-9.2.1/build/fallbacks/install_fb/gnu/7.5/xmlf90/1.5.3.1
with_libpsml=/home/max/codes/abinit-9.2.1/build/fallbacks/install_fb/gnu/7.5/libpsml/1.1.7

Then re-run the configure

../configure --with-config-file=max.ac
make

It should work and be compiled.

If you have trouble installing Abinit, please visit the Abinit documentation.

You can export the 'abinit' executable with

export PATH=/home/max/codes/abinit-9.2.1/build/src/98_main:$PATH

And do the tests to make sure everything works:

cd ../tests/
python runtests.py --build-tree=/home/max/codes/abinit-9.2.1/build

Install AiiDA

First create a virtual python environement with conda (install it if you do not have it):

conda create -n aiida-abinit -c conda-forge aiida-core=1.4.2 aiida-core.services=1.4.2

Then activate your virtual environement

conda activate aiida-abinit
reentry scan

You should then clone this GitHub repo

git clone https://github.com/sponce24/aiida-abinit
cd aiida-abinit
pip install -e . --ignore-installed --use-feature=2020-resolver

This should install aiida-core and aiida-abinit.

You should now setup the computer and the code:

cd examples

You should open the computer.yml and adapt it to your environement. Then run:

verdi computer setup --config computer.yml

This will setup your current local machine as the computer. You can also adapt the computer.yml to setup a remote machine. If you do:

verdi computer list

It should show your computer.

Now setup the Abinit code. Also edit the code.yml indicating your path. Then do:

verdi code setup --config code.yml

This should setup the Abinit code. You can verify that you have it by doing:

verdi code list

Finally, you should make sure that you have the abinit calculation plugin by doing:

verdi plugin list aiida.calculations 

This should show * abinit

You are now all setup. Congratulations !!

Usage

Here goes a complete example of how to submit a test calculation using this plugin.

A quick demo of how to submit a calculation:

verdi daemon start     # make sure the daemon is running
cd examples
python example_dft.py --code abinit-9.2.1-ab@localhost # run DFT test calculation
verdi process list -a  # check record of calculation

The plugin also includes verdi commands to inspect its data types:

verdi data abinit list
verdi data abinit export <PK>

Development

git clone https://github.com/sponce24/aiida-abinit .
cd aiida-abinit
pip install -e .[pre-commit,testing]  # install extra dependencies
pre-commit install  # install pre-commit hooks
pytest -v  # discover and run all tests

See the developer guide for more information.

Acknowledgements

This work was supported by the the European Unions Horizon 2020 Research and Innovation Programme, under the Marie Skłodowska-Curie Grant Agreement SELPH2D No. 839217.

MSC

License

MIT

Contact

The AiiDA-abinit plugin is developed and maintained by

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiida-abinit-0.2.0a1.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

aiida_abinit-0.2.0a1-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

Details for the file aiida-abinit-0.2.0a1.tar.gz.

File metadata

  • Download URL: aiida-abinit-0.2.0a1.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for aiida-abinit-0.2.0a1.tar.gz
Algorithm Hash digest
SHA256 9498d64e98df1b0710f51a7b188888553d05d619baa24b5afd92539a817503c3
MD5 ee9256bb6ccb2b911a99a19c816075df
BLAKE2b-256 fb8a7dea5f215538c5891abc214fc448b9f6d691db48028fd2468fb17b06041e

See more details on using hashes here.

File details

Details for the file aiida_abinit-0.2.0a1-py3-none-any.whl.

File metadata

  • Download URL: aiida_abinit-0.2.0a1-py3-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/50.3.0.post20201006 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

File hashes

Hashes for aiida_abinit-0.2.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 3e25caf76087424c18d7696998fb84ca5a71cfab0f00ad8e97d5f807eb15690e
MD5 ac06e50ed42bd2e2e1258227336d9418
BLAKE2b-256 88b0b1d84ecbf37ce592046725ecbe0fbc24fb8a0552b62051748f83f571803e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page