-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'devel' into feat/zbl-consistency-test
- Loading branch information
Showing
35 changed files
with
476 additions
and
74 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
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 |
---|---|---|
@@ -1,2 +1,8 @@ | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
"""JAX backend.""" | ||
|
||
from deepmd.utils.entry_point import ( | ||
load_entry_point, | ||
) | ||
|
||
load_entry_point("deepmd.jax") |
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,26 @@ | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
from typing import ( | ||
Any, | ||
) | ||
|
||
from deepmd.dpmodel.descriptor.hybrid import DescrptHybrid as DescrptHybridDP | ||
from deepmd.jax.common import ( | ||
ArrayAPIVariable, | ||
flax_module, | ||
to_jax_array, | ||
) | ||
from deepmd.jax.descriptor.base_descriptor import ( | ||
BaseDescriptor, | ||
) | ||
|
||
|
||
@BaseDescriptor.register("hybrid") | ||
@flax_module | ||
class DescrptHybrid(DescrptHybridDP): | ||
def __setattr__(self, name: str, value: Any) -> None: | ||
if name in {"nlist_cut_idx"}: | ||
value = [ArrayAPIVariable(to_jax_array(vv)) for vv in value] | ||
elif name in {"descrpt_list"}: | ||
value = [BaseDescriptor.deserialize(vv.serialize()) for vv in value] | ||
|
||
return super().__setattr__(name, value) |
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 |
---|---|---|
@@ -1,10 +1,14 @@ | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
from deepmd.jax.fitting.fitting import ( | ||
DipoleFittingNet, | ||
DOSFittingNet, | ||
EnergyFittingNet, | ||
PolarFittingNet, | ||
) | ||
|
||
__all__ = [ | ||
"EnergyFittingNet", | ||
"DOSFittingNet", | ||
"DipoleFittingNet", | ||
"PolarFittingNet", | ||
] |
Oops, something went wrong.