dpdata 0.2.20__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.
Files changed (136) hide show
  1. {dpdata-0.2.20 → dpdata-0.2.21}/.pre-commit-config.yaml +1 -1
  2. {dpdata-0.2.20 → dpdata-0.2.21}/PKG-INFO +1 -1
  3. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/_version.py +2 -2
  4. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/abacus/md.py +8 -0
  5. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/abacus/relax.py +8 -0
  6. dpdata-0.2.21/dpdata/abacus/scf.py +850 -0
  7. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/data_type.py +4 -0
  8. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/deepmd/comp.py +5 -57
  9. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/deepmd/hdf5.py +7 -54
  10. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/deepmd/raw.py +4 -41
  11. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/abacus.py +36 -19
  12. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/ase.py +11 -1
  13. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/qe/scf.py +27 -6
  14. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/system.py +27 -6
  15. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata.egg-info/PKG-INFO +1 -1
  16. dpdata-0.2.20/dpdata/abacus/scf.py +0 -430
  17. {dpdata-0.2.20 → dpdata-0.2.21}/.git-blame-ignore-revs +0 -0
  18. {dpdata-0.2.20 → dpdata-0.2.21}/.git_archival.txt +0 -0
  19. {dpdata-0.2.20 → dpdata-0.2.21}/.gitattributes +0 -0
  20. {dpdata-0.2.20 → dpdata-0.2.21}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  21. {dpdata-0.2.20 → dpdata-0.2.21}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  22. {dpdata-0.2.20 → dpdata-0.2.21}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  23. {dpdata-0.2.20 → dpdata-0.2.21}/.github/ISSUE_TEMPLATE/generic-issue.yml +0 -0
  24. {dpdata-0.2.20 → dpdata-0.2.21}/.github/dependabot.yml +0 -0
  25. {dpdata-0.2.20 → dpdata-0.2.21}/.github/workflows/benchmark.yml +0 -0
  26. {dpdata-0.2.20 → dpdata-0.2.21}/.github/workflows/mirror_gitee.yml +0 -0
  27. {dpdata-0.2.20 → dpdata-0.2.21}/.github/workflows/pub-pypi.yml +0 -0
  28. {dpdata-0.2.20 → dpdata-0.2.21}/.github/workflows/pyright.yml +0 -0
  29. {dpdata-0.2.20 → dpdata-0.2.21}/.github/workflows/test.yml +0 -0
  30. {dpdata-0.2.20 → dpdata-0.2.21}/.github/workflows/test_import.yml +0 -0
  31. {dpdata-0.2.20 → dpdata-0.2.21}/.gitignore +0 -0
  32. {dpdata-0.2.20 → dpdata-0.2.21}/.readthedocs.yaml +0 -0
  33. {dpdata-0.2.20 → dpdata-0.2.21}/LICENSE +0 -0
  34. {dpdata-0.2.20 → dpdata-0.2.21}/MANIFEST.in +0 -0
  35. {dpdata-0.2.20 → dpdata-0.2.21}/README.md +0 -0
  36. {dpdata-0.2.20 → dpdata-0.2.21}/benchmark/__init__.py +0 -0
  37. {dpdata-0.2.20 → dpdata-0.2.21}/benchmark/test_import.py +0 -0
  38. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/__about__.py +0 -0
  39. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/__init__.py +0 -0
  40. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/__main__.py +0 -0
  41. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/abacus/__init__.py +0 -0
  42. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/amber/__init__.py +0 -0
  43. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/amber/mask.py +0 -0
  44. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/amber/md.py +0 -0
  45. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/amber/sqm.py +0 -0
  46. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/ase_calculator.py +0 -0
  47. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/bond_order_system.py +0 -0
  48. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/cli.py +0 -0
  49. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/cp2k/__init__.py +0 -0
  50. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/cp2k/cell.py +0 -0
  51. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/cp2k/output.py +0 -0
  52. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/deepmd/__init__.py +0 -0
  53. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/deepmd/mixed.py +0 -0
  54. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/dftbplus/__init__.py +0 -0
  55. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/dftbplus/output.py +0 -0
  56. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/driver.py +0 -0
  57. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/fhi_aims/__init__.py +0 -0
  58. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/fhi_aims/output.py +0 -0
  59. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/format.py +0 -0
  60. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/gaussian/__init__.py +0 -0
  61. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/gaussian/gjf.py +0 -0
  62. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/gaussian/log.py +0 -0
  63. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/gromacs/__init__.py +0 -0
  64. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/gromacs/gro.py +0 -0
  65. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/lammps/__init__.py +0 -0
  66. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/lammps/dump.py +0 -0
  67. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/lammps/lmp.py +0 -0
  68. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/md/__init__.py +0 -0
  69. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/md/msd.py +0 -0
  70. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/md/pbc.py +0 -0
  71. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/md/rdf.py +0 -0
  72. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/md/water.py +0 -0
  73. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/openmx/__init__.py +0 -0
  74. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/openmx/omx.py +0 -0
  75. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/orca/__init__.py +0 -0
  76. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/orca/output.py +0 -0
  77. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/periodic_table.json +0 -0
  78. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/periodic_table.py +0 -0
  79. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugin.py +0 -0
  80. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/3dmol.py +0 -0
  81. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/__init__.py +0 -0
  82. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/amber.py +0 -0
  83. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/cp2k.py +0 -0
  84. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/deepmd.py +0 -0
  85. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/dftbplus.py +0 -0
  86. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/fhi_aims.py +0 -0
  87. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/gaussian.py +0 -0
  88. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/gromacs.py +0 -0
  89. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/lammps.py +0 -0
  90. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/list.py +0 -0
  91. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/n2p2.py +0 -0
  92. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/openmx.py +0 -0
  93. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/orca.py +0 -0
  94. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/psi4.py +0 -0
  95. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/pwmat.py +0 -0
  96. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/pymatgen.py +0 -0
  97. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/qe.py +0 -0
  98. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/rdkit.py +0 -0
  99. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/siesta.py +0 -0
  100. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/vasp.py +0 -0
  101. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/plugins/xyz.py +0 -0
  102. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/psi4/__init__.py +0 -0
  103. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/psi4/input.py +0 -0
  104. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/psi4/output.py +0 -0
  105. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/pwmat/__init__.py +0 -0
  106. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/pwmat/atomconfig.py +0 -0
  107. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/pwmat/movement.py +0 -0
  108. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/py.typed +0 -0
  109. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/pymatgen/__init__.py +0 -0
  110. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/pymatgen/molecule.py +0 -0
  111. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/pymatgen/structure.py +0 -0
  112. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/qe/__init__.py +0 -0
  113. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/qe/traj.py +0 -0
  114. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/rdkit/__init__.py +0 -0
  115. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/rdkit/sanitize.py +0 -0
  116. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/rdkit/utils.py +0 -0
  117. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/siesta/__init__.py +0 -0
  118. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/siesta/aiMD_output.py +0 -0
  119. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/siesta/output.py +0 -0
  120. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/stat.py +0 -0
  121. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/unit.py +0 -0
  122. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/utils.py +0 -0
  123. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/vasp/__init__.py +0 -0
  124. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/vasp/outcar.py +0 -0
  125. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/vasp/poscar.py +0 -0
  126. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/vasp/xml.py +0 -0
  127. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/xyz/__init__.py +0 -0
  128. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/xyz/quip_gap_xyz.py +0 -0
  129. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata/xyz/xyz.py +0 -0
  130. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata.egg-info/SOURCES.txt +0 -0
  131. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata.egg-info/dependency_links.txt +0 -0
  132. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata.egg-info/entry_points.txt +0 -0
  133. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata.egg-info/requires.txt +0 -0
  134. {dpdata-0.2.20 → dpdata-0.2.21}/dpdata.egg-info/top_level.txt +0 -0
  135. {dpdata-0.2.20 → dpdata-0.2.21}/pyproject.toml +0 -0
  136. {dpdata-0.2.20 → dpdata-0.2.21}/setup.cfg +0 -0
