Skip to Main Content

Libraries and Tools

To allow the adoption of its recommendations about standardization, the ETSF proposes different libraries and tools implementing or using these specifications, as well as widely usable pieces of software.

The ETSF I/O library

A library of F90 routines to read/write the ETSF file format has been written. It is called ETSF_IO and available under LGPL. The tar file contains full documentation (see the doc/www directory of the package), several tutorials (compilable and highly documented programs) and a complete self-test suite. The code history records patches and updates.

The ETSF_IO package has been described in a publication in Computer Physics Communication. When using this library, please cite the following paper:

"Sharing electronic structure and crystallographic data with ETSF_IO", D. Caliste, Y. Pouillon, M.J. Verstraete, V. Olevano, X. Gonze, Comp. Phys. Com. 179, 748-758 (2008).

ETSF_IO is shipped with several libraries. These libraries provide low- to high-level access routines for ETSF files. Each library contains one or several modules, as described below.

  • etsf_io_low_level (libetsf_io_low_level.a), this library is made of just one module. It contains a wrapper around NetCDF calls to be able to do in one call tasks which require several NetCDF calls, such as getting the id of a variable, checking its shape and dimensions, or defining and reading it. This module is not specific to the ETSF file format, and can be used as a stand-alone library to easily handle NetCDF files.
  • etsf_io (libetsf_io.a), is also made of a unique module, called etsf_io, containing routines specific to the ETSF file format. This module is the core of ETSF_IO. All variables from the specification have been gathered into structured groups. For each group, one can create a file which contains these variables, using methods with a name like etsf_io_<group_name>_def(). This will allocate the disk space required to store all the variables of the group. Then, to write data, methods called etsf_io_<group_name>_put() are available. For reading actions, the routines are suffixed with get instead of put. To access several groups at one time a high level routine has been created and is called etsf_io_data_<action>.
  • etsf_io_file & etsf_io_tools (libetsf_io_utils.a), contains two modules. etsf_io_file, which is dedicated to high-level actions on ETSF files (merge, check...) and etsf_io_tools, which implements some non-mandatory but convenient routines, which handle data from ETSF files (e.g. to get element names...).

The LibXC Exchange-Correlation Library

Libxc is the library of exchange-correlation functionals written by M.A.L. Marques, and adopted by the ETSF. Its aim is to provide a portable, well tested and reliable set of exchange and correlation functionals, that can be used by all the ETSF codes and also other codes.

In libxc you can find different types of functionals: LDA, GGA, hybrids, mGGA and LCA. It can calculate the functional itself and its derivative. For some functionals, higher order derivatives are available.

Libxc is written in C and has Fortran bindings. It is released under the LGPL license (v. 3.0)

The Libpspio library

Libpspio is a library able to read and write pseudopotentials in various formats, allowing for conversion in some cases. It is currently under heavy development and testing. A release will be available from this page once the library has been sufficiently debugged.

The pseudopotential converter pspconvert

IMPORTANT: the script you can download here is available only for reference. A library is currently being written to replace it.

pspconvert.py is a command-line pseudopotential conversion program. The code addresses several needs of the electronic structure and theoretical spectroscopy communities, such as allowing the use of old datasets with newer codes and facilitate dataset exchange between researchers. Futhermore pspconvert will be a very useful tool to help in the process of uniformization of pseudopotential file formats, helping everyone to migrate to the newer format.

The crystal and molecule visualizer V_Sim

The visualization tool V_Sim is also able to read the crystallographic data from the ETSF file format since release 3.3. It has the capability to render atomic structures and to load density files and draw iso-surfaces.