Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
8828179
Add MSVC native cl.exe build support
lorisercole Apr 27, 2026
3829995
Silence noisy MSVC warnings
lorisercole Apr 27, 2026
7d83223
manage warnings
lorisercole May 4, 2026
a266e2a
avoid clang warning: strdup
lorisercole May 5, 2026
601f72e
formatting
lorisercole May 5, 2026
871fcc1
Revert strdup and silence warning
lorisercole May 26, 2026
3f417b3
Revert "Revert strdup and silence warning"
lorisercole May 27, 2026
466a1f2
Fix portability and memory leak in exchcxx_exception::what()
lorisercole May 27, 2026
4a931c3
comment cl warning suppression flags
lorisercole May 28, 2026
5746023
fix(msvc): add /EHsc and /Zc:preprocessor
lorisercole May 28, 2026
2e9de30
suppress(msvc): C4800 — implicit double-to-bool in generated kernel h…
lorisercole May 28, 2026
1243e1b
suppress(msvc): C4514 — unreferenced inline functions removed by linker
lorisercole May 28, 2026
106c044
suppress(msvc): C4710/C4711 — function inlining diagnostics
lorisercole May 28, 2026
74d17d0
suppress(msvc): C4061 — enumerator not handled by explicit switch case
lorisercole May 28, 2026
4cfce2a
suppress(msvc): C4266 — virtual function with no override available
lorisercole May 28, 2026
5fd0d51
suppress(msvc): C4702 — unreachable code in kernel dispatch tables
lorisercole May 28, 2026
e7110fe
suppress(msvc): C4365 — signed/unsigned mismatch in STL-heavy code
lorisercole May 28, 2026
87163da
suppress(msvc): C5045 — Spectre mitigation informational
lorisercole May 28, 2026
0f179ab
suppress(msvc): C4820/C4626 — struct padding and deleted assignment
lorisercole May 28, 2026
ff42cd1
fix(msvc): C4100/C4101 — unused tau params and vtau_k in deorbitalize…
lorisercole May 28, 2026
163be0e
fix(msvc): C4267 — size_t→int conversions in test files
lorisercole May 28, 2026
38285fc
fix(msvc): C4018/C4701 in xc_kernel_test.cxx
lorisercole May 28, 2026
46ba601
fix(msvc): C4189 — xcNumber unused when XC_MAJOR_VERSION <= 7
lorisercole May 28, 2026
a63ab7e
fix(msvc/gcc): C4267 in xc_functional_test.cxx — keep size_t, cast at…
lorisercole May 28, 2026
853780f
refactor(msvc): move warning-suppression flags from build script to C…
lorisercole May 28, 2026
f526b7a
fix(msvc): C4267 — remaining size_t→int casts in kern.eval_* and comp…
lorisercole May 28, 2026
6016041
fix(msvc): C4530 — add /EHsc via add_compile_options in top-level CMa…
lorisercole May 28, 2026
a5baf9b
fix(msvc): C4267 — npts should be int not size_t when sourced from re…
lorisercole May 28, 2026
49ac834
refactor(clang-cl): align warning flags with MSVC policy
lorisercole May 28, 2026
244fd15
build(clang-cl): add -Wall -Wextra policy flags to build script
lorisercole May 28, 2026
fff6bc9
fix(clang-cl): extend /EHsc to clang-cl — both cl and clang-cl accept it
lorisercole May 29, 2026
d92b809
build(clang-cl): reset the same CXX flags as the cl build script
lorisercole May 29, 2026
945c055
build(msvc): guard GCC/Clang developer warning flags behind if(NOT MSVC)
lorisercole May 29, 2026
f92bed6
fix(clang-cl): suppress CRT deprecation warnings in FetchContent'd libxc
lorisercole May 29, 2026
9bbf6eb
fix(msvc): add /permissive- globally to recognise C++ alternative tokens
lorisercole May 29, 2026
79dfa6d
cleanup
lorisercole May 29, 2026
ace341e
fix: npts should be size_t in XCKernel Metadata Validity test
lorisercole May 29, 2026
c79b769
fix(msvc): scope /EHsc and /permissive- to CXX only
lorisercole May 29, 2026
20a2d60
fix(msvc): make warning-suppression flags PRIVATE on exchcxx target
lorisercole May 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build
.vscode
*.*.swp
build*/
22 changes: 19 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ include(FetchContent)