@@ -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.6.3
24
+ rev: v0.6.5
25
25
  hooks:
26
26
  - id: ruff
27
27
  args: ["--fix"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dpdata
3
- Version: 0.2.20
3
+ Version: 0.2.21
4
4
  Summary: Manipulating data formats of DeePMD-kit, VASP, QE, PWmat, and LAMMPS, etc.
5
5
  Author: DeepModeling
6
6
  Author-email: Han Wang <wang_han@iapcm.ac.cn>
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.2.20'
16
- __version_tuple__ = version_tuple = (0, 2, 20)
15
+ __version__ = version = '0.2.21'
16
+ __version_tuple__ = version_tuple = (0, 2, 21)
@@ -12,6 +12,7 @@ from .scf import (
12
12
  get_cell,
13
13
  get_coords,
14
14
  get_geometry_in,
15
+ get_mag_force,
15
16
  kbar2evperang3,
16
17
  )
17
18
 
@@ -199,6 +200,9 @@ def get_frame(fname):
199
200
  stress[iframe] *= np.linalg.det(cells[iframe, :, :].reshape([3, 3]))
200
201
  if np.sum(np.abs(stress[0])) < 1e-10:
201
202
  stress = None
203
+
204
+ magmom, magforce = get_mag_force(outlines)
205
+
202
206
  data = {}
203
207
  data["atom_names"] = atom_names
204
208
  data["atom_numbs"] = natoms
@@ -213,5 +217,9 @@ def get_frame(fname):
213
217
  if not isinstance(data["virials"], np.ndarray):
214
218
  del data["virials"]
215
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
216
224
 
217
225
  return data
@@ -13,6 +13,7 @@ from .scf import (
13
13
  get_cell,
14
14
  get_coords,
15
15
  get_geometry_in,
16
+ get_mag_force,
16
17
  kbar2evperang3,
17
18
  )
18
19
 
@@ -198,6 +199,8 @@ def get_frame(fname):
198
199
  lines, atomnumber
199
200
  )
200
201
 
202
+ magmom, magforce = get_mag_force(lines)
203
+
201
204
  data = {}
202
205
  data["atom_names"] = atom_names
203
206
  data["atom_numbs"] = natoms
@@ -211,4 +214,9 @@ def get_frame(fname):
211
214
  data["stress"] = stress
212
215
  data["orig"] = np.zeros(3)
213
216
 
217
+ if len(magmom) > 0:
218
+ data["spins"] = magmom
219
+ if len(magforce) > 0:
220
+ data["mag_forces"] = magforce
221
+
214
222
  return data