Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
jwa7 committed Jan 31, 2025
1 parent 6768872 commit 12eced8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
3 changes: 1 addition & 2 deletions python/featomic/featomic/clebsch_gordan/_cg_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ def __init__(

if max_angular < 0:
raise ValueError(
f"Given `max_angular={max_angular}` negative. "
"Must be greater equal 0."
f"Given `max_angular={max_angular}` negative. Must be greater equal 0."
)
self._max_angular = max_angular

Expand Down
17 changes: 9 additions & 8 deletions python/featomic/featomic/clebsch_gordan/_density_correlations.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,19 @@ def compute(
where \\rho^{\\nu=1} is the input ``density`` of correlation order 1 (body order
2), and \\rho^{\\nu=n_{corr} + 1} is the output density of correlation order
``n_correlations + 1``.
The input ``density`` must have at least ``"o3_lambda"`` and ``"o3_sigma"``
key dimensions, as well as a single components axis with the ``"o3_mu"``
dimension. Any other key dimensions present will be matched, while all properties
``n_correlations + 1``.
The input ``density`` must have at least ``"o3_lambda"`` and ``"o3_sigma"`` key
dimensions, as well as a single components axis with the ``"o3_mu"`` dimension.
Any other key dimensions present will be matched, while all properties
dimensions will have their full tensor product computed.
For instance, if the key dimensions of ``density`` are ``"o3_lambda"``,
``"o3_sigma"``, ``"center_type"``, and ``"neighbor_type"``, pairs of blocks will
only be combined if they have both the same ``"center_type"`` and ``"neighbor_type"``. To
fully correlate all combinations of ``"neighbor_type"``, for example, this key
dimension should be moved to properties first, using :py:meth:`TensorMap.keys_to_properties`.
only be combined if they have both the same ``"center_type"`` and
``"neighbor_type"``. To fully correlate all combinations of ``"neighbor_type"``,
for example, this key dimension should be moved to properties first, using
:py:meth:`TensorMap.keys_to_properties`.
Before performing any correlations, the properties dimensions of ``density`` are
modified to carry a "_1" suffix. At each iteration, the dimension names of the
Expand Down
2 changes: 1 addition & 1 deletion python/featomic/featomic/clebsch_gordan/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def _compute_labels_full_cartesian_product(
# Check for no shared labels dimensions
for name in labels_1.names:
assert name not in labels_2.names, (
"`labels_1` and `labels_2` must not have a" " dimension ({name}) in common"
"`labels_1` and `labels_2` must not have a dimension ({name}) in common"
)
# Create the new labels names by concatenating the names of the two input labels
labels_names: List[str] = labels_1.names + labels_2.names
Expand Down

0 comments on commit 12eced8

Please sign in to comment.