# Set up project definition + version information
project( ExchCXX VERSION 1.0.0 LANGUAGES C CXX )
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if(MSVC)
# /EHsc: standard C++ exception-handling model (required by STL and noexcept).
# /permissive-: conformance mode — recognises C++ alternative tokens (not, and, or, …).
# Scoped to CXX only so libxc's C sources are not affected.
add_compile_options(
$<$<COMPILE_LANGUAGE:CXX>:/EHsc>
$<$<COMPILE_LANGUAGE:CXX>:/permissive->
)
endif()
Comment thread
lorisercole marked this conversation as resolved.

# ExchCXX Options
option( EXCHCXX_ENABLE_BENCHMARK "Enable Performance Benchmark" OFF )
Expand Down Expand Up @@ -81,7 +93,7 @@ else()
# if pinning to specific SHA change the FETCHCONTENT_LIBXC_GIT_SHALLOW default to OFF, https://cmake.org/cmake/help/latest/module/ExternalProject.html#git
GIT_TAG 7.0.0
GIT_SHALLOW ${FETCHCONTENT_LIBXC_GIT_SHALLOW}
PATCH_COMMAND sed -i -e "s/p->info->family != XC_KINETIC/p->info->kind != XC_KINETIC/g" src/work_mgga_inc.c
PATCH_COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_LIST_DIR}/cmake/patch_libxc_work_mgga.cmake"
)
set( Libxc_VERSION 7.0.0 )

Expand All @@ -90,12 +102,16 @@ else()

