(last revised, LC, VVK & SBT: 16 June 2016) How to use the KSDT XC free-energy implemented in the LibXC library - L. Calderin, V.V. Karasiev, and S.B. Trickey, Univ. Florida ====================================================================== I. BACKGROUND - This HOWTO file provides instructions for use of the KSDT LSDA XC free-energy functional (Karasiev, Sjostrom, Dufty, Trickey, Phys. Rev. Lett. 112, 076403 (2014)) as implemented in the LibXC 3.0 library. BEWARE: Failure to follow this procedure will result in the electron temperature (T) being left at 0 K (zero). We assume that users have the LibXC library installed and know how to call standard ground-state LSDA XC functionals. In addition to the standard LibXC LSDA interface (see the LibXC manual: http://www.tddft.org/programs/octopus/wiki/index.php/Libxc:manual#LDA), KSDT REQUIRES an additional call to a subroutine which sets the value of the electron temperature (T) in Hartree atomic units. II. FORTRAN implementation ========================== FORTRAN declarations and calls in the calling program should appear as follows (see below regarding C code): USE XC_F90_TYPES USE XC_f90_LIB ... TYPE(xc_f90_pointer_t) :: x_func,c_func,ksdt_func TYPE(xc_f90_pointer_t) :: x_info,c_info,ksdt_info ... call xc_f90_func_init(ksdt_func,ksdt_info,XC_LDA_XC_KSDT,XC_UNPOLARIZED) ... call xc_f90_lda_xc_ksdt_set_par(ksdt_func,T) !!! This call sets up the temperature T ... call xc_f90_lda_exc_vxc(ksdt_func,size,rho,fxc,vxc) ... call xc_f90_func_end(xc_func) ... III. C code implementation - ============================ A C version of the test code (next section) also is provided. Please refer to that code itself to see how to do the C declarations and calls to KSDT in LibXC. IV. How to test the KSDT subroutine - ===================================== We also provide a test code (lxc-ksdt-test-f90.f90 file) which, if the call to KSDT is correct, will reproduce the data in Table S1 of the Supplemental Material for the above-cited Phys. Rev. Lett. To use the test code, proceed as follows: 1. Install the LibXC 3.0 library in $LIBXCDIR 2. Compile the lxc-ksdt-test-f90_v6.f90 file: ifort lxc-ksdt-test-f90_v6.f90 -I $LIBXCDIR/include -L $LIBXCDIR/lib -lxcf90 -lxc -o lxc-ksdt-test-f90_v6.x 3. Execute: ./lxc-ksdt-test-f90_v6.x > lxc-ksdt-test-f90_v6.dat 4. Compare with the reference data in lxc-ksdt-test-f90_ref_v6.dat --end--