graspkit-atomic 3.4.4__tar.gz → 3.4.5__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 (50) hide show
  1. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/INSTALL.md +4 -4
  2. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/PKG-INFO +3 -3
  3. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/README.md +2 -2
  4. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/README_zh.md +2 -2
  5. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/docs/releasing.md +15 -6
  6. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/loaders/mix_coef_loader.py +6 -2
  7. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/mix_coef_writer.py +2 -1
  8. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/utils/data_modules.py +1 -0
  9. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/version.py +1 -1
  10. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/.gitignore +0 -0
  11. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/LICENSE +0 -0
  12. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/build_package.py +0 -0
  13. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/pyproject.toml +0 -0
  14. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/scripts/check_release.py +0 -0
  15. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/CSFs_processor/__init__.py +0 -0
  16. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/CSFs_processor/coupling.py +0 -0
  17. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/CSFs_processor/extraction.py +0 -0
  18. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/CSFs_processor/mr_selection.py +0 -0
  19. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/CSFs_processor/selection.py +0 -0
  20. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/CSFs_processor/validation.py +0 -0
  21. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/__init__.py +0 -0
  22. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/__init__.py +0 -0
  23. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/file_locator.py +0 -0
  24. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/loaders/__init__.py +0 -0
  25. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/loaders/base_loader.py +0 -0
  26. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/loaders/binary_file_loader.py +0 -0
  27. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/loaders/energy_file_loader.py +0 -0
  28. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/loaders/gj_factor_loader.py +0 -0
  29. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/loaders/hyperfine_structure_loader.py +0 -0
  30. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/loaders/lsj_comp_loader.py +0 -0
  31. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/loaders/radial_analysis_loader.py +0 -0
  32. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/loaders/radial_wavefunction_loader.py +0 -0
  33. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/loaders/transition_loader.py +0 -0
  34. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/data_IO/produced_data_writor.py +0 -0
  35. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/grasp_data_extractor/__init__.py +0 -0
  36. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/grasp_data_extractor/asfs_data_processor.py +0 -0
  37. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/grasp_data_extractor/radial_analysis.py +0 -0
  38. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/grasp_data_extractor/radial_wavefunction_processor.py +0 -0
  39. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/grasp_data_extractor/rmix_data_processor.py +0 -0
  40. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/grasp_data_extractor/transition_data_processor.py +0 -0
  41. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/py.typed +0 -0
  42. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/utils/__init__.py +0 -0
  43. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/utils/environment_config.py +0 -0
  44. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/utils/quadrupole_deformation.py +0 -0
  45. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit/utils/tool_function.py +0 -0
  46. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit_plot/__init__.py +0 -0
  47. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit_plot/fig_settings.py +0 -0
  48. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit_plot/mid_coupling.py +0 -0
  49. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit_plot/plot_functions.py +0 -0
  50. {graspkit_atomic-3.4.4 → graspkit_atomic-3.4.5}/src/graspkit_plot/radial_analysis.py +0 -0
@@ -15,12 +15,12 @@ python -m pip install graspkit-atomic
15
15
  For a fixed release:
16
16
 
17
17
  ```bash
18
- python -m pip install "graspkit-atomic==3.4.4"
18
+ python -m pip install "graspkit-atomic==3.4.5"
19
19
  ```
20
20
 
21
21
  ## Declare a project dependency
22
22
 
23
- Add `"graspkit-atomic==3.4.4"` to the existing `[project].dependencies` list in
23
+ Add `"graspkit-atomic==3.4.5"` to the existing `[project].dependencies` list in
24
24
  your own `pyproject.toml`. A minimal example:
25
25
 
26
26
  ```toml
@@ -28,7 +28,7 @@ your own `pyproject.toml`. A minimal example:
28
28
  name = "atomic-analysis"
29
29
  version = "0.1.0"
30
30
  requires-python = ">=3.14"
31
- dependencies = ["graspkit-atomic==3.4.4"]
31
+ dependencies = ["graspkit-atomic==3.4.5"]
32
32
  ```
33
33
 
34
34
  For a uv-managed project, run `uv sync` after editing `pyproject.toml`, then
@@ -47,7 +47,7 @@ requires the corresponding GRASP data files.
47
47
  To install a downloaded wheel, use its exact filename:
48
48
 
49
49
  ```bash
50
- python -m pip install /path/to/graspkit_atomic-3.4.4-py3-none-any.whl
50
+ python -m pip install /path/to/graspkit_atomic-3.4.5-py3-none-any.whl
51
51
  ```
52
52
 
53
53
  A standalone source checkout also supports `python -m pip install .`.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: graspkit-atomic
3
- Version: 3.4.4
3
+ Version: 3.4.5
4
4
  Summary: Stable data I/O, processing, and plotting for GRASP calculations
5
5
  Project-URL: Homepage, https://github.com/YenochQin/graspkit
6
6
  Project-URL: Source, https://github.com/YenochQin/graspkit
