-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathxc-info.jl
44 lines (38 loc) · 1.4 KB
/
xc-info.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using Libxc
using Printf
length(ARGS) == 1 || error("Usage: xc-info.jl identifier")
func = Functional(Symbol(ARGS[1]))
for s in (:identifier, :name, :family, :kind)
@printf "%-10s: %-20s\n" string(s) getproperty(func, s)
end
println()
if is_global_hybrid(func)
println("This is a global hybrid functional with $(100func.exx_coefficient)% " *
"exact exchange")
elseif is_range_separated(func)
print("This is a range-separated hybrid functional with range-separation " *
"constant $(func.omega) and $(100func.alpha + 100func.beta)% short-range " *
"and $(100func.alpha) long-range exact exchange")
if :hyb_lcy in func.flags || :hym_camy in func.flags
println("using the Yukawa kernel.")
elseif :hyb_lc in func.flags || :hym_cam in func.flags
println("using the Coulomb kernel.")
end
else
println("This is a pure functional with no exact exchange.")
end
println()
println("References:")
for ref in func.references
println(" *) $(ref.reference)")
if !isempty(ref.doi)
println(" doi: $(ref.doi)")
end
end
println()
println("Implementation has support for:")
:exc in func.flags && println(" *) energy")
:vxc in func.flags && println(" *) 1st derivative (potential)")
:fxc in func.flags && println(" *) 2nd derivative (kernel)")
:kxc in func.flags && println(" *) 3rd derivative")
:lxc in func.flags && println(" *) 4th derivative")