From OctopusWiki
Revision as of 11:44, 21 April 2016 by Micael (talk | contribs) (Added libxc-2.1.3, libxc-2.2.3, and libxc-3.0.0 releases)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


If you wish, you may use Libxc in your own code; Libxc is released under the LGPL license (v. 3.0). You can download the code from here:

You can also get it directly from the svn repository. If you plan to develop libxc, you should get the development version from the repository:

 $ svn co libxc
 $ cd libxc
 $ autoreconf -i
 $ ./configure
 $ make
 $ make install

The trac page is here: While there is a testsuite provided, it will report some errors in most cases. This is not something to worry about.


Libxc is now available in Fedora. To compile against libxc one just needs to install the development package with

 $ yum -y install libxc-devel

If the Libxc Fortran module file is needed, one needs to add '-I/usr/lib64/gfortran/modules' or '-I/usr/lib/gfortran/modules' (on 32-bit systems) to the compiler arguments.


Libxc was added to this Ubuntu repository for easier installation. To add this repository to Ubuntu, all one has to do is type-in:

 $ sudo add-apt-repository ppa:hogliux/misstep

Now Libxc can be installed via the Ubuntu software centre and will receive automatic updates.


Libxc for Mac OSX is available from the Homebrew package manager. After Homebrew installation one types in:

 $ brew install gfortran
 $ brew install libxc


Libxc was also added to the macports repository for easier installation on Mac OS X. After installing macports the user can type in:

 $ sudo port selfupdate
 $ sudo port install libxc

Again the user will receive automatic updates. Note: installation time takes very long because gfortran needs to be built first.

C interface

The C interface of libxc is defined in the header src/xc.h.

Fortran interface

The fortran interface is provided by the libxc module that can be found under the directory src/ of the libxc directory.

Back to libxc