-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dp: pt: rearrange folder structure of atomic_model and model. (#3268)
- create models `dpmodel.atomic_model` and `pt.model.atomic_model`. - place all the atomic model related codes into the new modules. - `PairTabModel` -> `PairTabAtomicModel` - `ZBLModel` -> `DPZBLModel` --------- Co-authored-by: Han Wang <wang_han@iapcm.ac.cn>
- Loading branch information
1 parent
0b68097
commit aae4850
Showing
26 changed files
with
300 additions
and
186 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
"""The atomic model provides the prediction of some property on each | ||
atom. All the atomic models are not supposed to be directly accessed | ||
by users, but it provides a convenient interface for the | ||
implementation of models. | ||
Taking the energy models for example, the developeres only needs to | ||
implement the atomic energy prediction via an atomic model, and the | ||
model can be automatically made by the `deepmd.dpmodel.make_model` | ||
method. The `DPModel` is made by | ||
``` | ||
DPModel = make_model(DPAtomicModel) | ||
``` | ||
""" | ||
|
||
|
||
from .base_atomic_model import ( | ||
BaseAtomicModel, | ||
) | ||
from .dp_atomic_model import ( | ||
DPAtomicModel, | ||
) | ||
from .linear_atomic_model import ( | ||
DPZBLLinearAtomicModel, | ||
LinearAtomicModel, | ||
) | ||
from .make_base_atomic_model import ( | ||
make_base_atomic_model, | ||
) | ||
from .pairtab_atomic_model import ( | ||
PairTabAtomicModel, | ||
) | ||
|
||
__all__ = [ | ||
"make_base_atomic_model", | ||
"BaseAtomicModel", | ||
"DPAtomicModel", | ||
"PairTabAtomicModel", | ||
"LinearAtomicModel", | ||
"DPZBLLinearAtomicModel", | ||
] |
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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,16 +1,23 @@ | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
from .dp_atomic_model import ( | ||
DPAtomicModel, | ||
) | ||
"""The model that takes the coordinates, cell and atom types as input | ||
and predicts some property. The models are automatically generated from | ||
atomic models by the `deepmd.dpmodel.make_model` method. | ||
The `make_model` method does the reduction, auto-differentiation | ||
(dummy for dpmodels) and communication of the atomic properties | ||
according to output variable definition | ||
`deepmd.dpmodel.OutputVariableDef`. | ||
""" | ||
|
||
from .dp_model import ( | ||
DPModel, | ||
) | ||
from .make_base_atomic_model import ( | ||
make_base_atomic_model, | ||
from .make_model import ( | ||
make_model, | ||
) | ||
|
||
__all__ = [ | ||
"DPModel", | ||
"DPAtomicModel", | ||
"make_base_atomic_model", | ||
"make_model", | ||
] |
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,37 @@ | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
"""The atomic model provides the prediction of some property on each | ||
atom. All the atomic models are not supposed to be directly accessed | ||
by users, but it provides a convenient interface for the | ||
implementation of models. | ||
Taking the energy models for example, the developeres only needs to | ||
implement the atomic energy prediction via an atomic model, and the | ||
model can be automatically made by the `deepmd.dpmodel.make_model` | ||
method. The `DPModel` is made by | ||
``` | ||
DPModel = make_model(DPAtomicModel) | ||
``` | ||
""" | ||
|
||
from .base_atomic_model import ( | ||
BaseAtomicModel, | ||
) | ||
from .dp_atomic_model import ( | ||
DPAtomicModel, | ||
) | ||
from .linear_atomic_model import ( | ||
DPZBLLinearAtomicModel, | ||
LinearAtomicModel, | ||
) | ||
from .pairtab_atomic_model import ( | ||
PairTabAtomicModel, | ||
) | ||
|
||
__all__ = [ | ||
"BaseAtomicModel", | ||
"DPAtomicModel", | ||
"PairTabAtomicModel", | ||
"LinearAtomicModel", | ||
"DPZBLLinearAtomicModel", | ||
] |
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
Oops, something went wrong.