Skip to content

Commit

Permalink
Changed l_cut to lcut in cg_combine.
Browse files Browse the repository at this point in the history
  • Loading branch information
YCC-ProjBackups committed Aug 24, 2023
1 parent 6841df6 commit 7fecde9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions anisoap/utils/equistore_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def cg_combine(
x_b,
feature_names=None,
clebsch_gordan=None,
l_cut=None,
lcut=None,
other_keys_match=None,
):
"""
Expand All @@ -213,12 +213,12 @@ def cg_combine(
lmax_a = np.asarray(x_a.keys["angular_channel"], dtype="int32").max()
lmax_b = np.asarray(x_b.keys["angular_channel"], dtype="int32").max()

if l_cut is None:
l_cut = lmax_a + lmax_b
if lcut is None:
lcut = lmax_a + lmax_b

# creates a CG object, if needed
if clebsch_gordan is None:
clebsch_gordan = ClebschGordanReal(l_cut)
clebsch_gordan = ClebschGordanReal(lcut)

other_keys_a = tuple(
name for name in x_a.keys.names if name not in ["angular_channel", "order_nu"]
Expand Down Expand Up @@ -328,7 +328,7 @@ def cg_combine(
continue
# loops over all permissible output blocks. note that blocks will
# be filled from different la, lb
for L in range(np.abs(lam_a - lam_b), 1 + min(lam_a + lam_b, l_cut)):
for L in range(np.abs(lam_a - lam_b), 1 + min(lam_a + lam_b, lcut)):
# determines parity of the block
NU = order_a + order_b
KEY = (
Expand Down
2 changes: 1 addition & 1 deletion tests/ex_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def single_pass(
anisoap_nu1,
anisoap_nu1,
clebsch_gordan=my_cg,
l_cut=0,
lcut=0,
other_keys_match=["species_center"],
)

Expand Down

0 comments on commit 7fecde9

Please sign in to comment.