Libxc.jl

Build StatusLicense

This package provides Julia bindings to the libxc library for common exchange-correlation functionals in density-functional theory.

Usage

Install the library from Julia as usual:

] add Libxc

and then for example:

using Libxc

rho = [0.1, 0.2, 0.3, 0.4, 0.5]
sigma = [0.2, 0.3, 0.4, 0.5, 0.6]
result = similar(rho)

# LDA exchange
lda_x = Functional(:lda_x)
evaluate_lda!(lda_x, rho, E=result)
@show result
# [-0.342809, -0.431912, -0.494416, -0.544175, -0.586194]

# GGA exchange
gga_x = Functional(:gga_x_pbe)
evaluate_gga!(gga_x, rho, sigma, E=result)
@show result
# [-0.452598, -0.478878, -0.520674, -0.561428, -0.598661]