dpdata 0.2.19__tar.gz → 0.2.21__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-0.2.19 → dpdata-0.2.21}/.git_archival.txt +0 -1
- {dpdata-0.2.19 → dpdata-0.2.21}/.github/workflows/benchmark.yml +4 -4
- {dpdata-0.2.19 → dpdata-0.2.21}/.github/workflows/test.yml +1 -1
- {dpdata-0.2.19 → dpdata-0.2.21}/.pre-commit-config.yaml +2 -2
- dpdata-0.2.21/PKG-INFO +266 -0
- dpdata-0.2.21/README.md +50 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/_version.py +2 -2
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/abacus/md.py +14 -4
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/abacus/relax.py +13 -3
- dpdata-0.2.21/dpdata/abacus/scf.py +850 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/amber/md.py +4 -3
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/amber/sqm.py +10 -4
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/data_type.py +4 -0
- dpdata-0.2.21/dpdata/deepmd/comp.py +162 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/deepmd/hdf5.py +22 -59
- dpdata-0.2.21/dpdata/deepmd/mixed.py +137 -0
- dpdata-0.2.21/dpdata/deepmd/raw.py +140 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/dftbplus/output.py +12 -3
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/gaussian/log.py +9 -2
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/gromacs/gro.py +8 -2
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/lammps/dump.py +8 -2
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/openmx/omx.py +14 -7
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/orca/output.py +11 -2
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/abacus.py +44 -21
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/amber.py +2 -1
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/ase.py +11 -1
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/gaussian.py +12 -7
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/gromacs.py +10 -2
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/lammps.py +10 -4
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/n2p2.py +10 -4
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/orca.py +7 -2
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/psi4.py +10 -4
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/pwmat.py +10 -4
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/vasp.py +10 -5
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/xyz.py +10 -4
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/psi4/output.py +8 -2
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/qe/scf.py +31 -8
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/qe/traj.py +13 -7
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/system.py +27 -6
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/utils.py +45 -1
- dpdata-0.2.21/dpdata.egg-info/PKG-INFO +266 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata.egg-info/requires.txt +5 -2
- {dpdata-0.2.19 → dpdata-0.2.21}/pyproject.toml +7 -2
- dpdata-0.2.19/PKG-INFO +0 -537
- dpdata-0.2.19/README.md +0 -323
- dpdata-0.2.19/dpdata/abacus/scf.py +0 -428
- dpdata-0.2.19/dpdata/deepmd/comp.py +0 -205
- dpdata-0.2.19/dpdata/deepmd/mixed.py +0 -278
- dpdata-0.2.19/dpdata/deepmd/raw.py +0 -172
- dpdata-0.2.19/dpdata.egg-info/PKG-INFO +0 -537
- {dpdata-0.2.19 → dpdata-0.2.21}/.git-blame-ignore-revs +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/.gitattributes +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/.github/ISSUE_TEMPLATE/generic-issue.yml +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/.github/dependabot.yml +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/.github/workflows/mirror_gitee.yml +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/.github/workflows/pub-pypi.yml +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/.github/workflows/pyright.yml +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/.github/workflows/test_import.yml +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/.gitignore +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/.readthedocs.yaml +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/LICENSE +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/MANIFEST.in +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/benchmark/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/benchmark/test_import.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/__about__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/__main__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/abacus/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/amber/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/amber/mask.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/ase_calculator.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/bond_order_system.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/cli.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/cp2k/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/cp2k/cell.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/cp2k/output.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/deepmd/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/dftbplus/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/driver.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/fhi_aims/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/fhi_aims/output.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/format.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/gaussian/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/gaussian/gjf.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/gromacs/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/lammps/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/lammps/lmp.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/md/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/md/msd.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/md/pbc.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/md/rdf.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/md/water.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/openmx/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/orca/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/periodic_table.json +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/periodic_table.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugin.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/3dmol.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/cp2k.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/deepmd.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/dftbplus.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/fhi_aims.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/list.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/openmx.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/pymatgen.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/qe.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/rdkit.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/plugins/siesta.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/psi4/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/psi4/input.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/pwmat/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/pwmat/atomconfig.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/pwmat/movement.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/py.typed +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/pymatgen/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/pymatgen/molecule.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/pymatgen/structure.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/qe/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/rdkit/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/rdkit/sanitize.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/rdkit/utils.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/siesta/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/siesta/aiMD_output.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/siesta/output.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/stat.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/unit.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/vasp/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/vasp/outcar.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/vasp/poscar.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/vasp/xml.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/xyz/__init__.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/xyz/quip_gap_xyz.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata/xyz/xyz.py +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata.egg-info/SOURCES.txt +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata.egg-info/dependency_links.txt +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata.egg-info/entry_points.txt +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/dpdata.egg-info/top_level.txt +0 -0
- {dpdata-0.2.19 → dpdata-0.2.21}/setup.cfg +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Benchmark
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
- push
|
|
5
5
|
- pull_request
|
|
6
6
|
|
|
7
7
|
jobs:
|
|
8
|
-
|
|
8
|
+
benchmark:
|
|
9
9
|
runs-on: ubuntu-latest
|
|
10
10
|
steps:
|
|
11
11
|
- uses: actions/checkout@v4
|
|
@@ -15,9 +15,9 @@ jobs:
|
|
|
15
15
|
python-version: 3.12
|
|
16
16
|
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
17
17
|
- name: Install dependencies
|
|
18
|
-
run: uv pip install --system .[amber,ase,pymatgen,benchmark] rdkit openbabel-wheel
|
|
18
|
+
run: uv pip install --system .[test,amber,ase,pymatgen,benchmark] rdkit openbabel-wheel
|
|
19
19
|
- name: Run benchmarks
|
|
20
|
-
uses: CodSpeedHQ/action@
|
|
20
|
+
uses: CodSpeedHQ/action@v3
|
|
21
21
|
with:
|
|
22
22
|
token: ${{ secrets.CODSPEED_TOKEN }}
|
|
23
23
|
run: pytest benchmark/ --codspeed
|
|
@@ -20,7 +20,7 @@ jobs:
|
|
|
20
20
|
python-version: ${{ matrix.python-version }}
|
|
21
21
|
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
22
22
|
- name: Install dependencies
|
|
23
|
-
run: uv pip install --system .[amber,ase,pymatgen] coverage ./tests/plugin rdkit openbabel-wheel
|
|
23
|
+
run: uv pip install --system .[test,amber,ase,pymatgen] coverage ./tests/plugin rdkit openbabel-wheel
|
|
24
24
|
- name: Test
|
|
25
25
|
run: cd tests && coverage run --source=../dpdata -m unittest && cd .. && coverage combine tests/.coverage && coverage report
|
|
26
26
|
- name: Run codecov
|
|
@@ -21,7 +21,7 @@ repos:
|
|
|
21
21
|
# Python
|
|
22
22
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
23
23
|
# Ruff version.
|
|
24
|
-
rev: v0.
|
|
24
|
+
rev: v0.6.5
|
|
25
25
|
hooks:
|
|
26
26
|
- id: ruff
|
|
27
27
|
args: ["--fix"]
|
|
@@ -36,7 +36,7 @@ repos:
|
|
|
36
36
|
args: ["--write"]
|
|
37
37
|
# Python inside docs
|
|
38
38
|
- repo: https://github.com/asottile/blacken-docs
|
|
39
|
-
rev: 1.
|
|
39
|
+
rev: 1.18.0
|
|
40
40
|
hooks:
|
|
41
41
|
- id: blacken-docs
|
|
42
42
|
ci:
|
dpdata-0.2.21/PKG-INFO
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: dpdata
|
|
3
|
+
Version: 0.2.21
|
|
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: GNU LESSER GENERAL PUBLIC LICENSE
|
|
8
|
+
Version 3, 29 June 2007
|
|
9
|
+
|
|
10
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
11
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
12
|
+
of this license document, but changing it is not allowed.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
This version of the GNU Lesser General Public License incorporates
|
|
16
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
17
|
+
License, supplemented by the additional permissions listed below.
|
|
18
|
+
|
|
19
|
+
0. Additional Definitions.
|
|
20
|
+
|
|
21
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
22
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
23
|
+
General Public License.
|
|
24
|
+
|
|
25
|
+
"The Library" refers to a covered work governed by this License,
|
|
26
|
+
other than an Application or a Combined Work as defined below.
|
|
27
|
+
|
|
28
|
+
An "Application" is any work that makes use of an interface provided
|
|
29
|
+
by the Library, but which is not otherwise based on the Library.
|
|
30
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
31
|
+
of using an interface provided by the Library.
|
|
32
|
+
|
|
33
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
34
|
+
Application with the Library. The particular version of the Library
|
|
35
|
+
with which the Combined Work was made is also called the "Linked
|
|
36
|
+
Version".
|
|
37
|
+
|
|
38
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
39
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
40
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
41
|
+
based on the Application, and not on the Linked Version.
|
|
42
|
+
|
|
43
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
44
|
+
object code and/or source code for the Application, including any data
|
|
45
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
46
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
47
|
+
|
|
48
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
49
|
+
|
|
50
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
51
|
+
without being bound by section 3 of the GNU GPL.
|
|
52
|
+
|
|
53
|
+
2. Conveying Modified Versions.
|
|
54
|
+
|
|
55
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
56
|
+
facility refers to a function or data to be supplied by an Application
|
|
57
|
+
that uses the facility (other than as an argument passed when the
|
|
58
|
+
facility is invoked), then you may convey a copy of the modified
|
|
59
|
+
version:
|
|
60
|
+
|
|
61
|
+
a) under this License, provided that you make a good faith effort to
|
|
62
|
+
ensure that, in the event an Application does not supply the
|
|
63
|
+
function or data, the facility still operates, and performs
|
|
64
|
+
whatever part of its purpose remains meaningful, or
|
|
65
|
+
|
|
66
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
67
|
+
this License applicable to that copy.
|
|
68
|
+
|
|
69
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
70
|
+
|
|
71
|
+
The object code form of an Application may incorporate material from
|
|
72
|
+
a header file that is part of the Library. You may convey such object
|
|
73
|
+
code under terms of your choice, provided that, if the incorporated
|
|
74
|
+
material is not limited to numerical parameters, data structure
|
|
75
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
76
|
+
(ten or fewer lines in length), you do both of the following:
|
|
77
|
+
|
|
78
|
+
a) Give prominent notice with each copy of the object code that the
|
|
79
|
+
Library is used in it and that the Library and its use are
|
|
80
|
+
covered by this License.
|
|
81
|
+
|
|
82
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
83
|
+
document.
|
|
84
|
+
|
|
85
|
+
4. Combined Works.
|
|
86
|
+
|
|
87
|
+
You may convey a Combined Work under terms of your choice that,
|
|
88
|
+
taken together, effectively do not restrict modification of the
|
|
89
|
+
portions of the Library contained in the Combined Work and reverse
|
|
90
|
+
engineering for debugging such modifications, if you also do each of
|
|
91
|
+
the following:
|
|
92
|
+
|
|
93
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
94
|
+
the Library is used in it and that the Library and its use are
|
|
95
|
+
covered by this License.
|
|
96
|
+
|
|
97
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
98
|
+
document.
|
|
99
|
+
|
|
100
|
+
c) For a Combined Work that displays copyright notices during
|
|
101
|
+
execution, include the copyright notice for the Library among
|
|
102
|
+
these notices, as well as a reference directing the user to the
|
|
103
|
+
copies of the GNU GPL and this license document.
|
|
104
|
+
|
|
105
|
+
d) Do one of the following:
|
|
106
|
+
|
|
107
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
108
|
+
License, and the Corresponding Application Code in a form
|
|
109
|
+
suitable for, and under terms that permit, the user to
|
|
110
|
+
recombine or relink the Application with a modified version of
|
|
111
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
112
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
113
|
+
Corresponding Source.
|
|
114
|
+
|
|
115
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
116
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
117
|
+
a copy of the Library already present on the user's computer
|
|
118
|
+
system, and (b) will operate properly with a modified version
|
|
119
|
+
of the Library that is interface-compatible with the Linked
|
|
120
|
+
Version.
|
|
121
|
+
|
|
122
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
123
|
+
be required to provide such information under section 6 of the
|
|
124
|
+
GNU GPL, and only to the extent that such information is
|
|
125
|
+
necessary to install and execute a modified version of the
|
|
126
|
+
Combined Work produced by recombining or relinking the
|
|
127
|
+
Application with a modified version of the Linked Version. (If
|
|
128
|
+
you use option 4d0, the Installation Information must accompany
|
|
129
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
130
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
131
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
132
|
+
for conveying Corresponding Source.)
|
|
133
|
+
|
|
134
|
+
5. Combined Libraries.
|
|
135
|
+
|
|
136
|
+
You may place library facilities that are a work based on the
|
|
137
|
+
Library side by side in a single library together with other library
|
|
138
|
+
facilities that are not Applications and are not covered by this
|
|
139
|
+
License, and convey such a combined library under terms of your
|
|
140
|
+
choice, if you do both of the following:
|
|
141
|
+
|
|
142
|
+
a) Accompany the combined library with a copy of the same work based
|
|
143
|
+
on the Library, uncombined with any other library facilities,
|
|
144
|
+
conveyed under the terms of this License.
|
|
145
|
+
|
|
146
|
+
b) Give prominent notice with the combined library that part of it
|
|
147
|
+
is a work based on the Library, and explaining where to find the
|
|
148
|
+
accompanying uncombined form of the same work.
|
|
149
|
+
|
|
150
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
151
|
+
|
|
152
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
153
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
154
|
+
versions will be similar in spirit to the present version, but may
|
|
155
|
+
differ in detail to address new problems or concerns.
|
|
156
|
+
|
|
157
|
+
Each version is given a distinguishing version number. If the
|
|
158
|
+
Library as you received it specifies that a certain numbered version
|
|
159
|
+
of the GNU Lesser General Public License "or any later version"
|
|
160
|
+
applies to it, you have the option of following the terms and
|
|
161
|
+
conditions either of that published version or of any later version
|
|
162
|
+
published by the Free Software Foundation. If the Library as you
|
|
163
|
+
received it does not specify a version number of the GNU Lesser
|
|
164
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
165
|
+
General Public License ever published by the Free Software Foundation.
|
|
166
|
+
|
|
167
|
+
If the Library as you received it specifies that a proxy can decide
|
|
168
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
169
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
170
|
+
permanent authorization for you to choose that version for the
|
|
171
|
+
Library.
|
|
172
|
+
|
|
173
|
+
Project-URL: Homepage, https://github.com/deepmodeling/dpdata
|
|
174
|
+
Project-URL: documentation, https://docs.deepmodeling.com/projects/dpdata
|
|
175
|
+
Project-URL: repository, https://github.com/deepmodeling/dpdata
|
|
176
|
+
Keywords: lammps,vasp,deepmd-kit
|
|
177
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
178
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
179
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
180
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
181
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
182
|
+
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
|
|
183
|
+
Requires-Python: >=3.7
|
|
184
|
+
Description-Content-Type: text/markdown
|
|
185
|
+
License-File: LICENSE
|
|
186
|
+
Requires-Dist: numpy>=1.14.3
|
|
187
|
+
Requires-Dist: monty
|
|
188
|
+
Requires-Dist: scipy
|
|
189
|
+
Requires-Dist: h5py
|
|
190
|
+
Requires-Dist: wcmatch
|
|
191
|
+
Requires-Dist: importlib_metadata>=1.4; python_version < "3.8"
|
|
192
|
+
Requires-Dist: typing_extensions; python_version < "3.8"
|
|
193
|
+
Provides-Extra: test
|
|
194
|
+
Requires-Dist: numpy<2; extra == "test"
|
|
195
|
+
Provides-Extra: ase
|
|
196
|
+
Requires-Dist: ase; extra == "ase"
|
|
197
|
+
Provides-Extra: amber
|
|
198
|
+
Requires-Dist: parmed; python_version >= "3.8" and extra == "amber"
|
|
199
|
+
Requires-Dist: parmed<4; python_version < "3.8" and extra == "amber"
|
|
200
|
+
Provides-Extra: pymatgen
|
|
201
|
+
Requires-Dist: pymatgen; extra == "pymatgen"
|
|
202
|
+
Provides-Extra: docs
|
|
203
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
204
|
+
Requires-Dist: recommonmark; extra == "docs"
|
|
205
|
+
Requires-Dist: sphinx_rtd_theme>=1.0.0rc1; extra == "docs"
|
|
206
|
+
Requires-Dist: numpydoc; extra == "docs"
|
|
207
|
+
Requires-Dist: myst-parser; extra == "docs"
|
|
208
|
+
Requires-Dist: deepmodeling-sphinx>=0.1.1; extra == "docs"
|
|
209
|
+
Requires-Dist: sphinx-argparse<0.5.0; extra == "docs"
|
|
210
|
+
Requires-Dist: rdkit; extra == "docs"
|
|
211
|
+
Requires-Dist: jupyterlite-sphinx; extra == "docs"
|
|
212
|
+
Requires-Dist: jupyterlite-xeus; extra == "docs"
|
|
213
|
+
Provides-Extra: benchmark
|
|
214
|
+
Requires-Dist: pytest; extra == "benchmark"
|
|
215
|
+
Requires-Dist: pytest-codspeed; extra == "benchmark"
|
|
216
|
+
|
|
217
|
+
# dpdata
|
|
218
|
+
|
|
219
|
+
[](https://anaconda.org/conda-forge/dpdata)
|
|
220
|
+
[](https://pypi.org/project/dpdata)
|
|
221
|
+
[](https://dpdata.readthedocs.io/)
|
|
222
|
+
|
|
223
|
+
**dpdata** is a Python package for manipulating atomistic data of software in computational science.
|
|
224
|
+
|
|
225
|
+
## Installation
|
|
226
|
+
|
|
227
|
+
DP-GEN only supports Python 3.7 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 DP-GEN:
|
|
228
|
+
|
|
229
|
+
- Install via pip: `pip install dpdata`
|
|
230
|
+
- Install via conda: `conda install -c conda-forge dpdata`
|
|
231
|
+
- Install from source code: `git clone https://github.com/deepmodeling/dpdata && pip install ./dpdata`
|
|
232
|
+
|
|
233
|
+
To test if the installation is successful, you may execute
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
dpdata --version
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Supported packages
|
|
240
|
+
|
|
241
|
+
`dpdata` is aimmed to support different kinds of atomistic packages:
|
|
242
|
+
|
|
243
|
+
- Atomistic machine learning packages, such as [DeePMD-kit](https://github.com/deepmodeling/deepmd-kit);
|
|
244
|
+
- Molecular dynamics packages, such as [LAMMPS](https://github.com/lammps/lammps) and [GROMACS](https://gitlab.com/gromacs/gromacs);
|
|
245
|
+
- Quantum chemistry packages, such as [VASP](https://www.vasp.at/), [Gaussian](https://gaussian.com), and [ABACUS](https://github.com/deepmodeling/abacus-develop);
|
|
246
|
+
- Atomistic visualization packages, such as [3Dmol.js](https://3dmol.csb.pitt.edu/).
|
|
247
|
+
- Other atomistic tools, such as [ASE](https://gitlab.com/ase/ase).
|
|
248
|
+
- Common formats such as `xyz`.
|
|
249
|
+
|
|
250
|
+
All supported formats are listed [here](https://docs.deepmodeling.com/projects/dpdata/en/master/formats.html).
|
|
251
|
+
|
|
252
|
+
## Quick start
|
|
253
|
+
|
|
254
|
+
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).
|
|
255
|
+
|
|
256
|
+
```sh
|
|
257
|
+
dpdata OUTCAR -i vasp/outcar -o deepmd/npy -O deepmd_data
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
For advanced usage with Python APIs, [read dpdata documentation](https://docs.deepmodeling.com/projects/dpdata/).
|
|
261
|
+
|
|
262
|
+
## Plugins
|
|
263
|
+
|
|
264
|
+
- [cp2kdata](https://github.com/robinzyb/cp2kdata) adds the latest CP2K support for dpdata.
|
|
265
|
+
|
|
266
|
+
For how to create your own plugin packages, [read dpdata documentation](https://docs.deepmodeling.com/projects/dpdata/).
|
dpdata-0.2.21/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# dpdata
|
|
2
|
+
|
|
3
|
+
[](https://anaconda.org/conda-forge/dpdata)
|
|
4
|
+
[](https://pypi.org/project/dpdata)
|
|
5
|
+
[](https://dpdata.readthedocs.io/)
|
|
6
|
+
|
|
7
|
+
**dpdata** is a Python package for manipulating atomistic data of software in computational science.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
DP-GEN only supports Python 3.7 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 DP-GEN:
|
|
12
|
+
|
|
13
|
+
- Install via pip: `pip install dpdata`
|
|
14
|
+
- Install via conda: `conda install -c conda-forge dpdata`
|
|
15
|
+
- Install from source code: `git clone https://github.com/deepmodeling/dpdata && pip install ./dpdata`
|
|
16
|
+
|
|
17
|
+
To test if the installation is successful, you may execute
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
dpdata --version
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Supported packages
|
|
24
|
+
|
|
25
|
+
`dpdata` is aimmed to support different kinds of atomistic packages:
|
|
26
|
+
|
|
27
|
+
- Atomistic machine learning packages, such as [DeePMD-kit](https://github.com/deepmodeling/deepmd-kit);
|
|
28
|
+
- Molecular dynamics packages, such as [LAMMPS](https://github.com/lammps/lammps) and [GROMACS](https://gitlab.com/gromacs/gromacs);
|
|
29
|
+
- Quantum chemistry packages, such as [VASP](https://www.vasp.at/), [Gaussian](https://gaussian.com), and [ABACUS](https://github.com/deepmodeling/abacus-develop);
|
|
30
|
+
- Atomistic visualization packages, such as [3Dmol.js](https://3dmol.csb.pitt.edu/).
|
|
31
|
+
- Other atomistic tools, such as [ASE](https://gitlab.com/ase/ase).
|
|
32
|
+
- Common formats such as `xyz`.
|
|
33
|
+
|
|
34
|
+
All supported formats are listed [here](https://docs.deepmodeling.com/projects/dpdata/en/master/formats.html).
|
|
35
|
+
|
|
36
|
+
## Quick start
|
|
37
|
+
|
|
38
|
+
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).
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
dpdata OUTCAR -i vasp/outcar -o deepmd/npy -O deepmd_data
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
For advanced usage with Python APIs, [read dpdata documentation](https://docs.deepmodeling.com/projects/dpdata/).
|
|
45
|
+
|
|
46
|
+
## Plugins
|
|
47
|
+
|
|
48
|
+
- [cp2kdata](https://github.com/robinzyb/cp2kdata) adds the latest CP2K support for dpdata.
|
|
49
|
+
|
|
50
|
+
For how to create your own plugin packages, [read dpdata documentation](https://docs.deepmodeling.com/projects/dpdata/).
|
|
@@ -5,11 +5,14 @@ import warnings
|
|
|
5
5
|
|
|
6
6
|
import numpy as np
|
|
7
7
|
|
|
8
|
+
from dpdata.utils import open_file
|
|
9
|
+
|
|
8
10
|
from .scf import (
|
|
9
11
|
bohr2ang,
|
|
10
12
|
get_cell,
|
|
11
13
|
get_coords,
|
|
12
14
|
get_geometry_in,
|
|
15
|
+
get_mag_force,
|
|
13
16
|
kbar2evperang3,
|
|
14
17
|
)
|
|
15
18
|
|
|
@@ -156,12 +159,12 @@ def get_frame(fname):
|
|
|
156
159
|
path_in = os.path.join(fname, "INPUT")
|
|
157
160
|
else:
|
|
158
161
|
raise RuntimeError("invalid input")
|
|
159
|
-
with
|
|
162
|
+
with open_file(path_in) as fp:
|
|
160
163
|
inlines = fp.read().split("\n")
|
|
161
164
|
geometry_path_in = get_geometry_in(fname, inlines) # base dir of STRU
|
|
162
165
|
path_out = get_path_out(fname, inlines)
|
|
163
166
|
|
|
164
|
-
with
|
|
167
|
+
with open_file(geometry_path_in) as fp:
|
|
165
168
|
geometry_inlines = fp.read().split("\n")
|
|
166
169
|
celldm, cell = get_cell(geometry_inlines)
|
|
167
170
|
atom_names, natoms, types, coords = get_coords(
|
|
@@ -172,11 +175,11 @@ def get_frame(fname):
|
|
|
172
175
|
# ndump = int(os.popen("ls -l %s | grep 'md_pos_' | wc -l" %path_out).readlines()[0])
|
|
173
176
|
# number of dumped geometry files
|
|
174
177
|
# coords = get_coords_from_cif(ndump, dump_freq, atom_names, natoms, types, path_out, cell)
|
|
175
|
-
with
|
|
178
|
+
with open_file(os.path.join(path_out, "MD_dump")) as fp:
|
|
176
179
|
dumplines = fp.read().split("\n")
|
|
177
180
|
coords, cells, force, stress = get_coords_from_dump(dumplines, natoms)
|
|
178
181
|
ndump = np.shape(coords)[0]
|
|
179
|
-
with
|
|
182
|
+
with open_file(os.path.join(path_out, "running_md.log")) as fp:
|
|
180
183
|
outlines = fp.read().split("\n")
|
|
181
184
|
energy = get_energy(outlines, ndump, dump_freq)
|
|
182
185
|
|
|
@@ -197,6 +200,9 @@ def get_frame(fname):
|
|
|
197
200
|
stress[iframe] *= np.linalg.det(cells[iframe, :, :].reshape([3, 3]))
|
|
198
201
|
if np.sum(np.abs(stress[0])) < 1e-10:
|
|
199
202
|
stress = None
|
|
203
|
+
|
|
204
|
+
magmom, magforce = get_mag_force(outlines)
|
|
205
|
+
|
|
200
206
|
data = {}
|
|
201
207
|
data["atom_names"] = atom_names
|
|
202
208
|
data["atom_numbs"] = natoms
|
|
@@ -211,5 +217,9 @@ def get_frame(fname):
|
|
|
211
217
|
if not isinstance(data["virials"], np.ndarray):
|
|
212
218
|
del data["virials"]
|
|
213
219
|
data["orig"] = np.zeros(3)
|
|
220
|
+
if len(magmom) > 0:
|
|
221
|
+
data["spins"] = magmom
|
|
222
|
+
if len(magforce) > 0:
|
|
223
|
+
data["mag_forces"] = magforce
|
|
214
224
|
|
|
215
225
|
return data
|
|
@@ -4,6 +4,8 @@ import os
|
|
|
4
4
|
|
|
5
5
|
import numpy as np
|
|
6
6
|
|
|
7
|
+
from dpdata.utils import open_file
|
|
8
|
+
|
|
7
9
|
from .scf import (
|
|
8
10
|
bohr2ang,
|
|
9
11
|
collect_force,
|
|
@@ -11,6 +13,7 @@ from .scf import (
|
|
|
11
13
|
get_cell,
|
|
12
14
|
get_coords,
|
|
13
15
|
get_geometry_in,
|
|
16
|
+
get_mag_force,
|
|
14
17
|
kbar2evperang3,
|
|
15
18
|
)
|
|
16
19
|
|
|
@@ -174,10 +177,10 @@ def get_frame(fname):
|
|
|
174
177
|
path_in = os.path.join(fname, "INPUT")
|
|
175
178
|
else:
|
|
176
179
|
raise RuntimeError("invalid input")
|
|
177
|
-
with
|
|
180
|
+
with open_file(path_in) as fp:
|
|
178
181
|
inlines = fp.read().split("\n")
|
|
179
182
|
geometry_path_in = get_geometry_in(fname, inlines) # base dir of STRU
|
|
180
|
-
with
|
|
183
|
+
with open_file(geometry_path_in) as fp:
|
|
181
184
|
geometry_inlines = fp.read().split("\n")
|
|
182
185
|
celldm, cell = get_cell(geometry_inlines)
|
|
183
186
|
atom_names, natoms, types, coord_tmp = get_coords(
|
|
@@ -186,7 +189,7 @@ def get_frame(fname):
|
|
|
186
189
|
|
|
187
190
|
logf = get_log_file(fname, inlines)
|
|
188
191
|
assert os.path.isfile(logf), f"Error: can not find {logf}"
|
|
189
|
-
with
|
|
192
|
+
with open_file(logf) as f1:
|
|
190
193
|
lines = f1.readlines()
|
|
191
194
|
|
|
192
195
|
atomnumber = 0
|
|
@@ -196,6 +199,8 @@ def get_frame(fname):
|
|
|
196
199
|
lines, atomnumber
|
|
197
200
|
)
|
|
198
201
|
|
|
202
|
+
magmom, magforce = get_mag_force(lines)
|
|
203
|
+
|
|
199
204
|
data = {}
|
|
200
205
|
data["atom_names"] = atom_names
|
|
201
206
|
data["atom_numbs"] = natoms
|
|
@@ -209,4 +214,9 @@ def get_frame(fname):
|
|
|
209
214
|
data["stress"] = stress
|
|
210
215
|
data["orig"] = np.zeros(3)
|
|
211
216
|
|
|
217
|
+
if len(magmom) > 0:
|
|
218
|
+
data["spins"] = magmom
|
|
219
|
+
if len(magforce) > 0:
|
|
220
|
+
data["mag_forces"] = magforce
|
|
221
|
+
|
|
212
222
|
return data
|