-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add charge spin embed to CLI pipeline
- Loading branch information
1 parent
72f5aa7
commit a55af7e
Showing
10 changed files
with
97 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from mlff.nn.embed import AtomTypeEmbedSparse, ChargeEmbedSparse, SpinEmbedSparse | ||
|
||
|
||
def make_embedding_modules( | ||
num_features: int, | ||
use_charge_embed: bool, | ||
use_spin_embed: bool | ||
): | ||
embedding_modules = [] | ||
atom_type_embed = AtomTypeEmbedSparse( | ||
num_features=num_features, | ||
prop_keys=None | ||
) | ||
embedding_modules.append(atom_type_embed) | ||
|
||
# Embed the total charge. | ||
if use_charge_embed: | ||
charge_embed = ChargeEmbedSparse( | ||
num_features=num_features, | ||
prop_keys=None | ||
) | ||
embedding_modules.append(charge_embed) | ||
|
||
# Embed the number of unpaired electrons. | ||
if use_spin_embed: | ||
spin_embed = SpinEmbedSparse( | ||
num_features=num_features, | ||
prop_keys=None | ||
) | ||
embedding_modules.append(spin_embed) | ||
|
||
return embedding_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters