• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

build/H06-Apr-2020-659558

cmake/H06-Apr-2020-903795

m4/H06-Apr-2020-9,6658,747

maple/H06-Apr-2020-10,9588,447

pylibxc/H06-Apr-2020-1,6651,294

scripts/H06-Apr-2020-2,1621,663

src/H06-Apr-2020-2,100,2791,989,309

testsuite/H03-May-2022-17,30514,440

AUTHORSH A D06-Apr-2020244 119

COPYINGH A D06-Apr-202016.3 KiB374293

ChangeLogH A D06-Apr-202019.6 KiB374282

INSTALLH A D06-Apr-202015.4 KiB371289

KNOWN_ISSUESH A D06-Apr-20205.6 KiB210198

Makefile.amH A D06-Apr-20201.4 KiB3517

Makefile.inH A D06-Apr-202028.9 KiB911806

NEWSH A D06-Apr-20201.3 KiB3635

PACKAGINGH A D06-Apr-20201.1 KiB4843

READMEH A D06-Apr-20205.9 KiB163125

TODOH A D06-Apr-20204.9 KiB9181

aclocal.m4H A D06-Apr-202041.5 KiB1,1641,058

compileH A D06-Apr-20207.2 KiB348258

config.guessH A D06-Apr-202041.9 KiB1,4221,230

config.h.cmake.inH A D06-Apr-2020228 128

config.h.inH A D06-Apr-20204 KiB150104

config.subH A D06-Apr-202035.1 KiB1,8081,670

configureH A D06-Apr-2020630.8 KiB20,97617,768

configure.acH A D06-Apr-20207.7 KiB260218

depcompH A D06-Apr-202023 KiB792502

install-shH A D06-Apr-202014.3 KiB502327

libxc.bibH A D06-Apr-2020152.9 KiB4,7884,422

ltmain.shH A D06-Apr-2020316.5 KiB11,1487,979

missingH A D06-Apr-20206.7 KiB216143

setup.pyH A D06-Apr-20204 KiB11296

test-driverH A D06-Apr-20204.5 KiB14987

xc_version.hH A D06-Apr-2020482 2613

xc_version.h.inH A D06-Apr-2020537 2619

README