@@ -85,7 +85,7 @@ For an existing uv project using Python 3.14 or newer, run `uv add graspkit-atom
85
85
  in its directory. This records the dependency in `pyproject.toml`, updates
86
86
  `uv.lock`, and installs it in the project's `.venv`. Use `uv run python analysis.py`
87
87
  to run your own analysis script; manual environment activation is not required.
88
- To pin a particular release, use `uv add "graspkit-atomic==3.4.4"`.
88
+ To pin a particular release, use `uv add "graspkit-atomic==3.4.5"`.
89
89
 
90
90
  You can also add the dependency to an existing `pyproject.toml` manually:
91
91
 
@@ -95,7 +95,7 @@ name = "atomic-analysis"
95
95
  version = "0.1.0"
96
96
  requires-python = ">=3.14"
97
97
  dependencies = [
98
- "graspkit-atomic==3.4.4",
98
+ "graspkit-atomic==3.4.5",
99
99
  ]
100
100
  ```
101
101
 
@@ -38,7 +38,7 @@ For an existing uv project using Python 3.14 or newer, run `uv add graspkit-atom
38
38
  in its directory. This records the dependency in `pyproject.toml`, updates
39
39
  `uv.lock`, and installs it in the project's `.venv`. Use `uv run python analysis.py`
40
40
  to run your own analysis script; manual environment activation is not required.
41
- To pin a particular release, use `uv add "graspkit-atomic==3.4.4"`.
41
+ To pin a particular release, use `uv add "graspkit-atomic==3.4.5"`.
42
42
 
43
43
  You can also add the dependency to an existing `pyproject.toml` manually:
44
44
 
@@ -48,7 +48,7 @@ name = "atomic-analysis"
48
48
  version = "0.1.0"
49
49
  requires-python = ">=3.14"
50
50
  dependencies = [
51
- "graspkit-atomic==3.4.4",
51
+ "graspkit-atomic==3.4.5",
52
52
  ]
53
53
  ```
54
54
 
@@ -31,7 +31,7 @@ uv run python -c "import graspkit; print(graspkit.__version__)"
31
31
  已有 uv 项目使用 Python 3.14 或更新版本时,直接在其目录运行 `uv add graspkit-atomic`。
32
32
  该命令会将依赖写入 `pyproject.toml`,更新 `uv.lock`,并安装到项目的 `.venv` 中。
33
33
  运行自己的分析脚本时使用 `uv run python analysis.py`,无需手动激活环境。
34
- 需要固定版本时,使用 `uv add "graspkit-atomic==3.4.4"`。
34
+ 需要固定版本时,使用 `uv add "graspkit-atomic==3.4.5"`。
35
35
 
36
36
  也可以手动将依赖加入已有的 `pyproject.toml`:
37
37
 
@@ -41,7 +41,7 @@ name = "atomic-analysis"
41
41
  version = "0.1.0"
42
42
  requires-python = ">=3.14"
43
43
  dependencies = [
44
- "graspkit-atomic==3.4.4",
44
+ "graspkit-atomic==3.4.5",
45
45
  ]
