|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| build/ | H | 06-Apr-2020 | - | 659 | 558 |
| cmake/ | H | 06-Apr-2020 | - | 903 | 795 |
| m4/ | H | 06-Apr-2020 | - | 9,665 | 8,747 |
| maple/ | H | 06-Apr-2020 | - | 10,958 | 8,447 |
| pylibxc/ | H | 06-Apr-2020 | - | 1,665 | 1,294 |
| scripts/ | H | 06-Apr-2020 | - | 2,162 | 1,663 |
| src/ | H | 06-Apr-2020 | - | 2,100,279 | 1,989,309 |
| testsuite/ | H | 03-May-2022 | - | 17,305 | 14,440 |
| AUTHORS | H A D | 06-Apr-2020 | 244 | 11 | 9 |
| COPYING | H A D | 06-Apr-2020 | 16.3 KiB | 374 | 293 |
| ChangeLog | H A D | 06-Apr-2020 | 19.6 KiB | 374 | 282 |
| INSTALL | H A D | 06-Apr-2020 | 15.4 KiB | 371 | 289 |
| KNOWN_ISSUES | H A D | 06-Apr-2020 | 5.6 KiB | 210 | 198 |
| Makefile.am | H A D | 06-Apr-2020 | 1.4 KiB | 35 | 17 |
| Makefile.in | H A D | 06-Apr-2020 | 28.9 KiB | 911 | 806 |
| NEWS | H A D | 06-Apr-2020 | 1.3 KiB | 36 | 35 |
| PACKAGING | H A D | 06-Apr-2020 | 1.1 KiB | 48 | 43 |
| README | H A D | 06-Apr-2020 | 5.9 KiB | 163 | 125 |
| TODO | H A D | 06-Apr-2020 | 4.9 KiB | 91 | 81 |
| aclocal.m4 | H A D | 06-Apr-2020 | 41.5 KiB | 1,164 | 1,058 |
| compile | H A D | 06-Apr-2020 | 7.2 KiB | 348 | 258 |
| config.guess | H A D | 06-Apr-2020 | 41.9 KiB | 1,422 | 1,230 |
| config.h.cmake.in | H A D | 06-Apr-2020 | 228 | 12 | 8 |
| config.h.in | H A D | 06-Apr-2020 | 4 KiB | 150 | 104 |
| config.sub | H A D | 06-Apr-2020 | 35.1 KiB | 1,808 | 1,670 |
| configure | H A D | 06-Apr-2020 | 630.8 KiB | 20,976 | 17,768 |
| configure.ac | H A D | 06-Apr-2020 | 7.7 KiB | 260 | 218 |
| depcomp | H A D | 06-Apr-2020 | 23 KiB | 792 | 502 |
| install-sh | H A D | 06-Apr-2020 | 14.3 KiB | 502 | 327 |
| libxc.bib | H A D | 06-Apr-2020 | 152.9 KiB | 4,788 | 4,422 |
| ltmain.sh | H A D | 06-Apr-2020 | 316.5 KiB | 11,148 | 7,979 |
| missing | H A D | 06-Apr-2020 | 6.7 KiB | 216 | 143 |
| setup.py | H A D | 06-Apr-2020 | 4 KiB | 112 | 96 |
| test-driver | H A D | 06-Apr-2020 | 4.5 KiB | 149 | 87 |
| xc_version.h | H A D | 06-Apr-2020 | 482 | 26 | 13 |
| xc_version.h.in | H A D | 06-Apr-2020 | 537 | 26 | 19 |
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