dpdata 1.0.1__tar.gz → 1.0.2__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.1 → dpdata-1.0.2}/.github/workflows/pub-pypi.yml +2 -2
- {dpdata-1.0.1 → dpdata-1.0.2}/.github/workflows/test.yml +2 -2
- {dpdata-1.0.1 → dpdata-1.0.2}/.github/workflows/test_import.yml +1 -1
- {dpdata-1.0.1 → dpdata-1.0.2}/.gitignore +4 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/.pre-commit-config.yaml +1 -1
- dpdata-1.0.2/PKG-INFO +105 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/README.md +1 -1
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/__init__.py +2 -3
- dpdata-1.0.2/dpdata/_version.py +24 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/bond_order_system.py +6 -6
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/driver.py +3 -1
- dpdata-1.0.2/dpdata/formats/__init__.py +1 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/abacus/md.py +1 -1
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/abacus/relax.py +61 -10
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/abacus/scf.py +1 -1
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/abacus/stru.py +1 -1
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/amber/md.py +67 -11
- dpdata-1.0.2/dpdata/formats/cp2k/__init__.py +5 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/cp2k/output.py +1 -1
- {dpdata-1.0.1/dpdata/dftbplus → dpdata-1.0.2/dpdata/formats/fhi_aims}/__init__.py +0 -0
- dpdata-1.0.2/dpdata/formats/gaussian/__init__.py +5 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/gaussian/fchk.py +2 -2
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/gaussian/log.py +2 -2
- {dpdata-1.0.1/dpdata/fhi_aims → dpdata-1.0.2/dpdata/formats/gromacs}/__init__.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/gromacs/gro.py +1 -1
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/lammps/lmp.py +53 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/openmx/omx.py +21 -46
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/pwmat/atomconfig.py +1 -1
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/pwmat/movement.py +1 -1
- dpdata-1.0.2/dpdata/formats/qe/__init__.py +5 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/qe/traj.py +1 -1
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/rdkit/sanitize.py +9 -2
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/3dmol.py +1 -1
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/__init__.py +1 -5
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/abacus.py +7 -7
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/amber.py +7 -7
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/ase.py +3 -1
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/cp2k.py +3 -3
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/deepmd.py +22 -18
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/dftbplus.py +1 -1
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/fhi_aims.py +5 -3
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/gaussian.py +9 -9
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/gromacs.py +6 -4
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/lammps.py +9 -7
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/lmdb.py +1 -1
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/openmx.py +4 -4
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/orca.py +1 -1
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/psi4.py +2 -2
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/pwmat.py +5 -5
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/pymatgen.py +4 -4
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/qe.py +6 -6
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/rdkit.py +2 -2
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/siesta.py +6 -6
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/vasp.py +7 -7
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/xyz.py +2 -2
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/system.py +3 -2
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/utils.py +56 -22
- dpdata-1.0.2/dpdata.egg-info/PKG-INFO +105 -0
- dpdata-1.0.2/dpdata.egg-info/SOURCES.txt +145 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata.egg-info/requires.txt +0 -9
- {dpdata-1.0.1 → dpdata-1.0.2}/pyproject.toml +7 -10
- dpdata-1.0.2/skills/dpdata-driver/SKILL.md +154 -0
- dpdata-1.0.2/skills/dpdata-minimizer/SKILL.md +86 -0
- dpdata-1.0.2/skills/dpdata-plugin/SKILL.md +119 -0
- dpdata-1.0.1/PKG-INFO +0 -274
- dpdata-1.0.1/dpdata/_version.py +0 -34
- dpdata-1.0.1/dpdata/siesta/__init__.py +0 -0
- dpdata-1.0.1/dpdata/vasp/__init__.py +0 -0
- dpdata-1.0.1/dpdata/xyz/__init__.py +0 -0
- dpdata-1.0.1/dpdata.egg-info/PKG-INFO +0 -274
- dpdata-1.0.1/dpdata.egg-info/SOURCES.txt +0 -141
- {dpdata-1.0.1 → dpdata-1.0.2}/.git-blame-ignore-revs +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/.git_archival.txt +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/.gitattributes +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/.github/ISSUE_TEMPLATE/generic-issue.yml +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/.github/dependabot.yml +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/.github/workflows/benchmark.yml +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/.github/workflows/mirror_gitee.yml +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/.github/workflows/pyright.yml +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/.readthedocs.yaml +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/AGENTS.md +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/LICENSE +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/MANIFEST.in +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/benchmark/__init__.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/benchmark/test_import.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/__about__.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/__main__.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/ase_calculator.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/cli.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/data_type.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/format.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/abacus/__init__.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/amber/__init__.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/amber/mask.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/amber/sqm.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/cp2k/cell.py +0 -0
- {dpdata-1.0.1/dpdata/cp2k → dpdata-1.0.2/dpdata/formats/deepmd}/__init__.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/deepmd/comp.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/deepmd/hdf5.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/deepmd/mixed.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/deepmd/raw.py +0 -0
- {dpdata-1.0.1/dpdata/deepmd → dpdata-1.0.2/dpdata/formats/dftbplus}/__init__.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/dftbplus/output.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/fhi_aims/output.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/gaussian/gjf.py +0 -0
- {dpdata-1.0.1/dpdata/gaussian → dpdata-1.0.2/dpdata/formats/lammps}/__init__.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/lammps/dump.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/lmdb/__init__.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/lmdb/format.py +0 -0
- {dpdata-1.0.1/dpdata/gromacs → dpdata-1.0.2/dpdata/formats/openmx}/__init__.py +0 -0
- {dpdata-1.0.1/dpdata/lammps → dpdata-1.0.2/dpdata/formats/orca}/__init__.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/orca/output.py +0 -0
- {dpdata-1.0.1/dpdata/md → dpdata-1.0.2/dpdata/formats/psi4}/__init__.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/psi4/input.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/psi4/output.py +0 -0
- {dpdata-1.0.1/dpdata/openmx → dpdata-1.0.2/dpdata/formats/pwmat}/__init__.py +0 -0
- {dpdata-1.0.1/dpdata/orca → dpdata-1.0.2/dpdata/formats/pymatgen}/__init__.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/pymatgen/molecule.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/pymatgen/structure.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/qe/scf.py +0 -0
- {dpdata-1.0.1/dpdata/psi4 → dpdata-1.0.2/dpdata/formats/rdkit}/__init__.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/rdkit/utils.py +0 -0
- {dpdata-1.0.1/dpdata/pwmat → dpdata-1.0.2/dpdata/formats/siesta}/__init__.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/siesta/aiMD_output.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/siesta/output.py +0 -0
- {dpdata-1.0.1/dpdata/pymatgen → dpdata-1.0.2/dpdata/formats/vasp}/__init__.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/vasp/outcar.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/vasp/poscar.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/vasp/xml.py +0 -0
- {dpdata-1.0.1/dpdata/qe → dpdata-1.0.2/dpdata/formats/xyz}/__init__.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/xyz/quip_gap_xyz.py +0 -0
- {dpdata-1.0.1/dpdata → dpdata-1.0.2/dpdata/formats}/xyz/xyz.py +0 -0
- {dpdata-1.0.1/dpdata/rdkit → dpdata-1.0.2/dpdata/md}/__init__.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/md/msd.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/md/pbc.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/md/rdf.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/md/water.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/periodic_table.json +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/periodic_table.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugin.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/list.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/plugins/n2p2.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/py.typed +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/stat.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata/unit.py +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata.egg-info/dependency_links.txt +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata.egg-info/entry_points.txt +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/dpdata.egg-info/top_level.txt +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/setup.cfg +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/skills/dpdata-cli/README.md +0 -0
- {dpdata-1.0.1 → dpdata-1.0.2}/skills/dpdata-cli/SKILL.md +0 -0
|
@@ -10,10 +10,10 @@ jobs:
|
|
|
10
10
|
steps:
|
|
11
11
|
- uses: actions/checkout@master
|
|
12
12
|
|
|
13
|
-
- name: Set up Python 3.
|
|
13
|
+
- name: Set up Python 3.10
|
|
14
14
|
uses: actions/setup-python@master
|
|
15
15
|
with:
|
|
16
|
-
python-version: 3.
|
|
16
|
+
python-version: "3.10"
|
|
17
17
|
|
|
18
18
|
- name: Install pypa/build
|
|
19
19
|
run: >-
|
|
@@ -9,7 +9,7 @@ jobs:
|
|
|
9
9
|
runs-on: ubuntu-22.04
|
|
10
10
|
strategy:
|
|
11
11
|
matrix:
|
|
12
|
-
python-version: ["3.
|
|
12
|
+
python-version: ["3.10", "3.13"]
|
|
13
13
|
|
|
14
14
|
steps:
|
|
15
15
|
- uses: actions/checkout@v6
|
|
@@ -30,7 +30,7 @@ jobs:
|
|
|
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@v6
|
|
34
34
|
env:
|
|
35
35
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
36
36
|
with:
|
dpdata-1.0.2/PKG-INFO
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dpdata
|
|
3
|
+
Version: 1.0.2
|
|
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: monty
|
|
21
|
+
Requires-Dist: scipy
|
|
22
|
+
Requires-Dist: h5py
|
|
23
|
+
Requires-Dist: wcmatch
|
|
24
|
+
Requires-Dist: lmdb
|
|
25
|
+
Requires-Dist: msgpack-numpy
|
|
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: numpydoc; extra == "docs"
|
|
38
|
+
Requires-Dist: myst-parser; extra == "docs"
|
|
39
|
+
Requires-Dist: deepmodeling-sphinx>=0.3.0; extra == "docs"
|
|
40
|
+
Requires-Dist: sphinx-argparse<0.5.0; extra == "docs"
|
|
41
|
+
Requires-Dist: rdkit; extra == "docs"
|
|
42
|
+
Requires-Dist: jupyterlite-sphinx; extra == "docs"
|
|
43
|
+
Requires-Dist: jupyterlite-xeus; extra == "docs"
|
|
44
|
+
Provides-Extra: benchmark
|
|
45
|
+
Requires-Dist: pytest; extra == "benchmark"
|
|
46
|
+
Requires-Dist: pytest-codspeed; extra == "benchmark"
|
|
47
|
+
Dynamic: license-file
|
|
48
|
+
|
|
49
|
+
# dpdata
|
|
50
|
+
|
|
51
|
+
[](https://doi.org/10.1021/acs.jcim.5c01767)
|
|
52
|
+
[](https://anaconda.org/conda-forge/dpdata)
|
|
53
|
+
[](https://pypi.org/project/dpdata)
|
|
54
|
+
[](https://dpdata.readthedocs.io/)
|
|
55
|
+
|
|
56
|
+
**dpdata** is a Python package for manipulating atomistic data of software in computational science.
|
|
57
|
+
|
|
58
|
+
## Credits
|
|
59
|
+
|
|
60
|
+
If you use this software, please cite the following paper:
|
|
61
|
+
|
|
62
|
+
- Jinzhe Zeng, Xingliang Peng, Yong-Bin Zhuang, Haidi Wang, Fengbo Yuan, Duo Zhang, Renxi Liu, Yingze Wang, Ping Tuo, Yuzhi Zhang, Yixiao Chen, Yifan Li, Cao Thang Nguyen, Jiameng Huang, Anyang Peng, Marián Rynik, Wei-Hong Xu, Zezhong Zhang, Xu-Yuan Zhou, Tao Chen, Jiahao Fan, Wanrun Jiang, Bowen Li, Denan Li, Haoxi Li, Wenshuo Liang, Ruihao Liao, Liping Liu, Chenxing Luo, Logan Ward, Kaiwei Wan, Junjie Wang, Pan Xiang, Chengqian Zhang, Jinchao Zhang, Rui Zhou, Jia-Xin Zhu, Linfeng Zhang, Han Wang, dpdata: A Scalable Python Toolkit for Atomistic Machine Learning Data Sets, *J. Chem. Inf. Model.*, 2025, DOI: [10.1021/acs.jcim.5c01767](https://doi.org/10.1021/acs.jcim.5c01767). [](https://badge.dimensions.ai/details/doi/10.1021/acs.jcim.5c01767)
|
|
63
|
+
|
|
64
|
+
## Installation
|
|
65
|
+
|
|
66
|
+
dpdata only supports Python 3.10 and above. You can [setup a conda/pip environment](https://docs.deepmodeling.com/faq/conda.html), and then use one of the following methods to install dpdata:
|
|
67
|
+
|
|
68
|
+
- Install via pip: `pip install dpdata`
|
|
69
|
+
- Install via conda: `conda install -c conda-forge dpdata`
|
|
70
|
+
- Install from source code: `git clone https://github.com/deepmodeling/dpdata && pip install ./dpdata`
|
|
71
|
+
|
|
72
|
+
To test if the installation is successful, you may execute
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
dpdata --version
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Supported packages
|
|
79
|
+
|
|
80
|
+
`dpdata` is aimmed to support different kinds of atomistic packages:
|
|
81
|
+
|
|
82
|
+
- Atomistic machine learning packages, such as [DeePMD-kit](https://github.com/deepmodeling/deepmd-kit);
|
|
83
|
+
- Molecular dynamics packages, such as [LAMMPS](https://github.com/lammps/lammps) and [GROMACS](https://gitlab.com/gromacs/gromacs);
|
|
84
|
+
- Quantum chemistry packages, such as [VASP](https://www.vasp.at/), [Gaussian](https://gaussian.com), and [ABACUS](https://github.com/deepmodeling/abacus-develop);
|
|
85
|
+
- Atomistic visualization packages, such as [3Dmol.js](https://3dmol.csb.pitt.edu/).
|
|
86
|
+
- Other atomistic tools, such as [ASE](https://gitlab.com/ase/ase).
|
|
87
|
+
- Common formats such as `xyz`.
|
|
88
|
+
|
|
89
|
+
All supported formats are listed [here](https://docs.deepmodeling.com/projects/dpdata/en/master/formats.html).
|
|
90
|
+
|
|
91
|
+
## Quick start
|
|
92
|
+
|
|
93
|
+
The quickest way to convert a simple file from one format to another one is to use the [command line](https://docs.deepmodeling.com/projects/dpdata/en/master/cli.html).
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
dpdata OUTCAR -i vasp/outcar -o deepmd/npy -O deepmd_data
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
For advanced usage with Python APIs, [read dpdata documentation](https://docs.deepmodeling.com/projects/dpdata/).
|
|
100
|
+
|
|
101
|
+
## Plugins
|
|
102
|
+
|
|
103
|
+
- [cp2kdata](https://github.com/robinzyb/cp2kdata) adds the latest CP2K support for dpdata.
|
|
104
|
+
|
|
105
|
+
For how to create your own plugin packages, [read dpdata documentation](https://docs.deepmodeling.com/projects/dpdata/).
|
|
@@ -15,7 +15,7 @@ If you use this software, please cite the following paper:
|
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
17
17
|
|
|
18
|
-
dpdata only supports Python 3.
|
|
18
|
+
dpdata only supports Python 3.10 and above. You can [setup a conda/pip environment](https://docs.deepmodeling.com/faq/conda.html), and then use one of the following methods to install dpdata:
|
|
19
19
|
|
|
20
20
|
- Install via pip: `pip install dpdata`
|
|
21
21
|
- Install via conda: `conda install -c conda-forge dpdata`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
-
from . import
|
|
3
|
+
from . import md
|
|
4
4
|
from .bond_order_system import BondOrderSystem
|
|
5
5
|
from .system import LabeledSystem, MultiSystems, System
|
|
6
6
|
|
|
@@ -9,11 +9,10 @@ try:
|
|
|
9
9
|
except ImportError:
|
|
10
10
|
from .__about__ import __version__
|
|
11
11
|
|
|
12
|
+
|
|
12
13
|
__all__ = [
|
|
13
14
|
"__version__",
|
|
14
|
-
"lammps",
|
|
15
15
|
"md",
|
|
16
|
-
"vasp",
|
|
17
16
|
"System",
|
|
18
17
|
"LabeledSystem",
|
|
19
18
|
"MultiSystems",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# file generated by vcs-versioning
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"__version__",
|
|
7
|
+
"__version_tuple__",
|
|
8
|
+
"version",
|
|
9
|
+
"version_tuple",
|
|
10
|
+
"__commit_id__",
|
|
11
|
+
"commit_id",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
version: str
|
|
15
|
+
__version__: str
|
|
16
|
+
__version_tuple__: tuple[int | str, ...]
|
|
17
|
+
version_tuple: tuple[int | str, ...]
|
|
18
|
+
commit_id: str | None
|
|
19
|
+
__commit_id__: str | None
|
|
20
|
+
|
|
21
|
+
__version__ = version = '1.0.2'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 0, 2)
|
|
23
|
+
|
|
24
|
+
__commit_id__ = commit_id = 'gbc617b720'
|
|
@@ -6,11 +6,11 @@ from copy import deepcopy
|
|
|
6
6
|
|
|
7
7
|
import numpy as np
|
|
8
8
|
|
|
9
|
-
import dpdata.rdkit.utils
|
|
10
|
-
from dpdata.rdkit.sanitize import Sanitizer
|
|
9
|
+
import dpdata.formats.rdkit.utils
|
|
10
|
+
from dpdata.formats.rdkit.sanitize import Sanitizer
|
|
11
11
|
from dpdata.system import Axis, DataType, System
|
|
12
12
|
|
|
13
|
-
# import dpdata.rdkit.mol2
|
|
13
|
+
# import dpdata.formats.rdkit.mol2
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class BondOrderSystem(System):
|
|
@@ -79,7 +79,7 @@ class BondOrderSystem(System):
|
|
|
79
79
|
self.sanitizer = Sanitizer(sanitize_level, raise_errors, verbose)
|
|
80
80
|
|
|
81
81
|
if data:
|
|
82
|
-
mol = dpdata.rdkit.utils.system_data_to_mol(data)
|
|
82
|
+
mol = dpdata.formats.rdkit.utils.system_data_to_mol(data)
|
|
83
83
|
self.from_rdkit_mol(mol)
|
|
84
84
|
if file_name:
|
|
85
85
|
self.from_fmt(
|
|
@@ -161,7 +161,7 @@ class BondOrderSystem(System):
|
|
|
161
161
|
# magic method "+" operation
|
|
162
162
|
# '''
|
|
163
163
|
# if isinstance(other, BondOrderSystem):
|
|
164
|
-
# if dpdata.rdkit.utils.check_same_molecule(self.rdkit_mol, other.rdkit_mol):
|
|
164
|
+
# if dpdata.formats.rdkit.utils.check_same_molecule(self.rdkit_mol, other.rdkit_mol):
|
|
165
165
|
# self.__class__(self, data=other.data)
|
|
166
166
|
# else:
|
|
167
167
|
# raise RuntimeError("The two systems are not of the same topology.")
|
|
@@ -171,7 +171,7 @@ class BondOrderSystem(System):
|
|
|
171
171
|
def from_rdkit_mol(self, rdkit_mol):
|
|
172
172
|
"""Initialize from a rdkit.Chem.rdchem.Mol object."""
|
|
173
173
|
rdkit_mol = self.sanitizer.sanitize(rdkit_mol)
|
|
174
|
-
self.data = dpdata.rdkit.utils.mol_to_system_data(rdkit_mol)
|
|
174
|
+
self.data = dpdata.formats.rdkit.utils.mol_to_system_data(rdkit_mol)
|
|
175
175
|
self.data["bond_dict"] = dict(
|
|
176
176
|
[(f"{int(bond[0])}-{int(bond[1])}", bond[2]) for bond in self.data["bonds"]]
|
|
177
177
|
)
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from abc import ABC, abstractmethod
|
|
6
|
-
from typing import TYPE_CHECKING
|
|
6
|
+
from typing import TYPE_CHECKING
|
|
7
7
|
|
|
8
8
|
from .plugin import Plugin
|
|
9
9
|
|
|
10
10
|
if TYPE_CHECKING:
|
|
11
|
+
from collections.abc import Callable
|
|
12
|
+
|
|
11
13
|
import ase.calculators.calculator
|
|
12
14
|
|
|
13
15
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Format modules for dpdata
|
|
@@ -135,7 +135,7 @@ def get_energy(outlines, ndump, dump_freq):
|
|
|
135
135
|
energy = []
|
|
136
136
|
nenergy = 0
|
|
137
137
|
for line_idx, line in enumerate(outlines):
|
|
138
|
-
if "final etot is" in line:
|
|
138
|
+
if "final etot is" in line or "#TOTAL ENERGY#" in line:
|
|
139
139
|
if nenergy % dump_freq == 0:
|
|
140
140
|
energy.append(float(line.split()[-2]))
|
|
141
141
|
nenergy += 1
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import glob
|
|
3
4
|
import os
|
|
4
5
|
|
|
5
6
|
import numpy as np
|
|
@@ -31,7 +32,22 @@ def get_log_file(fname, inlines):
|
|
|
31
32
|
return logf
|
|
32
33
|
|
|
33
34
|
|
|
34
|
-
def
|
|
35
|
+
def get_relax_stru_files(output_dir):
|
|
36
|
+
"""Find the STRU files in the output directory.
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
output_dir (str): output directory
|
|
40
|
+
|
|
41
|
+
Returns
|
|
42
|
+
-------
|
|
43
|
+
strus: list of STRU files
|
|
44
|
+
example:
|
|
45
|
+
["STRU_ION1_D", "STRU_ION2_D"]
|
|
46
|
+
"""
|
|
47
|
+
return glob.glob(os.path.join(output_dir, "STRU_ION*_D"))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def get_coords_from_log(loglines, natoms, stru_files=None):
|
|
35
51
|
"""NOTICE: unit of coords and cells is Angstrom
|
|
36
52
|
order:
|
|
37
53
|
coordinate
|
|
@@ -72,7 +88,12 @@ def get_coords_from_log(loglines, natoms):
|
|
|
72
88
|
coord_direct.append(False)
|
|
73
89
|
for k in range(2, 2 + natoms):
|
|
74
90
|
coords[-1].append(
|
|
75
|
-
list(
|
|
91
|
+
list(
|
|
92
|
+
map(
|
|
93
|
+
lambda x: float(x) * a0 * bohr2ang,
|
|
94
|
+
loglines[i + k].split()[1:4],
|
|
95
|
+
)
|
|
96
|
+
)
|
|
76
97
|
)
|
|
77
98
|
else:
|
|
78
99
|
assert False, "Unrecongnized coordinate type, %s, line:%d" % ( # noqa: UP031
|
|
@@ -91,16 +112,42 @@ def get_coords_from_log(loglines, natoms):
|
|
|
91
112
|
cells.append([])
|
|
92
113
|
for k in range(1, 4):
|
|
93
114
|
cells[-1].append(
|
|
94
|
-
list(
|
|
115
|
+
list(
|
|
116
|
+
map(
|
|
117
|
+
lambda x: float(x) * a0 * bohr2ang,
|
|
118
|
+
loglines[i + k].split()[0:3],
|
|
119
|
+
)
|
|
120
|
+
)
|
|
95
121
|
)
|
|
96
122
|
|
|
97
|
-
elif line[1:14] == "final etot is":
|
|
123
|
+
elif line[1:14] == "final etot is" or "#TOTAL ENERGY#" in line:
|
|
98
124
|
# add the energy for previous structures whose SCF is not converged
|
|
99
125
|
while len(energy) < len(coords) - 1:
|
|
100
126
|
energy.append(np.nan)
|
|
101
127
|
# get the energy of current structure
|
|
102
128
|
energy.append(float(line.split()[-2]))
|
|
103
129
|
|
|
130
|
+
# in some relax method (like: bfgs_trad), the coordinate is not outputed in running_relax.log
|
|
131
|
+
# but if out_stru is true, then STRU_ION*_D will be outputed in OUT.ABACUS
|
|
132
|
+
# we should read cell and coord from STRU_ION*_D files
|
|
133
|
+
if len(energy) > 1 and len(coords) == 1:
|
|
134
|
+
# the energies of all structrues are collected, but coords have only the first structure
|
|
135
|
+
if (
|
|
136
|
+
stru_files is not None and len(stru_files) > 1
|
|
137
|
+
): # if stru_files are not only STRU_ION_D
|
|
138
|
+
stru_file_name = [os.path.basename(i) for i in stru_files]
|
|
139
|
+
coords = coords[:1] + [np.nan for i in range(len(energy) - 1)]
|
|
140
|
+
coord_direct = coord_direct[:1] + [False for i in range(len(energy) - 1)]
|
|
141
|
+
cells = cells[:1] + [np.nan for i in range(len(energy) - 1)]
|
|
142
|
+
for iframe in range(1, len(energy)):
|
|
143
|
+
if f"STRU_ION{iframe}_D" in stru_file_name:
|
|
144
|
+
# read the structure from STRU_ION*_D
|
|
145
|
+
stru_data = get_frame_from_stru(
|
|
146
|
+
stru_files[stru_file_name.index(f"STRU_ION{iframe}_D")]
|
|
147
|
+
)
|
|
148
|
+
coords[iframe] = stru_data["coords"][0]
|
|
149
|
+
cells[iframe] = stru_data["cells"][0]
|
|
150
|
+
|
|
104
151
|
force = collect_force(loglines)
|
|
105
152
|
stress = collect_stress(loglines)
|
|
106
153
|
|
|
@@ -133,7 +180,11 @@ def get_coords_from_log(loglines, natoms):
|
|
|
133
180
|
|
|
134
181
|
# delete structures whose energy is np.nan
|
|
135
182
|
for i in range(minl):
|
|
136
|
-
if
|
|
183
|
+
if (
|
|
184
|
+
np.isnan(energy[i - minl])
|
|
185
|
+
or np.any(np.isnan(coords[i - minl]))
|
|
186
|
+
or np.any(np.isnan(cells[i - minl]))
|
|
187
|
+
):
|
|
137
188
|
del energy[i - minl]
|
|
138
189
|
del coords[i - minl]
|
|
139
190
|
del cells[i - minl]
|
|
@@ -154,10 +205,6 @@ def get_coords_from_log(loglines, natoms):
|
|
|
154
205
|
if coord_direct[i]:
|
|
155
206
|
coords[i] = coords[i].dot(cells[i])
|
|
156
207
|
|
|
157
|
-
# transfer bohrium to angstrom
|
|
158
|
-
cells *= bohr2ang
|
|
159
|
-
coords *= bohr2ang
|
|
160
|
-
|
|
161
208
|
if len(stress) > 0:
|
|
162
209
|
virial = np.zeros([len(cells), 3, 3])
|
|
163
210
|
for i in range(len(cells)):
|
|
@@ -191,7 +238,11 @@ def get_frame(fname):
|
|
|
191
238
|
with open_file(logf) as f1:
|
|
192
239
|
lines = f1.readlines()
|
|
193
240
|
|
|
194
|
-
|
|
241
|
+
relax_stru_files = get_relax_stru_files(os.path.dirname(logf))
|
|
242
|
+
|
|
243
|
+
energy, cells, coords, force, stress, virial = get_coords_from_log(
|
|
244
|
+
lines, natoms, stru_files=relax_stru_files
|
|
245
|
+
)
|
|
195
246
|
|
|
196
247
|
magmom, magforce = get_mag_force(lines)
|
|
197
248
|
|
|
@@ -8,7 +8,7 @@ import numpy as np
|
|
|
8
8
|
|
|
9
9
|
from dpdata.utils import open_file
|
|
10
10
|
|
|
11
|
-
from
|
|
11
|
+
from ...unit import LengthConversion, PressureConversion
|
|
12
12
|
from .stru import get_frame_from_stru
|
|
13
13
|
|
|
14
14
|
bohr2ang = LengthConversion("bohr", "angstrom").value()
|
|
@@ -5,11 +5,11 @@ import re
|
|
|
5
5
|
|
|
6
6
|
import numpy as np
|
|
7
7
|
|
|
8
|
-
from dpdata.amber.mask import pick_by_amber_mask
|
|
8
|
+
from dpdata.formats.amber.mask import pick_by_amber_mask
|
|
9
9
|
from dpdata.unit import EnergyConversion
|
|
10
10
|
from dpdata.utils import open_file
|
|
11
11
|
|
|
12
|
-
from
|
|
12
|
+
from ...periodic_table import ELEMENTS
|
|
13
13
|
|
|
14
14
|
kcalmol2eV = EnergyConversion("kcal_mol", "eV").value()
|
|
15
15
|
symbols = ["X"] + ELEMENTS
|
|
@@ -18,6 +18,70 @@ energy_convert = kcalmol2eV
|
|
|
18
18
|
force_convert = energy_convert
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
def cell_lengths_angles_to_cell(
|
|
22
|
+
cell_lengths: np.ndarray, cell_angles: np.ndarray
|
|
23
|
+
) -> np.ndarray:
|
|
24
|
+
"""Convert cell lengths and angles to cell vectors.
|
|
25
|
+
|
|
26
|
+
Parameters
|
|
27
|
+
----------
|
|
28
|
+
cell_lengths
|
|
29
|
+
Cell lengths with shape ``(..., 3)`` where the last dimension is
|
|
30
|
+
``a, b, c``.
|
|
31
|
+
cell_angles
|
|
32
|
+
Cell angles in degrees with shape ``(..., 3)`` where the last dimension
|
|
33
|
+
is ``alpha, beta, gamma``.
|
|
34
|
+
|
|
35
|
+
Returns
|
|
36
|
+
-------
|
|
37
|
+
np.ndarray
|
|
38
|
+
Cell vectors with shape ``(..., 3, 3)``.
|
|
39
|
+
"""
|
|
40
|
+
alpha = np.deg2rad(cell_angles[..., 0])
|
|
41
|
+
beta = np.deg2rad(cell_angles[..., 1])
|
|
42
|
+
gamma = np.deg2rad(cell_angles[..., 2])
|
|
43
|
+
|
|
44
|
+
a = cell_lengths[..., 0]
|
|
45
|
+
b = cell_lengths[..., 1]
|
|
46
|
+
c = cell_lengths[..., 2]
|
|
47
|
+
|
|
48
|
+
if np.any(cell_lengths <= 0.0):
|
|
49
|
+
raise RuntimeError("Invalid AMBER cell lengths")
|
|
50
|
+
if np.any((cell_angles <= 0.0) | (cell_angles >= 180.0)):
|
|
51
|
+
raise RuntimeError("Invalid AMBER cell angles")
|
|
52
|
+
|
|
53
|
+
cos_alpha = np.cos(alpha)
|
|
54
|
+
cos_beta = np.cos(beta)
|
|
55
|
+
cos_gamma = np.cos(gamma)
|
|
56
|
+
sin_gamma = np.sin(gamma)
|
|
57
|
+
ly = b * sin_gamma
|
|
58
|
+
if np.any(ly <= 1e-8):
|
|
59
|
+
raise RuntimeError("Invalid AMBER cell angles")
|
|
60
|
+
|
|
61
|
+
z_factor = (
|
|
62
|
+
1
|
|
63
|
+
- cos_alpha**2
|
|
64
|
+
- cos_beta**2
|
|
65
|
+
- cos_gamma**2
|
|
66
|
+
+ 2 * cos_alpha * cos_beta * cos_gamma
|
|
67
|
+
)
|
|
68
|
+
lz2 = c**2 * z_factor / sin_gamma**2
|
|
69
|
+
if np.any(lz2 <= 1e-8):
|
|
70
|
+
raise RuntimeError("Invalid AMBER cell angles")
|
|
71
|
+
|
|
72
|
+
z = np.sqrt(z_factor) / sin_gamma
|
|
73
|
+
|
|
74
|
+
shape = (*cell_lengths.shape[:-1], 3, 3)
|
|
75
|
+
cells = np.zeros(shape)
|
|
76
|
+
cells[..., 0, 0] = a
|
|
77
|
+
cells[..., 1, 0] = b * cos_gamma
|
|
78
|
+
cells[..., 1, 1] = b * sin_gamma
|
|
79
|
+
cells[..., 2, 0] = c * cos_beta
|
|
80
|
+
cells[..., 2, 1] = c * (cos_alpha - cos_beta * cos_gamma) / sin_gamma
|
|
81
|
+
cells[..., 2, 2] = c * z
|
|
82
|
+
return cells
|
|
83
|
+
|
|
84
|
+
|
|
21
85
|
def read_amber_traj(
|
|
22
86
|
parm7_file,
|
|
23
87
|
nc_file,
|
|
@@ -85,15 +149,7 @@ def read_amber_traj(
|
|
|
85
149
|
coords = np.array(f.variables["coordinates"][:])
|
|
86
150
|
cell_lengths = np.array(f.variables["cell_lengths"][:])
|
|
87
151
|
cell_angles = np.array(f.variables["cell_angles"][:])
|
|
88
|
-
|
|
89
|
-
# only support 90
|
|
90
|
-
# TODO: support other angles
|
|
91
|
-
shape = cell_lengths.shape
|
|
92
|
-
cells = np.zeros((shape[0], 3, 3))
|
|
93
|
-
for ii in range(3):
|
|
94
|
-
cells[:, ii, ii] = cell_lengths[:, ii]
|
|
95
|
-
else:
|
|
96
|
-
raise RuntimeError("Unsupported cells")
|
|
152
|
+
cells = cell_lengths_angles_to_cell(cell_lengths, cell_angles)
|
|
97
153
|
|
|
98
154
|
if labeled:
|
|
99
155
|
with netcdf_file(mdfrc_file, "r") as f:
|
|
File without changes
|
|
@@ -9,8 +9,8 @@ from dpdata.utils import open_file
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
10
|
from dpdata.utils import FileType
|
|
11
11
|
|
|
12
|
-
from
|
|
13
|
-
from
|
|
12
|
+
from ...periodic_table import ELEMENTS
|
|
13
|
+
from ...unit import (
|
|
14
14
|
EnergyConversion,
|
|
15
15
|
ForceConversion,
|
|
16
16
|
HessianConversion,
|
|
@@ -9,8 +9,8 @@ from dpdata.utils import open_file
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
10
|
from dpdata.utils import FileType
|
|
11
11
|
|
|
12
|
-
from
|
|
13
|
-
from
|
|
12
|
+
from ...periodic_table import ELEMENTS
|
|
13
|
+
from ...unit import EnergyConversion, ForceConversion, LengthConversion
|
|
14
14
|
|
|
15
15
|
length_convert = LengthConversion("bohr", "angstrom").value()
|
|
16
16
|
energy_convert = EnergyConversion("hartree", "eV").value()
|
|
File without changes
|
|
@@ -11,7 +11,7 @@ from dpdata.utils import open_file
|
|
|
11
11
|
if TYPE_CHECKING:
|
|
12
12
|
from dpdata.utils import FileType
|
|
13
13
|
|
|
14
|
-
from
|
|
14
|
+
from ...unit import LengthConversion
|
|
15
15
|
|
|
16
16
|
nm2ang = LengthConversion("nm", "angstrom").value()
|
|
17
17
|
ang2nm = LengthConversion("angstrom", "nm").value()
|