dpdata 1.0.2__tar.gz → 1.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dpdata-1.0.2 → dpdata-1.2.0}/.github/ISSUE_TEMPLATE/bug_report.yml +1 -1
- {dpdata-1.0.2 → dpdata-1.2.0}/.github/ISSUE_TEMPLATE/feature_request.yml +1 -1
- {dpdata-1.0.2 → dpdata-1.2.0}/.github/workflows/benchmark.yml +4 -4
- {dpdata-1.0.2 → dpdata-1.2.0}/.github/workflows/pub-pypi.yml +3 -3
- {dpdata-1.0.2 → dpdata-1.2.0}/.github/workflows/pyright.yml +3 -3
- {dpdata-1.0.2 → dpdata-1.2.0}/.github/workflows/test.yml +4 -4
- dpdata-1.2.0/.github/workflows/test_import.yml +55 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/.pre-commit-config.yaml +1 -1
- {dpdata-1.0.2 → dpdata-1.2.0}/AGENTS.md +3 -3
- {dpdata-1.0.2 → dpdata-1.2.0}/MANIFEST.in +1 -0
- dpdata-1.2.0/PKG-INFO +239 -0
- dpdata-1.2.0/README.md +190 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/_version.py +3 -3
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/ase_calculator.py +5 -3
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/bond_order_system.py +4 -3
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/cli.py +13 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/data_type.py +9 -2
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/driver.py +13 -7
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/format.py +8 -2
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/abacus/md.py +9 -3
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/abacus/relax.py +3 -1
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/abacus/scf.py +3 -1
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/abacus/stru.py +122 -14
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/amber/md.py +3 -1
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/amber/sqm.py +4 -1
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/cp2k/output.py +76 -10
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/deepmd/comp.py +6 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/deepmd/hdf5.py +12 -9
- dpdata-1.2.0/dpdata/formats/deepmd/lmdb/__init__.py +5 -0
- dpdata-1.2.0/dpdata/formats/deepmd/lmdb/format.py +2139 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/deepmd/mixed.py +98 -5
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/deepmd/raw.py +6 -0
- dpdata-1.2.0/dpdata/formats/dftbplus/output.py +133 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/gaussian/fchk.py +14 -12
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/gromacs/gro.py +6 -1
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/lammps/dump.py +293 -33
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/lammps/lmp.py +20 -2
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/psi4/input.py +1 -1
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/pwmat/atomconfig.py +3 -1
- dpdata-1.2.0/dpdata/formats/qe/__init__.py +5 -0
- dpdata-1.2.0/dpdata/formats/qe/pwmd.py +14 -0
- dpdata-1.2.0/dpdata/formats/qe/scf.py +555 -0
- dpdata-1.2.0/dpdata/formats/qe/traj.py +684 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/rdkit/sanitize.py +0 -1
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/vasp/outcar.py +163 -8
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/vasp/poscar.py +12 -0
- dpdata-1.2.0/dpdata/formats/xyz/_unit_convert.py +161 -0
- dpdata-1.2.0/dpdata/formats/xyz/quip_gap_xyz.py +398 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/md/rdf.py +14 -3
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/periodic_table.json +120 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugins/3dmol.py +7 -2
- dpdata-1.2.0/dpdata/plugins/abacus.py +241 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugins/amber.py +103 -2
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugins/ase.py +64 -17
- dpdata-1.2.0/dpdata/plugins/cp2k.py +144 -0
- dpdata-1.2.0/dpdata/plugins/deepmd.py +1021 -0
- dpdata-1.2.0/dpdata/plugins/dftbplus.py +70 -0
- dpdata-1.2.0/dpdata/plugins/fhi_aims.py +107 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugins/gaussian.py +81 -1
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugins/gromacs.py +19 -2
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugins/lammps.py +35 -2
- dpdata-1.2.0/dpdata/plugins/list.py +44 -0
- dpdata-1.2.0/dpdata/plugins/lmdb.py +30 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugins/n2p2.py +5 -3
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugins/openmx.py +3 -2
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugins/orca.py +10 -5
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugins/psi4.py +20 -8
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugins/pwmat.py +53 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugins/pymatgen.py +89 -6
- dpdata-1.2.0/dpdata/plugins/qe.py +177 -0
- dpdata-1.2.0/dpdata/plugins/rdkit.py +128 -0
- dpdata-1.2.0/dpdata/plugins/siesta.py +144 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugins/vasp.py +128 -0
- dpdata-1.2.0/dpdata/plugins/xyz.py +213 -0
- dpdata-1.2.0/dpdata/serialization.py +243 -0
- dpdata-1.2.0/dpdata/skills.py +89 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/system.py +205 -67
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/utils.py +11 -7
- dpdata-1.2.0/dpdata.egg-info/PKG-INFO +239 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata.egg-info/SOURCES.txt +25 -3
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata.egg-info/requires.txt +4 -3
- dpdata-1.2.0/dpdata.egg-info/scm_file_list.json +866 -0
- dpdata-1.2.0/dpdata.egg-info/scm_version.json +8 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/pyproject.toml +25 -5
- dpdata-1.2.0/setup.py +53 -0
- dpdata-1.2.0/skills/README.md +14 -0
- dpdata-1.2.0/skills/dpdata-cli/README.md +6 -0
- dpdata-1.2.0/skills/dpdata-cli/SKILL.md +17 -0
- dpdata-1.2.0/skills/dpdata-convert/SKILL.md +69 -0
- dpdata-1.0.2/skills/dpdata-cli/SKILL.md → dpdata-1.2.0/skills/dpdata-convert/references/cli-reference.md +35 -1
- dpdata-1.2.0/skills/dpdata-convert/references/producers/abacus.md +18 -0
- dpdata-1.2.0/skills/dpdata-convert/references/producers/cp2k.md +19 -0
- dpdata-1.2.0/skills/dpdata-convert/references/producers/qe.md +16 -0
- dpdata-1.2.0/skills/dpdata-convert/references/producers/vasp.md +19 -0
- dpdata-1.2.0/skills/dpdata-convert/references/semantic-validation.md +43 -0
- dpdata-1.2.0/skills/dpdata-driver/SKILL.md +13 -0
- dpdata-1.2.0/skills/dpdata-extend/SKILL.md +27 -0
- dpdata-1.2.0/skills/dpdata-inspect/SKILL.md +62 -0
- dpdata-1.2.0/skills/dpdata-inspect/scripts/validate_labeled_system.py +401 -0
- dpdata-1.2.0/skills/dpdata-minimizer/SKILL.md +13 -0
- dpdata-1.2.0/skills/dpdata-plugin/SKILL.md +13 -0
- dpdata-1.2.0/skills/dpdata-workflows/SKILL.md +32 -0
- dpdata-1.0.2/.github/workflows/test_import.yml +0 -18
- dpdata-1.0.2/PKG-INFO +0 -105
- dpdata-1.0.2/README.md +0 -57
- dpdata-1.0.2/dpdata/formats/dftbplus/output.py +0 -83
- dpdata-1.0.2/dpdata/formats/lmdb/__init__.py +0 -5
- dpdata-1.0.2/dpdata/formats/lmdb/format.py +0 -286
- dpdata-1.0.2/dpdata/formats/qe/__init__.py +0 -5
- dpdata-1.0.2/dpdata/formats/qe/scf.py +0 -188
- dpdata-1.0.2/dpdata/formats/qe/traj.py +0 -284
- dpdata-1.0.2/dpdata/formats/xyz/quip_gap_xyz.py +0 -250
- dpdata-1.0.2/dpdata/plugins/abacus.py +0 -120
- dpdata-1.0.2/dpdata/plugins/cp2k.py +0 -53
- dpdata-1.0.2/dpdata/plugins/deepmd.py +0 -507
- dpdata-1.0.2/dpdata/plugins/dftbplus.py +0 -63
- dpdata-1.0.2/dpdata/plugins/fhi_aims.py +0 -53
- dpdata-1.0.2/dpdata/plugins/list.py +0 -24
- dpdata-1.0.2/dpdata/plugins/lmdb.py +0 -6
- dpdata-1.0.2/dpdata/plugins/qe.py +0 -55
- dpdata-1.0.2/dpdata/plugins/rdkit.py +0 -49
- dpdata-1.0.2/dpdata/plugins/siesta.py +0 -68
- dpdata-1.0.2/dpdata/plugins/xyz.py +0 -116
- dpdata-1.0.2/dpdata.egg-info/PKG-INFO +0 -105
- dpdata-1.0.2/skills/dpdata-cli/README.md +0 -71
- {dpdata-1.0.2 → dpdata-1.2.0}/.git-blame-ignore-revs +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/.git_archival.txt +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/.gitattributes +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/.github/ISSUE_TEMPLATE/generic-issue.yml +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/.github/dependabot.yml +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/.github/workflows/mirror_gitee.yml +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/.gitignore +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/.readthedocs.yaml +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/LICENSE +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/benchmark/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/benchmark/test_import.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/__about__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/__main__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/abacus/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/amber/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/amber/mask.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/cp2k/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/cp2k/cell.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/deepmd/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/dftbplus/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/fhi_aims/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/fhi_aims/output.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/gaussian/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/gaussian/gjf.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/gaussian/log.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/gromacs/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/lammps/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/openmx/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/openmx/omx.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/orca/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/orca/output.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/psi4/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/psi4/output.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/pwmat/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/pwmat/movement.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/pymatgen/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/pymatgen/molecule.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/pymatgen/structure.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/rdkit/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/rdkit/utils.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/siesta/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/siesta/aiMD_output.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/siesta/output.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/vasp/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/vasp/xml.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/xyz/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/formats/xyz/xyz.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/md/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/md/msd.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/md/pbc.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/md/water.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/periodic_table.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugin.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/plugins/__init__.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/py.typed +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/stat.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata/unit.py +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata.egg-info/dependency_links.txt +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata.egg-info/entry_points.txt +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/dpdata.egg-info/top_level.txt +0 -0
- {dpdata-1.0.2 → dpdata-1.2.0}/setup.cfg +0 -0
- /dpdata-1.0.2/skills/dpdata-driver/SKILL.md → /dpdata-1.2.0/skills/dpdata-extend/references/driver.md +0 -0
- /dpdata-1.0.2/skills/dpdata-plugin/SKILL.md → /dpdata-1.2.0/skills/dpdata-extend/references/format-plugin.md +0 -0
- /dpdata-1.0.2/skills/dpdata-minimizer/SKILL.md → /dpdata-1.2.0/skills/dpdata-extend/references/minimizer.md +0 -0
|
@@ -17,7 +17,7 @@ body:
|
|
|
17
17
|
id: details
|
|
18
18
|
attributes:
|
|
19
19
|
label: Detailed Description
|
|
20
|
-
description: "Please explain how you would like to see
|
|
20
|
+
description: "Please explain how you would like to see dpdata enhanced, what feature(s) you are looking for, what specific problems this will solve. If possible, provide references to relevant background information like publications or web pages, and whether you are planning to implement the enhancement yourself or would like to participate in the implementation. If applicable add a reference to an existing bug report or issue that this will address."
|
|
21
21
|
placeholder:
|
|
22
22
|
value:
|
|
23
23
|
validations:
|
|
@@ -9,9 +9,9 @@ jobs:
|
|
|
9
9
|
if: ${{ github.repository_owner == 'deepmodeling' }}
|
|
10
10
|
runs-on: ubuntu-latest
|
|
11
11
|
steps:
|
|
12
|
-
- uses: actions/checkout@
|
|
12
|
+
- uses: actions/checkout@v7
|
|
13
13
|
- name: Set up Python
|
|
14
|
-
uses: actions/setup-python@
|
|
14
|
+
uses: actions/setup-python@v7
|
|
15
15
|
with:
|
|
16
16
|
python-version: 3.12
|
|
17
17
|
- uses: astral-sh/setup-uv@v7
|
|
@@ -21,9 +21,9 @@ jobs:
|
|
|
21
21
|
**/requirements*.txt
|
|
22
22
|
**/pyproject.toml
|
|
23
23
|
- name: Install dependencies
|
|
24
|
-
run: uv pip install --system .[test,amber,ase,pymatgen,benchmark] rdkit openbabel
|
|
24
|
+
run: uv pip install --system .[test,amber,ase,pymatgen,benchmark] rdkit 'openbabel>=3.2.0'
|
|
25
25
|
- name: Run benchmarks
|
|
26
|
-
uses: CodSpeedHQ/action@
|
|
26
|
+
uses: CodSpeedHQ/action@v5
|
|
27
27
|
with:
|
|
28
28
|
token: ${{ secrets.CODSPEED_TOKEN }}
|
|
29
29
|
mode: walltime
|
|
@@ -8,10 +8,10 @@ jobs:
|
|
|
8
8
|
name: Build and publish Python distributions to PyPI
|
|
9
9
|
runs-on: ubuntu-latest
|
|
10
10
|
steps:
|
|
11
|
-
- uses: actions/checkout@
|
|
11
|
+
- uses: actions/checkout@v7
|
|
12
12
|
|
|
13
13
|
- name: Set up Python 3.10
|
|
14
|
-
uses: actions/setup-python@
|
|
14
|
+
uses: actions/setup-python@v7
|
|
15
15
|
with:
|
|
16
16
|
python-version: "3.10"
|
|
17
17
|
|
|
@@ -33,6 +33,6 @@ jobs:
|
|
|
33
33
|
|
|
34
34
|
- name: Publish distribution to PyPI
|
|
35
35
|
if: startsWith(github.ref, 'refs/tags')
|
|
36
|
-
uses: pypa/gh-action-pypi-publish@
|
|
36
|
+
uses: pypa/gh-action-pypi-publish@v1.14.3
|
|
37
37
|
with:
|
|
38
38
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -8,12 +8,12 @@ jobs:
|
|
|
8
8
|
name: pyright
|
|
9
9
|
runs-on: ubuntu-latest
|
|
10
10
|
steps:
|
|
11
|
-
- uses: actions/checkout@
|
|
12
|
-
- uses: actions/setup-python@
|
|
11
|
+
- uses: actions/checkout@v7
|
|
12
|
+
- uses: actions/setup-python@v7
|
|
13
13
|
with:
|
|
14
14
|
python-version: '3.12'
|
|
15
15
|
- run: pip install uv
|
|
16
|
-
- run: uv pip install --system -e .[amber,ase,pymatgen] rdkit openbabel
|
|
16
|
+
- run: uv pip install --system -e .[amber,ase,pymatgen] rdkit 'openbabel>=3.2.0'
|
|
17
17
|
- uses: jakebailey/pyright-action@v3
|
|
18
18
|
with:
|
|
19
19
|
version: 1.1.363
|
|
@@ -12,10 +12,10 @@ jobs:
|
|
|
12
12
|
python-version: ["3.10", "3.13"]
|
|
13
13
|
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v7
|
|
16
16
|
# set up conda
|
|
17
17
|
- name: Set up Python ${{ matrix.python-version }}
|
|
18
|
-
uses: actions/setup-python@
|
|
18
|
+
uses: actions/setup-python@v7
|
|
19
19
|
with:
|
|
20
20
|
python-version: ${{ matrix.python-version }}
|
|
21
21
|
- uses: astral-sh/setup-uv@v7
|
|
@@ -26,11 +26,11 @@ jobs:
|
|
|
26
26
|
**/pyproject.toml
|
|
27
27
|
cache-suffix: "py${{ matrix.python-version }}"
|
|
28
28
|
- name: Install dependencies
|
|
29
|
-
run: uv pip install --system .[test,amber,ase,pymatgen] coverage ./tests/plugin rdkit openbabel
|
|
29
|
+
run: uv pip install --system .[test,amber,ase,pymatgen] coverage ./tests/plugin rdkit 'openbabel>=3.2.0'
|
|
30
30
|
- name: Test
|
|
31
31
|
run: cd tests && coverage run --source=../dpdata -m unittest && cd .. && coverage combine tests/.coverage && coverage report
|
|
32
32
|
- name: Run codecov
|
|
33
|
-
uses: codecov/codecov-action@
|
|
33
|
+
uses: codecov/codecov-action@v7
|
|
34
34
|
env:
|
|
35
35
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
36
36
|
with:
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: test Python import
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
- push
|
|
5
|
+
- pull_request
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
build:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v7
|
|
12
|
+
- uses: actions/setup-python@v7
|
|
13
|
+
with:
|
|
14
|
+
python-version: '3.10'
|
|
15
|
+
architecture: 'x64'
|
|
16
|
+
- run: python -m pip install uv
|
|
17
|
+
- run: python -m uv pip install --system .
|
|
18
|
+
- name: Test core import and YAML serialization
|
|
19
|
+
run: |
|
|
20
|
+
python - <<'PY'
|
|
21
|
+
import tempfile
|
|
22
|
+
from pathlib import Path
|
|
23
|
+
|
|
24
|
+
import dpdata
|
|
25
|
+
|
|
26
|
+
system = dpdata.System(
|
|
27
|
+
"tests/poscars/POSCAR.h2o.md", fmt="vasp/poscar"
|
|
28
|
+
)
|
|
29
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
30
|
+
filename = Path(tmpdir) / "system.yaml"
|
|
31
|
+
system.dump(filename)
|
|
32
|
+
loaded = dpdata.System.load(filename)
|
|
33
|
+
assert loaded.formula == system.formula
|
|
34
|
+
assert loaded.get_nframes() == system.get_nframes()
|
|
35
|
+
PY
|
|
36
|
+
- name: Test core import without LMDB dependencies
|
|
37
|
+
run: |
|
|
38
|
+
python -m pip uninstall -y lmdb msgpack
|
|
39
|
+
python - <<'PY'
|
|
40
|
+
import dpdata
|
|
41
|
+
|
|
42
|
+
system = dpdata.System(
|
|
43
|
+
"tests/poscars/POSCAR.h2o.md", fmt="vasp/poscar"
|
|
44
|
+
)
|
|
45
|
+
assert system.get_nframes() == 1
|
|
46
|
+
|
|
47
|
+
try:
|
|
48
|
+
dpdata.System("missing.lmdb", fmt="lmdb")
|
|
49
|
+
except ModuleNotFoundError as exc:
|
|
50
|
+
assert "lmdb" in str(exc)
|
|
51
|
+
else:
|
|
52
|
+
raise AssertionError(
|
|
53
|
+
"LMDB format should require its backend dependencies"
|
|
54
|
+
)
|
|
55
|
+
PY
|
|
@@ -9,7 +9,7 @@ Always reference these instructions first and fallback to search or bash command
|
|
|
9
9
|
- **Bootstrap and install the repository:**
|
|
10
10
|
|
|
11
11
|
- `cd /home/runner/work/dpdata/dpdata` (or wherever the repo is cloned)
|
|
12
|
-
- `uv pip install -e .` -- installs dpdata in development mode with core dependencies (numpy, scipy, h5py,
|
|
12
|
+
- `uv pip install -e .` -- installs dpdata in development mode with core dependencies (numpy, scipy, h5py, PyYAML, wcmatch, lmdb, msgpack-numpy)
|
|
13
13
|
- Test installation: `dpdata --version` -- should show version like "dpdata v0.1.dev2+..."
|
|
14
14
|
|
|
15
15
|
- **Run tests:**
|
|
@@ -93,7 +93,7 @@ The following are outputs from frequently run commands. Reference them instead o
|
|
|
93
93
|
|
|
94
94
|
### Key dependencies
|
|
95
95
|
|
|
96
|
-
- Core: numpy>=1.14.3, scipy, h5py,
|
|
96
|
+
- Core: numpy>=1.14.3, scipy, h5py, PyYAML, wcmatch, lmdb, msgpack-numpy
|
|
97
97
|
- Optional: ase (ASE integration), parmed (AMBER), pymatgen (Materials Project), rdkit (molecular analysis)
|
|
98
98
|
- Testing: unittest (built-in), coverage
|
|
99
99
|
- Linting: ruff
|
|
@@ -132,7 +132,7 @@ The following are outputs from frequently run commands. Reference them instead o
|
|
|
132
132
|
|
|
133
133
|
- **Installation timeouts:** Network timeouts during `uv pip install` are common. If this occurs, try:
|
|
134
134
|
|
|
135
|
-
- Individual package installation: `uv pip install numpy scipy h5py
|
|
135
|
+
- Individual package installation: `uv pip install numpy scipy h5py PyYAML wcmatch lmdb msgpack-numpy`
|
|
136
136
|
- Use `--timeout` option: `uv pip install --timeout 300 -e .`
|
|
137
137
|
- Verify existing installation works: `dpdata --version` should work even if reinstall fails
|
|
138
138
|
|
dpdata-1.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dpdata
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: Manipulating data formats of DeePMD-kit, VASP, QE, PWmat, and LAMMPS, etc.
|
|
5
|
+
Author: DeepModeling
|
|
6
|
+
Author-email: Han Wang <wang_han@iapcm.ac.cn>
|
|
7
|
+
License-Expression: LGPL-3.0-or-later
|
|
8
|
+
Project-URL: Homepage, https://github.com/deepmodeling/dpdata
|
|
9
|
+
Project-URL: documentation, https://docs.deepmodeling.com/projects/dpdata
|
|
10
|
+
Project-URL: repository, https://github.com/deepmodeling/dpdata
|
|
11
|
+
Keywords: lammps,vasp,deepmd-kit
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Requires-Dist: numpy>=1.14.3
|
|
20
|
+
Requires-Dist: scipy
|
|
21
|
+
Requires-Dist: h5py
|
|
22
|
+
Requires-Dist: PyYAML
|
|
23
|
+
Requires-Dist: wcmatch
|
|
24
|
+
Requires-Dist: lmdb>=2.0.0
|
|
25
|
+
Requires-Dist: msgpack
|
|
26
|
+
Provides-Extra: test
|
|
27
|
+
Provides-Extra: ase
|
|
28
|
+
Requires-Dist: ase; extra == "ase"
|
|
29
|
+
Provides-Extra: amber
|
|
30
|
+
Requires-Dist: parmed; extra == "amber"
|
|
31
|
+
Provides-Extra: pymatgen
|
|
32
|
+
Requires-Dist: pymatgen; extra == "pymatgen"
|
|
33
|
+
Provides-Extra: docs
|
|
34
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
35
|
+
Requires-Dist: recommonmark; extra == "docs"
|
|
36
|
+
Requires-Dist: sphinx-book-theme; extra == "docs"
|
|
37
|
+
Requires-Dist: sphinx-design; extra == "docs"
|
|
38
|
+
Requires-Dist: numpydoc; extra == "docs"
|
|
39
|
+
Requires-Dist: myst-parser; extra == "docs"
|
|
40
|
+
Requires-Dist: deepmodeling-sphinx>=0.3.0; extra == "docs"
|
|
41
|
+
Requires-Dist: sphinx-argparse<0.5.0; extra == "docs"
|
|
42
|
+
Requires-Dist: rdkit; extra == "docs"
|
|
43
|
+
Requires-Dist: jupyterlite-sphinx; extra == "docs"
|
|
44
|
+
Requires-Dist: jupyterlite-xeus; extra == "docs"
|
|
45
|
+
Provides-Extra: benchmark
|
|
46
|
+
Requires-Dist: pytest; extra == "benchmark"
|
|
47
|
+
Requires-Dist: pytest-codspeed; extra == "benchmark"
|
|
48
|
+
Dynamic: license-file
|
|
49
|
+
|
|
50
|
+
<p align="center">
|
|
51
|
+
<img alt="dpdata logo" src="./docs/_static/logo.svg" width="720">
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
# dpdata
|
|
55
|
+
|
|
56
|
+
**Turn atomistic simulation outputs into interoperable, machine-learning-ready datasets.**
|
|
57
|
+
|
|
58
|
+
[](https://doi.org/10.1021/acs.jcim.5c01767)
|
|
59
|
+
[](https://anaconda.org/conda-forge/dpdata)
|
|
60
|
+
[](https://pypi.org/project/dpdata)
|
|
61
|
+
[](https://dpdata.readthedocs.io/)
|
|
62
|
+
[](./LICENSE)
|
|
63
|
+
|
|
64
|
+
[**Documentation**][documentation] · [**Supported formats**][formats] ·
|
|
65
|
+
[**Quick start**](#-start-in-minutes) · [**Try online**][try-online] ·
|
|
66
|
+
[**Python API**][python-api] · [**Plugins**][plugins] · [**Paper**][paper]
|
|
67
|
+
|
|
68
|
+
> [!IMPORTANT]
|
|
69
|
+
> **One data model, many atomistic formats.**
|
|
70
|
+
> Load structures, trajectories, energies, forces, and virials from simulation
|
|
71
|
+
> codes, manipulate them through `System`, `LabeledSystem`, and `MultiSystems`,
|
|
72
|
+
> then export the data in the format your next tool expects.
|
|
73
|
+
|
|
74
|
+
dpdata connects electronic-structure codes, molecular-dynamics engines, and
|
|
75
|
+
atomistic machine-learning workflows. Use the command line for one-off
|
|
76
|
+
conversion, or the Python API to build reproducible data-processing pipelines
|
|
77
|
+
that preserve atomistic structures and labels.
|
|
78
|
+
|
|
79
|
+
```mermaid
|
|
80
|
+
flowchart LR
|
|
81
|
+
A["Electronic structure<br/>VASP · ABACUS · Gaussian · QE · ..."] --> C["dpdata<br/>System · LabeledSystem · MultiSystems"]
|
|
82
|
+
B["Molecular dynamics<br/>LAMMPS · GROMACS"] --> C
|
|
83
|
+
C --> D["Atomistic ML<br/>DeePMD-kit · LMDB datasets"]
|
|
84
|
+
C --> E["Analysis & chemistry<br/>ASE · pymatgen · RDKit · 3Dmol.js"]
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## ⚡ Why dpdata
|
|
88
|
+
|
|
89
|
+
| | Advantage | What it unlocks |
|
|
90
|
+
| --- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
91
|
+
| 🔄 | **Format interoperability** | Read and write formats used by electronic-structure, molecular-dynamics, atomistic-ML, and analysis tools through a common interface. |
|
|
92
|
+
| 🏷️ | **ML-ready labels** | Keep coordinates, cells, atom types, energies, forces, virials, and registered extra fields together while converting data. |
|
|
93
|
+
| 🧩 | **Heterogeneous datasets** | Use `MultiSystems` to organize structures with different compositions and atom counts instead of forcing everything into one system. |
|
|
94
|
+
| 💾 | **Dataset-scale storage** | Export DeePMD NumPy layouts or a single LMDB database; LMDB can store frames with different compositions and atom counts. |
|
|
95
|
+
| 🛠️ | **Structure operations** | Select frames, build supercells, perturb structures, replace species, and compose data-processing workflows in Python. |
|
|
96
|
+
| ⌨️ | **CLI and Python** | Convert a file with one command, then move to the same format registry and data model when a workflow grows more complex. |
|
|
97
|
+
| 🔌 | **Extensible by plugins** | Add new formats as installable Python packages without modifying dpdata itself. |
|
|
98
|
+
|
|
99
|
+
## 🚀 Start in minutes
|
|
100
|
+
|
|
101
|
+
dpdata requires Python 3.10 or later. Install it from PyPI or conda-forge:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
python -m pip install dpdata
|
|
105
|
+
# or: conda install -c conda-forge dpdata
|
|
106
|
+
|
|
107
|
+
dpdata --version
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Convert a file from the command line
|
|
111
|
+
|
|
112
|
+
Convert a VASP `OUTCAR` directly to a DeePMD NumPy dataset:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
dpdata OUTCAR -i vasp/outcar -o deepmd/npy -O deepmd_data
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
See the complete [command-line reference][cli] for input/output options.
|
|
119
|
+
|
|
120
|
+
### Build a labeled dataset in Python
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
import dpdata
|
|
124
|
+
|
|
125
|
+
# OUTCAR is recognized as a labeled VASP trajectory.
|
|
126
|
+
data = dpdata.LabeledSystem("OUTCAR")
|
|
127
|
+
|
|
128
|
+
# Keep selected frames and write a DeePMD NumPy dataset.
|
|
129
|
+
data.sub_system([0, -1]).to("deepmd/npy", "deepmd_data")
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
`LabeledSystem` keeps atomistic structures together with energies, forces, and
|
|
133
|
+
virials when they are available. See [`System` and `LabeledSystem`][systems] for
|
|
134
|
+
loading, data access, frame selection, replication, perturbation, and species
|
|
135
|
+
replacement.
|
|
136
|
+
|
|
137
|
+
### Combine many systems and scale out
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
import dpdata
|
|
141
|
+
|
|
142
|
+
systems = dpdata.MultiSystems.from_dir(
|
|
143
|
+
"./calculations",
|
|
144
|
+
file_name="OUTCAR",
|
|
145
|
+
fmt="vasp/outcar",
|
|
146
|
+
)
|
|
147
|
+
systems.to("deepmd/lmdb", "training.lmdb")
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
`MultiSystems` groups heterogeneous structures by composition, while the
|
|
151
|
+
`deepmd/lmdb` format stores frames from one or more systems in a single database.
|
|
152
|
+
For large DeePMD training sets, this provides a direct path from calculation
|
|
153
|
+
outputs to the DeePMD data loader. See [MultiSystems] and
|
|
154
|
+
[LMDB datasets][lmdb].
|
|
155
|
+
|
|
156
|
+
## 🧭 Pick the workflow you need
|
|
157
|
+
|
|
158
|
+
| Goal | Start here |
|
|
159
|
+
| ------------------------------------------------- | --------------------------------------- |
|
|
160
|
+
| Convert one file between supported formats | [Command-line interface][cli] |
|
|
161
|
+
| Load structures or labeled trajectories in Python | [`System` and `LabeledSystem`][systems] |
|
|
162
|
+
| Organize many compositions or atom counts | [`MultiSystems`][multisystems] |
|
|
163
|
+
| Store heterogeneous DeePMD data in one database | [DeepMD LMDB format][lmdb] |
|
|
164
|
+
| See every registered input/output format | [Supported formats][formats] |
|
|
165
|
+
| Add support for a new format | [Plugin guide][plugins] |
|
|
166
|
+
| Experiment without installing locally | [Try dpdata online][try-online] |
|
|
167
|
+
|
|
168
|
+
## 🧱 Core data model
|
|
169
|
+
|
|
170
|
+
| Object | Use it for |
|
|
171
|
+
| --------------- | -------------------------------------------------------------------------------------------------------- |
|
|
172
|
+
| `System` | Structures and trajectories: atom types, coordinates, cells, and other non-label fields. |
|
|
173
|
+
| `LabeledSystem` | Reference data for atomistic ML: a `System` plus energies, forces, virials, and other registered labels. |
|
|
174
|
+
| `MultiSystems` | Collections that contain multiple systems, compositions, or atom counts. |
|
|
175
|
+
|
|
176
|
+
Specialized representations, including bond-order and mixed-type systems, are
|
|
177
|
+
documented under the [Systems guide][systems-index].
|
|
178
|
+
|
|
179
|
+
## 🔬 Scientific ecosystem
|
|
180
|
+
|
|
181
|
+
dpdata is designed to sit between the tools already used in computational
|
|
182
|
+
chemistry and materials science. Built-in formats include, among others:
|
|
183
|
+
|
|
184
|
+
- **Electronic structure and quantum chemistry:** VASP, ABACUS, Quantum
|
|
185
|
+
ESPRESSO, Gaussian, CP2K, ORCA, FHI-aims, SIESTA, OpenMX, and DFTB+.
|
|
186
|
+
- **Molecular dynamics:** LAMMPS and GROMACS.
|
|
187
|
+
- **Atomistic ML and data:** DeePMD-kit formats, LMDB datasets, ASE, and
|
|
188
|
+
pymatgen-compatible structures.
|
|
189
|
+
- **Chemistry and visualization:** RDKit and 3Dmol.js integrations.
|
|
190
|
+
- **Common interchange formats:** XYZ and other registered structure or
|
|
191
|
+
trajectory formats.
|
|
192
|
+
|
|
193
|
+
The [supported-formats table][formats] is generated from dpdata's format
|
|
194
|
+
registry and is the source of truth for available readers and writers.
|
|
195
|
+
|
|
196
|
+
## 🧩 Plugins
|
|
197
|
+
|
|
198
|
+
The format registry can be extended by third-party packages through the
|
|
199
|
+
`dpdata.plugins` entry point. The repository includes a minimal
|
|
200
|
+
[`plugin_example/`](./plugin_example) showing the complete pattern.
|
|
201
|
+
|
|
202
|
+
One ecosystem plugin is [cp2kdata](https://github.com/robinzyb/cp2kdata), which
|
|
203
|
+
adds current CP2K support on top of dpdata. See the [plugin guide][plugins] to
|
|
204
|
+
build and distribute your own integration.
|
|
205
|
+
|
|
206
|
+
## 📚 Documentation and community
|
|
207
|
+
|
|
208
|
+
- Read the [full documentation][documentation].
|
|
209
|
+
- Browse [all supported formats][formats] before writing a converter yourself.
|
|
210
|
+
- Use [Try dpdata online][try-online] for a browser-based interactive example.
|
|
211
|
+
- Report bugs or request features in [GitHub Issues](https://github.com/deepmodeling/dpdata/issues).
|
|
212
|
+
|
|
213
|
+
## Citation
|
|
214
|
+
|
|
215
|
+
If dpdata contributes to published work, please cite:
|
|
216
|
+
|
|
217
|
+
Jinzhe Zeng, Xingliang Peng, Yong-Bin Zhuang, Haidi Wang, Fengbo Yuan, Duo
|
|
218
|
+
Zhang, Renxi Liu, Yingze Wang, Ping Tuo, Yuzhi Zhang, Yixiao Chen, Yifan Li,
|
|
219
|
+
Cao Thang Nguyen, Jiameng Huang, Anyang Peng, Marián Rynik, Wei-Hong Xu,
|
|
220
|
+
Zezhong Zhang, Xu-Yuan Zhou, Tao Chen, Jiahao Fan, Wanrun Jiang, Bowen Li,
|
|
221
|
+
Denan Li, Haoxi Li, Wenshuo Liang, Ruihao Liao, Liping Liu, Chenxing Luo,
|
|
222
|
+
Logan Ward, Kaiwei Wan, Junjie Wang, Pan Xiang, Chengqian Zhang, Jinchao
|
|
223
|
+
Zhang, Rui Zhou, Jia-Xin Zhu, Linfeng Zhang, and Han Wang. “dpdata: A Scalable
|
|
224
|
+
Python Toolkit for Atomistic Machine Learning Data Sets.” *Journal of Chemical
|
|
225
|
+
Information and Modeling* **65** (21), 11497–11504 (2025). DOI:
|
|
226
|
+
[10.1021/acs.jcim.5c01767][paper].
|
|
227
|
+
[](https://badge.dimensions.ai/details/doi/10.1021/acs.jcim.5c01767)
|
|
228
|
+
|
|
229
|
+
[cli]: https://docs.deepmodeling.com/projects/dpdata/en/master/cli.html
|
|
230
|
+
[documentation]: https://docs.deepmodeling.com/projects/dpdata/
|
|
231
|
+
[formats]: https://docs.deepmodeling.com/projects/dpdata/en/master/formats.html
|
|
232
|
+
[lmdb]: https://docs.deepmodeling.com/projects/dpdata/en/master/systems/lmdb.html
|
|
233
|
+
[multisystems]: https://docs.deepmodeling.com/projects/dpdata/en/master/systems/multi.html
|
|
234
|
+
[paper]: https://doi.org/10.1021/acs.jcim.5c01767
|
|
235
|
+
[plugins]: https://docs.deepmodeling.com/projects/dpdata/en/master/plugin.html
|
|
236
|
+
[python-api]: https://docs.deepmodeling.com/projects/dpdata/en/master/api/api.html
|
|
237
|
+
[systems]: https://docs.deepmodeling.com/projects/dpdata/en/master/systems/system.html
|
|
238
|
+
[systems-index]: https://docs.deepmodeling.com/projects/dpdata/en/master/systems/index.html
|
|
239
|
+
[try-online]: https://docs.deepmodeling.com/projects/dpdata/en/master/try_dpdata.html
|
dpdata-1.2.0/README.md
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img alt="dpdata logo" src="./docs/_static/logo.svg" width="720">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# dpdata
|
|
6
|
+
|
|
7
|
+
**Turn atomistic simulation outputs into interoperable, machine-learning-ready datasets.**
|
|
8
|
+
|
|
9
|
+
[](https://doi.org/10.1021/acs.jcim.5c01767)
|
|
10
|
+
[](https://anaconda.org/conda-forge/dpdata)
|
|
11
|
+
[](https://pypi.org/project/dpdata)
|
|
12
|
+
[](https://dpdata.readthedocs.io/)
|
|
13
|
+
[](./LICENSE)
|
|
14
|
+
|
|
15
|
+
[**Documentation**][documentation] · [**Supported formats**][formats] ·
|
|
16
|
+
[**Quick start**](#-start-in-minutes) · [**Try online**][try-online] ·
|
|
17
|
+
[**Python API**][python-api] · [**Plugins**][plugins] · [**Paper**][paper]
|
|
18
|
+
|
|
19
|
+
> [!IMPORTANT]
|
|
20
|
+
> **One data model, many atomistic formats.**
|
|
21
|
+
> Load structures, trajectories, energies, forces, and virials from simulation
|
|
22
|
+
> codes, manipulate them through `System`, `LabeledSystem`, and `MultiSystems`,
|
|
23
|
+
> then export the data in the format your next tool expects.
|
|
24
|
+
|
|
25
|
+
dpdata connects electronic-structure codes, molecular-dynamics engines, and
|
|
26
|
+
atomistic machine-learning workflows. Use the command line for one-off
|
|
27
|
+
conversion, or the Python API to build reproducible data-processing pipelines
|
|
28
|
+
that preserve atomistic structures and labels.
|
|
29
|
+
|
|
30
|
+
```mermaid
|
|
31
|
+
flowchart LR
|
|
32
|
+
A["Electronic structure<br/>VASP · ABACUS · Gaussian · QE · ..."] --> C["dpdata<br/>System · LabeledSystem · MultiSystems"]
|
|
33
|
+
B["Molecular dynamics<br/>LAMMPS · GROMACS"] --> C
|
|
34
|
+
C --> D["Atomistic ML<br/>DeePMD-kit · LMDB datasets"]
|
|
35
|
+
C --> E["Analysis & chemistry<br/>ASE · pymatgen · RDKit · 3Dmol.js"]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## ⚡ Why dpdata
|
|
39
|
+
|
|
40
|
+
| | Advantage | What it unlocks |
|
|
41
|
+
| --- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
42
|
+
| 🔄 | **Format interoperability** | Read and write formats used by electronic-structure, molecular-dynamics, atomistic-ML, and analysis tools through a common interface. |
|
|
43
|
+
| 🏷️ | **ML-ready labels** | Keep coordinates, cells, atom types, energies, forces, virials, and registered extra fields together while converting data. |
|
|
44
|
+
| 🧩 | **Heterogeneous datasets** | Use `MultiSystems` to organize structures with different compositions and atom counts instead of forcing everything into one system. |
|
|
45
|
+
| 💾 | **Dataset-scale storage** | Export DeePMD NumPy layouts or a single LMDB database; LMDB can store frames with different compositions and atom counts. |
|
|
46
|
+
| 🛠️ | **Structure operations** | Select frames, build supercells, perturb structures, replace species, and compose data-processing workflows in Python. |
|
|
47
|
+
| ⌨️ | **CLI and Python** | Convert a file with one command, then move to the same format registry and data model when a workflow grows more complex. |
|
|
48
|
+
| 🔌 | **Extensible by plugins** | Add new formats as installable Python packages without modifying dpdata itself. |
|
|
49
|
+
|
|
50
|
+
## 🚀 Start in minutes
|
|
51
|
+
|
|
52
|
+
dpdata requires Python 3.10 or later. Install it from PyPI or conda-forge:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
python -m pip install dpdata
|
|
56
|
+
# or: conda install -c conda-forge dpdata
|
|
57
|
+
|
|
58
|
+
dpdata --version
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Convert a file from the command line
|
|
62
|
+
|
|
63
|
+
Convert a VASP `OUTCAR` directly to a DeePMD NumPy dataset:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
dpdata OUTCAR -i vasp/outcar -o deepmd/npy -O deepmd_data
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
See the complete [command-line reference][cli] for input/output options.
|
|
70
|
+
|
|
71
|
+
### Build a labeled dataset in Python
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
import dpdata
|
|
75
|
+
|
|
76
|
+
# OUTCAR is recognized as a labeled VASP trajectory.
|
|
77
|
+
data = dpdata.LabeledSystem("OUTCAR")
|
|
78
|
+
|
|
79
|
+
# Keep selected frames and write a DeePMD NumPy dataset.
|
|
80
|
+
data.sub_system([0, -1]).to("deepmd/npy", "deepmd_data")
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`LabeledSystem` keeps atomistic structures together with energies, forces, and
|
|
84
|
+
virials when they are available. See [`System` and `LabeledSystem`][systems] for
|
|
85
|
+
loading, data access, frame selection, replication, perturbation, and species
|
|
86
|
+
replacement.
|
|
87
|
+
|
|
88
|
+
### Combine many systems and scale out
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
import dpdata
|
|
92
|
+
|
|
93
|
+
systems = dpdata.MultiSystems.from_dir(
|
|
94
|
+
"./calculations",
|
|
95
|
+
file_name="OUTCAR",
|
|
96
|
+
fmt="vasp/outcar",
|
|
97
|
+
)
|
|
98
|
+
systems.to("deepmd/lmdb", "training.lmdb")
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`MultiSystems` groups heterogeneous structures by composition, while the
|
|
102
|
+
`deepmd/lmdb` format stores frames from one or more systems in a single database.
|
|
103
|
+
For large DeePMD training sets, this provides a direct path from calculation
|
|
104
|
+
outputs to the DeePMD data loader. See [MultiSystems] and
|
|
105
|
+
[LMDB datasets][lmdb].
|
|
106
|
+
|
|
107
|
+
## 🧭 Pick the workflow you need
|
|
108
|
+
|
|
109
|
+
| Goal | Start here |
|
|
110
|
+
| ------------------------------------------------- | --------------------------------------- |
|
|
111
|
+
| Convert one file between supported formats | [Command-line interface][cli] |
|
|
112
|
+
| Load structures or labeled trajectories in Python | [`System` and `LabeledSystem`][systems] |
|
|
113
|
+
| Organize many compositions or atom counts | [`MultiSystems`][multisystems] |
|
|
114
|
+
| Store heterogeneous DeePMD data in one database | [DeepMD LMDB format][lmdb] |
|
|
115
|
+
| See every registered input/output format | [Supported formats][formats] |
|
|
116
|
+
| Add support for a new format | [Plugin guide][plugins] |
|
|
117
|
+
| Experiment without installing locally | [Try dpdata online][try-online] |
|
|
118
|
+
|
|
119
|
+
## 🧱 Core data model
|
|
120
|
+
|
|
121
|
+
| Object | Use it for |
|
|
122
|
+
| --------------- | -------------------------------------------------------------------------------------------------------- |
|
|
123
|
+
| `System` | Structures and trajectories: atom types, coordinates, cells, and other non-label fields. |
|
|
124
|
+
| `LabeledSystem` | Reference data for atomistic ML: a `System` plus energies, forces, virials, and other registered labels. |
|
|
125
|
+
| `MultiSystems` | Collections that contain multiple systems, compositions, or atom counts. |
|
|
126
|
+
|
|
127
|
+
Specialized representations, including bond-order and mixed-type systems, are
|
|
128
|
+
documented under the [Systems guide][systems-index].
|
|
129
|
+
|
|
130
|
+
## 🔬 Scientific ecosystem
|
|
131
|
+
|
|
132
|
+
dpdata is designed to sit between the tools already used in computational
|
|
133
|
+
chemistry and materials science. Built-in formats include, among others:
|
|
134
|
+
|
|
135
|
+
- **Electronic structure and quantum chemistry:** VASP, ABACUS, Quantum
|
|
136
|
+
ESPRESSO, Gaussian, CP2K, ORCA, FHI-aims, SIESTA, OpenMX, and DFTB+.
|
|
137
|
+
- **Molecular dynamics:** LAMMPS and GROMACS.
|
|
138
|
+
- **Atomistic ML and data:** DeePMD-kit formats, LMDB datasets, ASE, and
|
|
139
|
+
pymatgen-compatible structures.
|
|
140
|
+
- **Chemistry and visualization:** RDKit and 3Dmol.js integrations.
|
|
141
|
+
- **Common interchange formats:** XYZ and other registered structure or
|
|
142
|
+
trajectory formats.
|
|
143
|
+
|
|
144
|
+
The [supported-formats table][formats] is generated from dpdata's format
|
|
145
|
+
registry and is the source of truth for available readers and writers.
|
|
146
|
+
|
|
147
|
+
## 🧩 Plugins
|
|
148
|
+
|
|
149
|
+
The format registry can be extended by third-party packages through the
|
|
150
|
+
`dpdata.plugins` entry point. The repository includes a minimal
|
|
151
|
+
[`plugin_example/`](./plugin_example) showing the complete pattern.
|
|
152
|
+
|
|
153
|
+
One ecosystem plugin is [cp2kdata](https://github.com/robinzyb/cp2kdata), which
|
|
154
|
+
adds current CP2K support on top of dpdata. See the [plugin guide][plugins] to
|
|
155
|
+
build and distribute your own integration.
|
|
156
|
+
|
|
157
|
+
## 📚 Documentation and community
|
|
158
|
+
|
|
159
|
+
- Read the [full documentation][documentation].
|
|
160
|
+
- Browse [all supported formats][formats] before writing a converter yourself.
|
|
161
|
+
- Use [Try dpdata online][try-online] for a browser-based interactive example.
|
|
162
|
+
- Report bugs or request features in [GitHub Issues](https://github.com/deepmodeling/dpdata/issues).
|
|
163
|
+
|
|
164
|
+
## Citation
|
|
165
|
+
|
|
166
|
+
If dpdata contributes to published work, please cite:
|
|
167
|
+
|
|
168
|
+
Jinzhe Zeng, Xingliang Peng, Yong-Bin Zhuang, Haidi Wang, Fengbo Yuan, Duo
|
|
169
|
+
Zhang, Renxi Liu, Yingze Wang, Ping Tuo, Yuzhi Zhang, Yixiao Chen, Yifan Li,
|
|
170
|
+
Cao Thang Nguyen, Jiameng Huang, Anyang Peng, Marián Rynik, Wei-Hong Xu,
|
|
171
|
+
Zezhong Zhang, Xu-Yuan Zhou, Tao Chen, Jiahao Fan, Wanrun Jiang, Bowen Li,
|
|
172
|
+
Denan Li, Haoxi Li, Wenshuo Liang, Ruihao Liao, Liping Liu, Chenxing Luo,
|
|
173
|
+
Logan Ward, Kaiwei Wan, Junjie Wang, Pan Xiang, Chengqian Zhang, Jinchao
|
|
174
|
+
Zhang, Rui Zhou, Jia-Xin Zhu, Linfeng Zhang, and Han Wang. “dpdata: A Scalable
|
|
175
|
+
Python Toolkit for Atomistic Machine Learning Data Sets.” *Journal of Chemical
|
|
176
|
+
Information and Modeling* **65** (21), 11497–11504 (2025). DOI:
|
|
177
|
+
[10.1021/acs.jcim.5c01767][paper].
|
|
178
|
+
[](https://badge.dimensions.ai/details/doi/10.1021/acs.jcim.5c01767)
|
|
179
|
+
|
|
180
|
+
[cli]: https://docs.deepmodeling.com/projects/dpdata/en/master/cli.html
|
|
181
|
+
[documentation]: https://docs.deepmodeling.com/projects/dpdata/
|
|
182
|
+
[formats]: https://docs.deepmodeling.com/projects/dpdata/en/master/formats.html
|
|
183
|
+
[lmdb]: https://docs.deepmodeling.com/projects/dpdata/en/master/systems/lmdb.html
|
|
184
|
+
[multisystems]: https://docs.deepmodeling.com/projects/dpdata/en/master/systems/multi.html
|
|
185
|
+
[paper]: https://doi.org/10.1021/acs.jcim.5c01767
|
|
186
|
+
[plugins]: https://docs.deepmodeling.com/projects/dpdata/en/master/plugin.html
|
|
187
|
+
[python-api]: https://docs.deepmodeling.com/projects/dpdata/en/master/api/api.html
|
|
188
|
+
[systems]: https://docs.deepmodeling.com/projects/dpdata/en/master/systems/system.html
|
|
189
|
+
[systems-index]: https://docs.deepmodeling.com/projects/dpdata/en/master/systems/index.html
|
|
190
|
+
[try-online]: https://docs.deepmodeling.com/projects/dpdata/en/master/try_dpdata.html
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.0
|
|
22
|
-
__version_tuple__ = version_tuple = (1,
|
|
21
|
+
__version__ = version = '1.2.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 2, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'ge229e64e4'
|