Skip to content

Commit 14ccf6d

Browse files
authored
Merge branch 'develop' into LC_Exx-new
2 parents 3bba7de + a05c14a commit 14ccf6d

File tree

20 files changed

+720
-530
lines changed

20 files changed

+720
-530
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Version Check
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
validate_version:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
fetch-depth: 0 # Fetch complete git history for version comparison
13+
14+
# Extract last two tags for version comparison
15+
- name: Get version history
16+
id: versions
17+
run: |
18+
# Get previous tag (skip current tag)
19+
PREV_TAG=$(git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1))
20+
# Current tag being published (extracted from GITHUB_REF)
21+
CURRENT_TAG=${GITHUB_REF#refs/tags/}
22+
echo "prev_tag=${PREV_TAG}" >> $GITHUB_OUTPUT
23+
echo "current_tag=${CURRENT_TAG}" >> $GITHUB_OUTPUT
24+
25+
# Validate version.h matches the release tag
26+
- name: Assert version increment
27+
run: |
28+
CODE_VERSION=$(grep -oP '#define\s+VERSION\s+"\K\d+(\.\d+){2,3}' source/version.h)
29+
30+
if [[ -z "$CODE_VERSION" ]]; then
31+
echo "::error::Failed to extract version from source/version.h"
32+
exit 1
33+
fi
34+
35+
# Verify that the version in version.h matches the tag
36+
if [[ "${{ steps.versions.outputs.current_tag }}" != "v${CODE_VERSION}" ]]; then
37+
echo "::error::Version mismatch: tag=${{ steps.versions.outputs.current_tag }} ≠ code=${CODE_VERSION}"
38+
exit 1
39+
fi
40+
41+
# Ensure the version has been incremented
42+
if [[ "${{ steps.versions.outputs.prev_tag}}" == "${{ steps.versions.outputs.current_tag }}" ]]; then
43+
echo "::error::Version unchanged: ${{ steps.versions.outputs.current_tag }}"
44+
exit 1
45+
fi

docs/advanced/input_files/input-main.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@
156156
- [out\_mat\_xc2](#out_mat_xc2)
157157
- [out\_mat\_l](#out_mat_l)
158158
- [out\_eband\_terms](#out_eband_terms)
159-
- [out\_hr\_npz/out\_dm\_npz](#out_hr_npzout_dm_npz)
160159
- [dm\_to\_rho](#dm_to_rho)
161160
- [out\_mul](#out_mul)
162161
- [out\_app\_flag](#out_app_flag)
@@ -1881,13 +1880,6 @@ These variables are used to control the output of properties.
18811880
- **Description**: Whether to print the band energy terms separately in the file `OUT.${suffix}/${term}_out.dat`. The terms include the kinetic, pseudopotential (local + nonlocal), Hartree and exchange-correlation (including exact exchange if calculated).
18821881
- **Default**: False
18831882

1884-
### out_hr_npz/out_dm_npz (Under Development Feature)
1885-
1886-
- **Type**: Boolean
1887-
- **Availability**: Numerical atomic orbital basis
1888-
- **Description**: Whether to print Hamiltonian matrices $H(R)$/density matrics $DM(R)$ in npz format. This feature does not work for gamma-only calculations.
1889-
- **Default**: False
1890-
18911883
### dm_to_rho (Under Development Feature)
18921884

18931885
- **Type**: Boolean
@@ -1919,7 +1911,7 @@ These variables are used to control the output of properties.
19191911
### out_interval
19201912

19211913
- **Type**: Integer
1922-
- **Description**: Control the interval for printing charge density, local potential, electrostatic potential, Mulliken population analysis, $r(R)$, $H(R)$, $S(R)$, $T(R)$, $dH(R)$, $H(k)$, $S(k)$ and $\psi(k)$ matrices during molecular dynamics calculations. Check input parameters [out_chg](#out_chg), [out_pot](#out_pot), [out_mul](#out_mul), [out_mat_r](#out_mat_r), [out_mat_hs2](#out_mat_hs2), [out_mat_t](#out_mat_t), [out_mat_dh](#out_mat_dh), [out_mat_hs](#out_mat_hs) and [out_wfc_lcao](#out_wfc_lcao) for more information, respectively.
1914+
- **Description**: After self-consistent-field calculations, control the interval of ionic movements for printing properties. These properties cover charge density, local potential, electrostatic potential, Hamiltonian matrix, overlap matrix, density matrix, Mulliken population analysis and so on.
19231915
- **Default**: 1
19241916

19251917
### out_element_info

source/Makefile.Objects

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,7 @@ OBJS_IO=input_conv.o\
538538
write_wfc_r.o\
539539
output_log.o\
540540
output_mat_sparse.o\
541+
ctrl_output_lcao.o\
541542
para_json.o\
542543
abacusjson.o\
543544
general_info.o\

source/module_elecstate/elecstate.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#ifndef ELECSTATE_H
22
#define ELECSTATE_H
3+
34
#include "fp_energy.h"
45
#include "module_cell/klist.h"
56
#include "module_elecstate/module_charge/charge.h"
@@ -169,8 +170,6 @@ class ElecState
169170

170171
bool skip_weights = false;
171172
};
172-
173-
174173

175174
} // namespace elecstate
176175
#endif

source/module_elecstate/elecstate_lcao.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_ELECSTATE_ELECSTATE_LCAO_H
2-
#define W_ABACUS_DEVELOP_ABACUS_DEVELOP_SOURCE_MODULE_ELECSTATE_ELECSTATE_LCAO_H
1+
#ifndef ELECSTATE_LCAO_H
2+
#define ELECSTATE_LCAO_H
33

44
#include "elecstate.h"
55
#include "module_elecstate/module_dm/density_matrix.h"

0 commit comments

Comments
 (0)