subroutine ps_LibxcFunctional_Get(ps,i,name,code,type,weight)
type(ps_t), intent(in) :: ps
integer, intent(in) :: i
character(len=*), intent(out), optional :: name
integer, intent(out), optional :: code
character(len=*), intent(out), optional :: type
real(dp), intent(out), optional :: weight
call check_index(i,ps%xc_info%n_functs_libxc,"libxc functional")
if (present(name)) then
name = ps%xc_info%libxc_name(i)
endif
if (present(code)) then
code = ps%xc_info%libxc_id(i)
endif
if (present(type)) then
type = ps%xc_info%libxc_type(i)
endif
if (present(weight)) then
weight = ps%xc_info%libxc_weight(i)
endif
end subroutine ps_LibxcFunctional_Get