Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 0 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ option(BUILD_SANDBOX "If on, builds the sandbox" OFF)

set(INSTALL_PATH "" CACHE STRING "Path to install the libraries")

SET(TYPE_ARCHITECTURE "native" CACHE STRING
"Choose the type of architecture to compile to in release mode."
)

########## COMPILATION FLAGS ##########
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Weffc++ -Wno-non-virtual-dtor")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
Expand All @@ -57,14 +53,6 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR

set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Og")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og")

# Add -march=${TYPE_ARCHITECTURE} (-march=native by default) to the release
# build flags
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -march=${TYPE_ARCHITECTURE}")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=${TYPE_ARCHITECTURE}")

set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -march=${TYPE_ARCHITECTURE}")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -march=${TYPE_ARCHITECTURE}")
endif()

########## START CONFIGURATION ##########
Expand Down
4 changes: 2 additions & 2 deletions bindings/rascal/representations/spherical_covariants.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,10 @@ def get_num_coefficients(self, n_species=1):
* self.hypers["max_angular"]
)
n_col *= 2 * self.hypers["covariant_lambda"] + 1
return int(n_col * n_species ** 2 * self.hypers["max_radial"] ** 2)
return int(n_col * n_species**2 * self.hypers["max_radial"] ** 2)
else:
return (
n_species ** 2
n_species**2
* self.hypers["max_radial"] ** 2
* int(
(
Expand Down
15 changes: 6 additions & 9 deletions bindings/rascal/utils/cg_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,12 @@ def compute_lambda_soap(spx, cg, lam, parity=0):
continue
if l2 - l1 > lam or l2 + l1 < lam:
continue
lsoap[..., nl, :] = (
cg.combine_einsum(
spx[..., lm_slice(l1)],
spx[..., lm_slice(l2)],
lam,
combination_string="ian,iAN->ianAN",
)
* (1 if l2 == l1 else SQRT_2)
)
lsoap[..., nl, :] = cg.combine_einsum(
spx[..., lm_slice(l1)],
spx[..., lm_slice(l2)],
lam,
combination_string="ian,iAN->ianAN",
) * (1 if l2 == l1 else SQRT_2)
nl += 1
return lsoap

Expand Down
4 changes: 2 additions & 2 deletions bindings/rascal/utils/radial_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def gto_width(sigma):
---Returns---
b: GTO (Gaussian) width
"""
return 1.0 / (2 * sigma ** 2)
return 1.0 / (2 * sigma**2)


def gto_prefactor(n, sigma):
Expand Down Expand Up @@ -125,7 +125,7 @@ def gto(r, n, sigma):
"""
b = gto_width(sigma)
N = gto_prefactor(n, sigma)
return N * r ** (n + 1) * np.exp(-b * r ** 2)
return N * r ** (n + 1) * np.exp(-b * r**2)


def gto_overlap(n, m, sigma_n, sigma_m):
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ nbsphinx>=0.8.1
pygments>=2.4.1
# Developers tools for linting and formatting
cpplint==1.5.5
black==20.8b1
black==22.3.0
# Developers tools - data generation scripts
ase
mpmath
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_modified_bessel_first_kind_ref_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def sbesseli_complete_square(n, a, r, x):
"""i_n(2arx)*\exp{-ar^2}*\exp{-ax^2}"""
z = 2 * a * r * x
return float(
sqrt(pi / (2 * z)) * besseli(n + 0.5, z) * exp(-a * r ** 2) * exp(-a * x ** 2)
sqrt(pi / (2 * z)) * besseli(n + 0.5, z) * exp(-a * r**2) * exp(-a * x**2)
)


Expand Down
2 changes: 1 addition & 1 deletion scripts/generate_spherical_covariant_ref_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def main(json_dump, save_kernel):

x = get_feature_vector(test_hypers, frames)
x0 = x.shape[0]
x = x.reshape((x0, 3, -1, (2 * lam + 1), nmax ** 2))
x = x.reshape((x0, 3, -1, (2 * lam + 1), nmax**2))
x = x.transpose((0, 3, 1, 2, 4))
x = x.reshape((x0 * (2 * lam + 1), -1))
kernel = np.dot(x, x.T)
Expand Down