FetchContent_MakeAvailable( libxc )
add_library( Libxc::xc ALIAS xc )
target_include_directories( xc
PUBLIC
target_include_directories( xc
PUBLIC
$<BUILD_INTERFACE:${libxc_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${libxc_BINARY_DIR}/src>
$<BUILD_INTERFACE:${libxc_BINARY_DIR}>
)
if(MSVC)
# Suppress CRT deprecation warnings (strcpy, sscanf, etc.) in libxc C sources
target_compile_definitions( xc PRIVATE _CRT_SECURE_NO_WARNINGS )
endif()
message( STATUS "Libxc Source: ${libxc_SOURCE_DIR}" )

# disable unity builds for libxc
Expand Down
13 changes: 13 additions & 0 deletions cmake/patch_libxc_work_mgga.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# patch_libxc_work_mgga.cmake
# Portable replacement for:
# sed -i -e "s/p->info->family != XC_KINETIC/p->info->kind != XC_KINETIC/g" src/work_mgga_inc.c
# Run from the libxc source directory via PATCH_COMMAND.

set(_file "src/work_mgga_inc.c")
if(NOT EXISTS "${_file}")
message(FATAL_ERROR "patch_libxc_work_mgga.cmake: ${_file} not found (cwd=${CMAKE_CURRENT_SOURCE_DIR})")
endif()

file(READ "${_file}" _content)
string(REPLACE "p->info->family != XC_KINETIC" "p->info->kind != XC_KINETIC" _content "${_content}")
file(WRITE "${_file}" "${_content}")
Comment thread
lorisercole marked this conversation as resolved.
Comment thread
lorisercole marked this conversation as resolved.
21 changes: 10 additions & 11 deletions include/exchcxx/exceptions/exchcxx_exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@

#include <stdexcept>
#include <string>
#include <string.h>
#include <sstream>

namespace ExchCXX {
Expand All @@ -57,27 +56,27 @@ class exchcxx_exception : public std::exception {
std::string file_;
int line_;
std::string msg_prefix_;
std::string what_msg_;

const char* what() const noexcept override {
std::stringstream ss;
ss << "EXCHCXX Exception (" << msg_prefix_ << ")" << std::endl
<< " File " << file_ << std::endl
<< " Line " << line_ << std::endl;

auto msg = ss.str();

return strdup( msg.c_str() );
return what_msg_.c_str();
}

public:

exchcxx_exception( std::string file, int line, std::string msg) :
file_(file), line_(line), msg_prefix_(msg) { }
file_(std::move(file)), line_(line), msg_prefix_(std::move(msg)) {
std::stringstream ss;
ss << "EXCHCXX Exception (" << msg_prefix_ << ")" << std::endl
<< " File " << file_ << std::endl
<< " Line " << line_ << std::endl;
what_msg_ = ss.str();
}

};

#define EXCHCXX_BOOL_CHECK( MSG, V ) \
if( not (V) ) \
if( !(V) ) \
throw exchcxx_exception( __FILE__, __LINE__, MSG );

}
11 changes: 5 additions & 6 deletions include/exchcxx/impl/builtin/kernels/deorbitalized.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ struct kernel_traits<Deorbitalized<XCEF,KEDF>> {
static constexpr bool needs_laplacian = true;
static constexpr bool is_kedf = false;
static constexpr bool is_epc = false;
static constexpr double exx_coeff = xc_traits::exx_coeff + ke_traits::exx_coeff;
Comment thread
wavefunction91 marked this conversation as resolved.

BUILTIN_KERNEL_EVAL_RETURN
eval_exc_unpolar( double rho, double sigma, double lapl, double tau, double& eps ) {
eval_exc_unpolar( double rho, double sigma, double lapl, [[maybe_unused]] double tau, double& eps ) {

double TAU;
ke_traits::eval_exc_unpolar(rho, sigma, lapl, 0.0, TAU);
Expand All @@ -84,7 +83,7 @@ struct kernel_traits<Deorbitalized<XCEF,KEDF>> {
}

BUILTIN_KERNEL_EVAL_RETURN
eval_exc_vxc_unpolar( double rho, double sigma, double lapl, double tau, double& eps, double& vrho, double& vsigma, double& vlapl, double& vtau ) {
eval_exc_vxc_unpolar( double rho, double sigma, double lapl, [[maybe_unused]] double tau, double& eps, double& vrho, double& vsigma, double& vlapl, double& vtau ) {

double TAU, vrho_k, vsigma_k, vlapl_k, dummy;
ke_traits::eval_exc_vxc_unpolar(rho, sigma, lapl, 0.0, TAU, vrho_k, vsigma_k, vlapl_k, dummy);
Expand All @@ -101,7 +100,7 @@ struct kernel_traits<Deorbitalized<XCEF,KEDF>> {
}

BUILTIN_KERNEL_EVAL_RETURN
eval_exc_polar( double rho_a, double rho_b, double sigma_aa, double sigma_ab, double sigma_bb, double lapl_a, double lapl_b, double tau_a, double tau_b, double& eps ) {
eval_exc_polar( double rho_a, double rho_b, double sigma_aa, double sigma_ab, double sigma_bb, double lapl_a, double lapl_b, [[maybe_unused]] double tau_a, [[maybe_unused]] double tau_b, double& eps ) {

double TAU_A, TAU_B;
ke_traits::eval_exc_polar(rho_a, 0.0, sigma_aa, 0.0, 0.0, lapl_a, 0.0, 0.0, 0.0, TAU_A);
Expand All @@ -114,9 +113,9 @@ struct kernel_traits<Deorbitalized<XCEF,KEDF>> {
}

BUILTIN_KERNEL_EVAL_RETURN
eval_exc_vxc_polar( double rho_a, double rho_b, double sigma_aa, double sigma_ab, double sigma_bb, double lapl_a, double lapl_b, double tau_a, double tau_b, double& eps, double& vrho_a, double& vrho_b, double& vsigma_aa, double& vsigma_ab, double& vsigma_bb, double& vlapl_a, double& vlapl_b, double& vtau_a, double& vtau_b ) {
eval_exc_vxc_polar( double rho_a, double rho_b, double sigma_aa, double sigma_ab, double sigma_bb, double lapl_a, double lapl_b, [[maybe_unused]] double tau_a, [[maybe_unused]] double tau_b, double& eps, double& vrho_a, double& vrho_b, double& vsigma_aa, double& vsigma_ab, double& vsigma_bb, double& vlapl_a, double& vlapl_b, double& vtau_a, double& vtau_b ) {

double TAU_A, TAU_B, vrho_a_k, vrho_b_k, vsigma_aa_k, vsigma_bb_k, vlapl_a_k, vlapl_b_k, vtau_k, dummy;
double TAU_A, TAU_B, vrho_a_k, vrho_b_k, vsigma_aa_k, vsigma_bb_k, vlapl_a_k, vlapl_b_k, dummy;
ke_traits::eval_exc_vxc_polar(rho_a, 0.0, sigma_aa, 0.0, 0.0, lapl_a, 0.0, 0.0, 0.0, TAU_A, vrho_a_k, dummy, vsigma_aa_k, dummy, dummy, vlapl_a_k, dummy, dummy, dummy);
ke_traits::eval_exc_vxc_polar(rho_b, 0.0, sigma_bb, 0.0, 0.0, lapl_b, 0.0, 0.0, 0.0, TAU_B, vrho_b_k, dummy, vsigma_bb_k, dummy, dummy, vlapl_b_k, dummy, dummy, dummy);

Expand Down
16 changes: 8 additions & 8 deletions include/exchcxx/impl/builtin/kernels/screening_interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ struct mgga_screening_interface {
constexpr auto sigma_tol_sq = traits::sigma_tol * traits::sigma_tol;
sigma = safe_max(sigma, sigma_tol_sq);
tau = safe_max(tau, traits::tau_tol);
if constexpr (not traits::is_kedf) {
if constexpr (!traits::is_kedf) {
sigma = enforce_fermi_hole_curvature(sigma, rho, tau);
}

Expand All @@ -421,7 +421,7 @@ struct mgga_screening_interface {
sigma_bb = safe_max(sigma_bb, sigma_tol_sq);
tau_a = safe_max(tau_a, traits::tau_tol);
tau_b = safe_max(tau_b, traits::tau_tol);
if constexpr (not traits::is_kedf) {
if constexpr (!traits::is_kedf) {
sigma_aa = enforce_fermi_hole_curvature(sigma_aa, rho_a, tau_a);
sigma_bb = enforce_fermi_hole_curvature(sigma_bb, rho_b, tau_b);
}
Expand Down Expand Up @@ -450,7 +450,7 @@ struct mgga_screening_interface {
constexpr auto sigma_tol_sq = traits::sigma_tol * traits::sigma_tol;
sigma = safe_max(sigma, sigma_tol_sq);
tau = safe_max(tau, traits::tau_tol);
if constexpr (not traits::is_kedf) {
if constexpr (!traits::is_kedf) {
sigma = enforce_fermi_hole_curvature(sigma, rho, tau);
}
traits::eval_exc_vxc_unpolar_impl(rho, sigma, lapl, tau,
Expand Down Expand Up @@ -489,7 +489,7 @@ struct mgga_screening_interface {
sigma_bb = safe_max(sigma_bb, sigma_tol_sq);
tau_a = safe_max(tau_a, traits::tau_tol);
tau_b = safe_max(tau_b, traits::tau_tol);
if constexpr (not traits::is_kedf) {
if constexpr (!traits::is_kedf) {
sigma_aa = enforce_fermi_hole_curvature(sigma_aa, rho_a, tau_a);
sigma_bb = enforce_fermi_hole_curvature(sigma_bb, rho_b, tau_b);
}
Expand Down Expand Up @@ -519,7 +519,7 @@ BUILTIN_KERNEL_EVAL_RETURN
constexpr auto sigma_tol_sq = traits::sigma_tol * traits::sigma_tol;
sigma = safe_max(sigma, sigma_tol_sq);
tau = safe_max(tau, traits::tau_tol);
if constexpr (not traits::is_kedf) {
if constexpr (!traits::is_kedf) {
sigma = enforce_fermi_hole_curvature(sigma, rho, tau);
}
traits::eval_fxc_unpolar_impl(rho, sigma, lapl, tau,
Expand Down Expand Up @@ -575,7 +575,7 @@ BUILTIN_KERNEL_EVAL_RETURN
sigma_bb = safe_max(sigma_bb, sigma_tol_sq);
tau_a = safe_max(tau_a, traits::tau_tol);
tau_b = safe_max(tau_b, traits::tau_tol);
if constexpr (not traits::is_kedf) {
if constexpr (!traits::is_kedf) {
sigma_aa = enforce_fermi_hole_curvature(sigma_aa, rho_a, tau_a);
sigma_bb = enforce_fermi_hole_curvature(sigma_bb, rho_b, tau_b);
}
Expand Down Expand Up @@ -621,7 +621,7 @@ BUILTIN_KERNEL_EVAL_RETURN
sigma = safe_max(sigma, sigma_tol_sq);
tau = safe_max(tau, traits::tau_tol);

if constexpr (not traits::is_kedf) {
if constexpr (!traits::is_kedf) {
sigma = enforce_fermi_hole_curvature(sigma, rho, tau);
}

Expand Down Expand Up @@ -686,7 +686,7 @@ BUILTIN_KERNEL_EVAL_RETURN
tau_a = safe_max(tau_a, traits::tau_tol);
tau_b = safe_max(tau_b, traits::tau_tol);

if constexpr (not traits::is_kedf) {
if constexpr (!traits::is_kedf) {
sigma_aa = enforce_fermi_hole_curvature(sigma_aa, rho_a, tau_a);
sigma_bb = enforce_fermi_hole_curvature(sigma_bb, rho_b, tau_b);
}
Expand Down
6 changes: 3 additions & 3 deletions include/exchcxx/xc_functional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class XCFunctional {
inline bool sanity_check() const {

// Must have one kernel
if( not kernels_.size() ) return false;
if( !kernels_.size() ) return false;

// Polarization is all or nothing
int polar_one = kernels_.at(0).second.is_polarized();
Expand All @@ -103,7 +103,7 @@ class XCFunctional {
}
);

if( not polar_all ) return false;
if( !polar_all ) return false;

// If we made it, kernel is sane
return true;
Expand Down Expand Up @@ -164,7 +164,7 @@ class XCFunctional {
return std::any_of(
kernels_.begin(), kernels_.end(),
[](const auto& x) { return x.second.is_gga(); }
) and not is_mgga();
) && !is_mgga();
}

inline bool is_mgga() const {
Expand Down
36 changes: 31 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,33 @@ add_library( exchcxx ${EXCHCXX_SOURCES} )
# TARGET properties

target_compile_features( exchcxx PUBLIC cxx_std_17 )
if(MSVC)
target_compile_definitions( exchcxx PUBLIC _USE_MATH_DEFINES )
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") # clang-cl
target_compile_options( exchcxx PRIVATE
-Wno-sign-conversion # mirrors /wd4365: signed/unsigned in STL-heavy code
-Wno-switch-enum # mirrors /wd4061: intentional default: covers all kernels
)
Comment thread
lorisercole marked this conversation as resolved.
else() # cl
target_compile_options( exchcxx PUBLIC
/Zc:preprocessor # PUBLIC: public headers use NOTYPE empty macro; consumers need conforming preprocessor
)
# silence noisy level-4 warnings that appear because STL raises the level to 4 during template instantiations
target_compile_options( exchcxx PRIVATE
/wd4061 # enumerator not in switch case: intentional default: handler covers all kernels
/wd4266 # no override for virtual function: by-design partial override in APPROX specialisations
/wd4365 # signed/unsigned in STL code: safe, values always non-negative
/wd4514 # unreferenced inline removed: informational, linker dead-strips correctly
/wd4626 # assignment operator deleted: by-design non-copyable classes with reference members
/wd4702 # unreachable code: macro-expanded dispatch tables, not real dead code
/wd4710 # function not inlined: informational, optimizer decision
/wd4711 # function auto-inlined: informational, optimizer decision
/wd4800 # implicit double-to-bool: fires in auto-generated kernel headers, intentional
/wd4820 # struct padding: ABI layout decision, informational
/wd5045 # Spectre mitigation remark: informational, /Qspectre not in use
)
endif()
endif()
Comment thread
lorisercole marked this conversation as resolved.
if( EXCHCXX_ENABLE_LIBXC )
target_link_libraries( exchcxx PUBLIC Libxc::xc )
endif()
Expand All @@ -28,7 +55,6 @@ configure_file(
target_compile_definitions( exchcxx PUBLIC "EXCHCXX_HAS_CONFIG_H=1" )



# Device specific
if( EXCHCXX_ENABLE_CUDA )
include( cuda/exchcxx_cuda.cmake )
Expand All @@ -43,7 +69,6 @@ if( EXCHCXX_ENABLE_SYCL )
endif()



target_include_directories( exchcxx
PUBLIC
$<INSTALL_INTERFACE:include>
Expand All @@ -53,7 +78,9 @@ target_include_directories( exchcxx
)

include( CheckCXXCompilerFlag )
check_cxx_compiler_flag( -Wall EXCHCXX_CXX_HAS_WALL )
if(NOT MSVC) # under clang-cl, -Wall maps to /Wall (= -Weverything)
check_cxx_compiler_flag( -Wall EXCHCXX_CXX_HAS_WALL )
endif()
check_cxx_compiler_flag( -Wextra EXCHCXX_CXX_HAS_WEXTRA )
check_cxx_compiler_flag( -Wpedantic EXCHCXX_CXX_HAS_WPEDANTIC )
check_cxx_compiler_flag( -Wnon-virtual-dtor EXCHCXX_CXX_HAS_WNON_VIRTUAL_DTOR )
Expand All @@ -79,10 +106,10 @@ if( EXCHCXX_CXX_HAS_WSHADOW )
target_compile_options( exchcxx PRIVATE $<$<COMPILE_LANGUAGE:CXX>: -Wshadow -Werror=shadow> )
endif()


# INSTALL rules
add_library( ExchCXX::ExchCXX ALIAS exchcxx )


include( GNUInstallDirs )
set( INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/ExchCXX )

Expand All @@ -93,7 +120,6 @@ install(TARGETS exchcxx
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)


set_target_properties( exchcxx PROPERTIES EXPORT_NAME ExchCXX )

# Install Headers
Expand Down
2 changes: 1 addition & 1 deletion src/builtin_interface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ std::unique_ptr<BuiltinKernel>

// Bail if polarized eval is requested and not supported
EXCHCXX_BOOL_CHECK(kernel_map.key(kern) + " Needs to be Spin-Polarized!",
supports_unpolarized(kern) or polar == Spin::Polarized);
supports_unpolarized(kern) || polar == Spin::Polarized);

if( kern == Kernel::SlaterExchange )
return std::make_unique<BuiltinSlaterExchange>( polar );
Expand Down
13 changes: 6 additions & 7 deletions src/libxc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -256,21 +256,21 @@ std::unique_ptr< XCKernelImpl > LibxcKernelImpl::clone_() const {
bool LibxcKernelImpl::is_lda_() const noexcept {
return (kernel_.info->family == XC_FAMILY_LDA)
#if XC_MAJOR_VERSION > 6
or (kernel_.info->family == XC_FAMILY_HYB_LDA)
|| (kernel_.info->family == XC_FAMILY_HYB_LDA)
#endif
;
}

bool LibxcKernelImpl::is_gga_() const noexcept {
return
(kernel_.info->family == XC_FAMILY_GGA )
or (kernel_.info->family == XC_FAMILY_HYB_GGA);
|| (kernel_.info->family == XC_FAMILY_HYB_GGA);
}

bool LibxcKernelImpl::is_mgga_() const noexcept {
return
(kernel_.info->family == XC_FAMILY_MGGA )
or (kernel_.info->family == XC_FAMILY_HYB_MGGA);
|| (kernel_.info->family == XC_FAMILY_HYB_MGGA);
}

bool LibxcKernelImpl::needs_laplacian_() const noexcept {
Expand All @@ -291,12 +291,11 @@ bool LibxcKernelImpl::is_polarized_() const noexcept {
}

bool LibxcKernelImpl::is_epc_() const noexcept {
int xcNumber = xc_info()->number;
return
#if XC_MAJOR_VERSION > 7
xcNumber == XC_LDA_C_EPC17 or xcNumber == XC_LDA_C_EPC17_2 or xcNumber == XC_LDA_C_EPC18_1 or xcNumber == XC_LDA_C_EPC18_2;
int xcNumber = xc_info()->number;
return xcNumber == XC_LDA_C_EPC17 || xcNumber == XC_LDA_C_EPC17_2 || xcNumber == XC_LDA_C_EPC18_1 || xcNumber == XC_LDA_C_EPC18_2;
#else
false;
return false;
#endif
}

Expand Down
Loading