function ps_HasSemilocalPotentials(ps) result(p) type(ps_t), intent(in) :: ps logical :: p ! p = (associated(ps%semilocal)) end function ps_HasSemilocalPotentials