Skip to content

Commit

Permalink
rm matrix impl.
Browse files Browse the repository at this point in the history
  • Loading branch information
Han Wang committed Mar 27, 2024
1 parent 7088047 commit 0183328
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions deepmd/utils/econf_embd.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,27 +160,6 @@
type_map = dpdata.periodic_table.ELEMENTS

Check warning on line 160 in deepmd/utils/econf_embd.py

View check run for this annotation

Codecov / codecov/patch

deepmd/utils/econf_embd.py#L160

Added line #L160 was not covered by tests


def make_element_embedding_matrix(
ename: str,
) -> np.ndarray:
"""Compute the embedding of one element."""
ret = np.zeros([maxn, maxl, maxm], dtype=np.int32)
ele = element(ename)
ec = ele.ec
occ = ec.spin_occupations()
for kk, vv in occ.items():
nn = kk[0] - 1
ll = lett_to_ln[kk[1]]
assert nn < maxn and ll < maxl
for ip in range(vv["pairs"]):
assert ip < maxm
ret[nn, ll, ip] = 2
for iu in range(vv["pairs"], vv["pairs"] + vv["unpaired"]):
assert iu < maxm
ret[nn, ll, iu] = 1
return ret


def make_empty_list_vec():
ret = {}
for kk in conf_keys:
Expand Down

0 comments on commit 0183328

Please sign in to comment.