Skip to content

Commit 4be4f6d

Browse files
authored
Merge devel to master (#1161)
2 parents 355f8ed + 8453131 commit 4be4f6d

File tree

355 files changed

+18655
-21551
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

355 files changed

+18655
-21551
lines changed

.github/ISSUE_TEMPLATE/request-for-help.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Before asking questions, you can
1313
search the previous issues or discussions
1414
check [Manual](https://github.com/deepmodeling/dpgen).
1515

16-
Please **do not** post requests for help (e.g. with installing or using dpgen) here.
16+
Please **do not** post requests for help (e.g. with installing or using dpgen) here.
1717
Instead go to [discussions](https://github.com/deepmodeling/dpgen/discussions).
1818

1919
This issue tracker is for tracking dpgen development related issues only.

.github/workflows/test.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jobs:
1010
strategy:
1111
matrix:
1212
python-version: [3.8, 3.9]
13-
PYMATGEN_VERSION: [2022.7.19]
1413

1514
steps:
1615
- uses: actions/checkout@v2
@@ -19,12 +18,16 @@ jobs:
1918
with:
2019
python-version: ${{ matrix.python-version }}
2120
- name: Install dependencies
22-
run: pip install coverage pymatgen==${{ matrix.PYMATGEN_VERSION }} -e .
21+
run: pip install coverage git+https://github.com/materialsproject/pymatgen@b56698019098247ff54f50997a67c562b4375fc3 -e .
2322
- name: Test
2423
run: coverage run --source=./dpgen -m unittest -v && coverage report
2524
- uses: codecov/codecov-action@v3
2625
pass:
2726
needs: [build]
2827
runs-on: ubuntu-latest
28+
if: always()
2929
steps:
30-
- run: echo "All jobs passed"
30+
- name: Decide whether the needed jobs succeeded or failed
31+
uses: re-actors/alls-green@release/v1
32+
with:
33+
jobs: ${{ toJSON(needs) }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,3 @@ dbconfig.json
4242
_build
4343
tests/generator/calypso_test_path
4444
doc/api/
45-

.pre-commit-config.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.4.0
6+
hooks:
7+
# there are many log files in tests
8+
# TODO: seperate py files and log files
9+
- id: trailing-whitespace
10+
exclude: "^tests/.*$"
11+
- id: end-of-file-fixer
12+
exclude: "^tests/.*$"
13+
- id: check-yaml
14+
exclude: "^conda/.*$"
15+
#- id: check-json
16+
- id: check-added-large-files
17+
- id: check-merge-conflict
18+
- id: check-symlinks
19+
exclude: "^tests/tools/run_report_test_output/.*$"
20+
- id: check-toml
21+
# Python
22+
- repo: https://github.com/psf/black
23+
rev: 22.12.0
24+
hooks:
25+
- id: black-jupyter
26+
- repo: https://github.com/charliermarsh/ruff-pre-commit
27+
rev: v0.0.253
28+
hooks:
29+
- id: ruff
30+
args: ["--fix"]
31+
# numpydoc
32+
- repo: https://github.com/Carreau/velin
33+
rev: 0.0.12
34+
hooks:
35+
- id: velin
36+
args: ["--write"]
37+
ci:
38+
autoupdate_branch: devel

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
![logo](./doc/logo.svg)
2+
3+
--------------------------------------------------------------------------------
4+
15
# DP-GEN: A concurrent learning platform for the generation of reliable deep learning based potential energy models
26

37
[![GitHub release](https://img.shields.io/github/release/deepmodeling/dpgen.svg?maxAge=86400)](https://github.com/deepmodeling/dpgen/releases/)
48
[![doi:10.1016/j.cpc.2020.107206](https://img.shields.io/badge/DOI-10.1016%2Fj.cpc.2020.107206-blue)](https://doi.org/10.1016/j.cpc.2020.107206)
5-
![Citations](https://citations.njzjz.win/10.1016/j.cpc.2020.107206)
9+
[![Citations](https://citations.njzjz.win/10.1016/j.cpc.2020.107206)](https://badge.dimensions.ai/details/doi/10.1016/j.cpc.2020.107206)
610
[![conda install](https://img.shields.io/conda/dn/conda-forge/dpgen?label=conda%20install)](https://anaconda.org/conda-forge/dpgen)
711
[![pip install](https://img.shields.io/pypi/dm/dpgen?label=pip%20install)](https://pypi.org/project/dpgen)
812

codecov.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
ignore:
2+
- "tests"
3+
coverage:
4+
status:
5+
project:
6+
default:
7+
threshold: 100%
8+
patch:
9+
default:
10+
threshold: 100%

conda/conda_build_config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
channel_sources:
1+
channel_sources:
22
- defaults
33
- conda-forge
4-
channel_targets:
4+
channel_targets:
55
- deepmodeling

conda/construct.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ channels:
1111
specs:
1212
- python 3.8
1313
- pip
14-
- dpgen {{ version }}
14+
- dpgen {{ version }}
1515

1616
ignore_duplicate_files: True
1717

doc/autotest/Auto-test.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If, for some reasons, the main program terminated at stage `run`, one can easily
1515
`relax.json` is the parameter file. An example for `deepmd` relaxation is given as:
1616
```json
1717
{
18-
"structures": "confs/mp-*",
18+
"structures": ["confs/mp-*"],
1919
"interaction": {
2020
"type": "deepmd",
2121
"model": "frozen_model.pb",
@@ -30,8 +30,8 @@ where the key `structures` provides the structures to relax. `interaction` is pr
3030
### Task type
3131
There are now six task types implemented in the package: `vasp`, `abacus`, `deepmd`, `meam`, `eam_fs`, and `eam_alloy`. An `inter.json` file in json format containing the interaction parameters will be written in the directory of each task after `make`. We give input examples of the `interaction` part for each type below:
3232

33-
**VASP**:
34-
33+
**VASP**:
34+
3535
The default of `potcar_prefix` is "".
3636
```json
3737
"interaction": {
@@ -41,8 +41,8 @@ The default of `potcar_prefix` is "".
4141
"potcars": {"Al": "POTCAR.al", "Mg": "POTCAR.mg"}
4242
}
4343
```
44-
**ABACUS**:
45-
44+
**ABACUS**:
45+
4646
The default of `potcar_prefix` is "". The path of potcars/orb_files/deepks_desc is `potcar_prefix` + `potcars`/`orb_files`/`deepks_desc`.
4747
```json
4848
"interaction": {
@@ -62,7 +62,7 @@ The default of `potcar_prefix` is "". The path of potcars/orb_files/deepks_desc
6262
```json
6363
"interaction": {
6464
"type": "deepmd",
65-
"model": "frozen_model.pb",
65+
"model": "frozen_model.pb",
6666
"type_map": {"Al": 0, "Mg": 1}
6767
}
6868
```
@@ -81,8 +81,8 @@ Please make sure the [USER-MEAMC package](https://lammps.sandia.gov/doc/Packages
8181
Please make sure the [MANYBODY package](https://lammps.sandia.gov/doc/Packages_details.html#pkg-manybody) has already been installed in LAMMPS
8282
```json
8383
"interaction": {
84-
"type": "eam_fs (eam_alloy)",
85-
"model": "AlMg.eam.fs (AlMg.eam.alloy)",
84+
"type": "eam_fs (eam_alloy)",
85+
"model": "AlMg.eam.fs (AlMg.eam.alloy)",
8686
"type_map": {"Al": 1, "Mg": 2}
8787
}
8888
```
@@ -96,9 +96,9 @@ Now the supported property types are `eos`, `elastic`, `vacancy`, `interstitial`
9696
There are three operations in auto test package, namely `make`, `run`, and `post`. Here we take `eos` property as an example for property type.
9797

9898
### Make
99-
The `INCAR`, `POSCAR`, `POTCAR` input files for VASP or `in.lammps`, `conf.lmp`, and the interatomic potential files for LAMMPS will be generated in the directory `confs/mp-*/relaxation/relax_task` for relaxation or `confs/mp-*/eos_00/task.[0-9]*[0-9]` for EOS. The `machine.json` file is not needed for `make`. Example:
99+
The `INCAR`, `POSCAR`, `POTCAR` input files for VASP or `in.lammps`, `conf.lmp`, and the interatomic potential files for LAMMPS will be generated in the directory `confs/mp-*/relaxation/relax_task` for relaxation or `confs/mp-*/eos_00/task.[0-9]*[0-9]` for EOS. The `machine.json` file is not needed for `make`. Example:
100100
```bash
101-
dpgen autotest make relaxation.json
101+
dpgen autotest make relaxation.json
102102
```
103103

104104
### Run
@@ -110,5 +110,5 @@ dpgen autotest run relaxation.json machine.json
110110
### Post
111111
The post process of calculation results would be performed. `result.json` in json format will be generated in `confs/mp-*/relaxation/relax_task` for relaxation and `result.json` in json format and `result.out` in txt format in `confs/mp-*/eos_00` for EOS. The `machine.json` file is also not needed for `post`. Example:
112112
```bash
113-
dpgen autotest post relaxation.json
113+
dpgen autotest post relaxation.json
114114
```

doc/autotest/index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Auto test
99
:caption: Guidelines
1010

1111
Auto-test
12-
12+
1313
.. _Main-components::
1414

1515
.. toctree::
1616
:maxdepth: 2
1717
:caption: Main components
18-
18+
1919
Task-type
2020
Property-type
2121
Make-run-and-post
@@ -25,7 +25,7 @@ Auto test
2525
.. toctree::
2626
:maxdepth: 2
2727
:caption: Structure relaxation
28-
28+
2929
relaxation/index.rst
3030

3131
.. _Property::
@@ -41,13 +41,13 @@ Auto test
4141
.. toctree::
4242
:maxdepth: 2
4343
:caption: Refine
44-
44+
4545
refine/index.rst
4646

4747
.. _Reproduce::
4848

4949
.. toctree::
5050
:maxdepth: 2
5151
:caption: Reproduce
52-
52+
5353
reproduce/index.rst

0 commit comments

Comments
 (0)