46
46
  ```
47
47
 
@@ -1,10 +1,19 @@
1
1
  # Preparing a graspkit-atomic release
2
2
 
3
- The prepared stable version is **3.4.4**. Its single source is
3
+ The prepared stable version is **3.4.5**. Its single source is
4
4
  `src/graspkit/version.py`; Hatchling reads it through `dynamic = ["version"]`.
5
5
  The local build commands below do not upload files or create Git tags.
6
6
  The separate manual publishing workflow is described near the end of this guide.
7
7
 
8
+ ## Changes in 3.4.5
9
+
10
+ - Read native GRASP odd-parity mixing blocks encoded with ISPAR = -1, fixing
11
+ `Invalid mix coefficient block 1 header` during MR selection.
12
+ - Keep the Python parity convention (1=even, 2=odd) and accept mixing files
13
+ written with the older Python odd-parity encoding of 2.
14
+ - Write split mixing files with GRASP's native signed parity (+1/-1); cover
15
+ populated and zero-ASF blocks with binary read/write regression tests.
16
+
8
17
  ## Changes in 3.4.4
9
18
 
10
19
  - Add exact jj-CSF MR selection with original level-ID mapping, strict amplitude
@@ -32,8 +41,8 @@ The obsolete `--dev` option is removed; edit the version source deliberately.
32
41
  `--clean` removes only matching graspkit-atomic archives from the selected output
33
42
  folder. Unknown files cause an error instead of being deleted.
34
43
 
35
- Output: `dist/graspkit_atomic-3.4.4.tar.gz` and
36
- `dist/graspkit_atomic-3.4.4-py3-none-any.whl`. An optional `--outdir PATH` selects an
44
+ Output: `dist/graspkit_atomic-3.4.5.tar.gz` and
45
+ `dist/graspkit_atomic-3.4.5-py3-none-any.whl`. An optional `--outdir PATH` selects an
37
46
  empty output folder. The shell/batch wrappers select the shared Tools Python.
38
47
 
39
48
  Equivalent individual checks:
@@ -88,7 +97,7 @@ with a branch selector. Review all three platform jobs before using the artifact
88
97
  ## Before a later publication
89
98
 
90
99
  1. Review the exact source commit and release changes; rerun the workflow on it.
91
- 2. Confirm PyPI ownership/availability of `graspkit-atomic`, and that version 3.4.4
100
+ 2. Confirm PyPI ownership/availability of `graspkit-atomic`, and that version 3.4.5
92
101
  has not already been published. A missing public project page alone does
93
102
  not prove that a name is available.
94
103
  3. Inspect the actual archives and hashes. Publishing makes their contents
@@ -112,7 +121,7 @@ completing a build does not start a publication. Its inputs are:
112
121
 
113
122
  | Input | Default | Purpose |
114
123
  | --- | --- | --- |
115
- | `version` | Required | Exact source version, currently `3.4.4`. |
124
+ | `version` | Required | Exact source version, currently `3.4.5`. |
116
125
  | `publish_pypi` | Off | Upload the validated packages to PyPI. |
117
126
  | `github_release` | Off | Create a GitHub Release using the same packages. |
118
127
  | `draft` | On | Keep the GitHub Release as a draft; turn off only for formal publication. |
@@ -128,7 +137,7 @@ source version, and select the destinations you intend to use:
128
137
  | On | On | Build and validate once, then upload the same files to both destinations. |
129
138
 
130
139
  A prior dry run is optional. No separate workflow, run ID or tag input is
131
- needed. The GitHub tag is derived as `v{version}`, for example `v3.4.4`.
140
+ needed. The GitHub tag is derived as `v{version}`, for example `v3.4.5`.
132
141
  The `draft` option has no effect when `github_release` is off.
133
142
 
134
143
  ### One build, two independent destinations
@@ -116,9 +116,13 @@ class MixCoefLoader(BinaryFileLoader):
116
116
  if jblock != nb:
117
117
  raise ValueError(f"jblock ({jblock}) != nb ({nb})")
118
118
 
119
- if ncfblk < 1 or nevblk < 0 or iatjp < 1 or iaspa not in (1, 2):
119
+ if ncfblk < 1 or nevblk < 0 or iatjp < 1 or iaspa not in (-1, 1, 2):
120
120
  raise ValueError(f"Invalid mix coefficient block {nb} header")
121
121
 
122
+ # GRASP stores signed ISPAR (+1/-1). Keep the public Python
123
+ # convention (1=even, 2=odd), also accepting older Python files.
124
+ parity = 2 if iaspa == -1 else iaspa
125
+
122
126
  # GRASP omits all three data records when nevblk == 0.
123
127
  if nevblk:
124
128
  ivec: NDArray[np.int32] = self.read_fortran_record(
@@ -160,7 +164,7 @@ class MixCoefLoader(BinaryFileLoader):
160
164
  if (iatjp - 1) % 2 == 0
161
165
  else f"{iatjp - 1}/2"
162
166
  ),
163
- parity=iaspa,
167
+ parity=parity,
164
168
  level_ids=ivec_array.astype(np.int64, copy=False),
165
169
  base_energy=eav,
166
170
  level_energies=evals,
@@ -31,6 +31,7 @@ def write_mix_coefficient_block(
31
31
  As in rasfsplit, a block with no levels has no following data records.
32
32
  Uses native byte order, int32 record markers/integers, and float64 data,
33
33
  matching :class:`MixCoefLoader`. An existing output is overwritten.
34
+ Python parity (1=even, 2=odd) is written as GRASP ISPAR (+1/-1).
34
35
  """
35
36
  coefficient_count = block.csf_count * block.level_count
36
37
  counts = (
@@ -75,7 +76,7 @@ def write_mix_coefficient_block(
75
76
  block.csf_count,
76
77
  block.level_count,
77
78
  block.j_value_location,
78
- block.parity,
79
+ 1 if block.parity == 1 else -1,
79
80
  ],
80
81
  dtype=np.int32,
81
82
  ),
@@ -12,6 +12,7 @@ class MixCoefficientBlock:
12
12
  ``level_ids`` contains GRASP identifiers from ``ivec``. It is metadata,
13
13
  not a matrix index. Rows of ``level_energies`` and ``mix_coefficients``
14
14
  are addressed only by zero-based ``asf_row_indices``.
15
+ ``parity`` uses 1 for even and 2 for odd; binary I/O converts GRASP's +/-1.
15
16
  """
16
17
 
17
18
  block_index: int
@@ -1,3 +1,3 @@
1
1
  """Package version, also read by Hatchling when building distributions."""
2
2
 
3
- __version__ = "3.4.4"
3
+ __version__ = "3.4.5"
File without changes