1Libxc
2=====
3
4Libxc is a library of exchange-correlation functionals for
5density-functional theory. The aim is to provide a portable, well
6tested and reliable set of exchange and correlation functionals that
7can be used by a variety of programs.
8
9For more information, please check the manual at
10http://www.tddft.org/programs/Libxc
11
12INSTALLATION
13============
14
15Autotools
16---------
17
18The recommended way to install the library is by using GNU Autotools.
19
20To install the library, just use the standard procedure:
21
22./configure --prefix=PATH/TO/LIBXC
23make
24make check
25make install
26
27If you're not using a stable release tarball, you'll first need to
28generate configure with:
29autoreconf -i
30
31CMake
32-----
33
34Support for CMake has also been recently contributed by Lori Burns.
35
36The CMake file has the following caveats
37
38* tested on Linux and Mac, static and shared lib, namespaced and
39  non-namespaced headers, but really only to the extent that it works
40  for Psi4
41* all the fancy libtool options and Fortran interface _not_ tested
42* test suite executed after build via `ctest`. But it has always
43  totally passed or totally failed, which doesn't inspire confidence
44* The generated `libxc_docs.txt` is large, and the generation step
45  sometimes balks on it, leading to `xc_funcs.h` not found
46  errors. Just execute again.
47
481) Building with CMake
49
50Use the following procedure:
51
52cmake -H. -Bobjdir
53cd objdir && make
54make test
55make install
56
57The build is also responsive to
58
59  * static/shared toggle `BUILD_SHARED_LIBS`
60  * install location `CMAKE_INSTALL_PREFIX`
61  * namespacing of headers `NAMESPACE_INSTALL_INCLUDEDIR`
62  * of course, `CMAKE_C_COMPILER`, `BUILD_TESTING`, and `CMAKE_C_FLAGS`
63
64See CMakeLists.txt for options details. All these build options should
65be passed as `cmake -DOPTION`.
66
672) Detecting with CMake
68
69CMake builds install with `LibxcConfig.cmake`, `LibxcConfigVersion.cmake`, and
70`LibxcTargets.cmake` files suitable for use with CMake
71[`find_package()`](https://cmake.org/cmake/help/v3.2/command/find_package.html)
72in `CONFIG` mode.
73
74* `find_package(Libxc)` - find any xc libraries and headers
75
76* `find_package(Libxc 3.0.0 EXACT CONFIG REQUIRED COMPONENTS static)`
77  - find Libxc exactly version 3.0.0 built with static libraries or
78  die trying
79
80See cmake/LibxcConfig.cmake.in for details of how to detect the Config
81file and what CMake variables and targets are exported to your
82project.
83
843) Use with CMake
85
86After `find_package(Libxc ...)`,
87
88* test if package found with `if(${Libxc_FOUND})` or `if(TARGET
89  Libxc::xc)`
90* link to library (establishes dependency), including header and
91  definitions configuration with `target_link_libraries(mytarget
92  Libxc::xc)`
93* include header files using `target_include_directories(mytarget
94  PRIVATE $<TARGET_PROPERTY:Libxc::xc,INTERFACE_INCLUDE_DIRECTORIES>)`
95* compile target applying `-DUSING_Libxc` definition using
96  `target_compile_definitions(mytarget PRIVATE
97  $<TARGET_PROPERTY:Libxc::xc,INTERFACE_COMPILE_DEFINITIONS>)`
98
99FILE ORGANIZATION
100=================
101
102The distribution is organized as follows
103
104./cmake      CMake helper files
105./build      pkgconfig and Fedora spec files
106./m4         m4 scripts used by configure.ac, and
107             libxc.m4 used by other projects linking to libxc
108./maple      the Maple source code for the functionals
109./scripts    various scripts for libxc development
110./src        source files
111./testsuite  regression tests
112
113The most important contents of the src directory for users are
114
115xc.h         main header file with all external definitions
116xc_funcs.h   automatically generated file with the list of functionals
117
118In addition, developers will be interested in the following
119
120util.h                         header file with internal definitions
121*.f90 *.F90 xc_f.c string_f.h  Fortran 90 interface
122*.f03 *.F03                    Fortran 2003 interface
123funcs_*.c                      automatically generated files with
124                               the functional definitions
125functionals.c                  generic interface to simplify access
126                               to the different families
127lda.c gga.c mgga.c             interface to the different families of
128                               functionals
129special_functions.c            implementation of a series of special functions
130hyb_gga_*.c                    definition of the different hybrid
131                               GGA functionals
132hyb_mgga_*.c                   definition of the different hybrid
133                               meta-GGA functionals
134lda_*.c                        definition of the different LDA functionals
135gga_*.c                        definition of the different GGA functionals
136mgga_*.c                       definition of the different meta-GGA functionals
137work_lda.c                     code that simplifies the implementation of LDAs
138work_gga_x.c                   code that simplifies the implementation of
139                               exchange GGAs
140work_gga_c.c                   code that simplifies the implementation of
141                               some correlation GGAs
142work_mgga_x.c                  code that simplifies the implementation of
143                               exchange meta-GGAs
144work_mgga_c.c                  code that simplifies the implementation of
145                               some correlation meta-GGAs
146
147Notes:
148
149* Most functionals use the framework contained in a work_*.c
150  file. This simplifies tremendously the implementation of the
151  different functionals. The work_*.c are #include'd in the functional
152  implementations through a preprocessor directive.
153
154* Some files contain more than one functional, as similar functionals
155  are usually grouped together. Therefore, the best way to find where
156  a functional is implemented is by looking at its keyword in
157  xc_funcs.h and using grep to find the correct file.
158
159* The files where the functionals are defined are named as
160  family_type_name.c, where: family - functional family (lda, gga,
161  hyb_gga, or mgga) type - type of functional (x, c, xc, or k) name -
162  name of the functional or class of functionals
163