Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change econf embed to spin representation #4166

Merged
merged 6 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
5 changes: 3 additions & 2 deletions deepmd/dpmodel/utils/type_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ def change_type_map(
def get_econf_tebd(type_map, precision: str = "default"):
from deepmd.utils.econf_embd import (
ECONF_DIM,
electronic_configuration_embedding,
)
from deepmd.utils.econf_embd import (
normalized_electronic_configuration_embedding as electronic_configuration_embedding,
)
from deepmd.utils.econf_embd import type_map as periodic_table

Expand All @@ -240,6 +242,5 @@ def get_econf_tebd(type_map, precision: str = "default"):
[electronic_configuration_embedding[kk] for kk in type_map],
dtype=PRECISION_DICT[precision],
)
econf_tebd /= econf_tebd.sum(-1, keepdims=True) # do normalization
embed_input_dim = ECONF_DIM
return econf_tebd, embed_input_dim
Loading