Skip to content

Stable branch : update to version 3.10.0 #6077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 41 commits into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9b23e4e
Fix: stress error with Dojo pseudopotential and LIBXC
dyzheng Mar 3, 2025
ffd91ff
Fix: nspin2/4 mismatch with nspin1 with PBE
dyzheng Mar 4, 2025
70b3a45
Fix: add test case to CI
dyzheng Mar 4, 2025
6e40c7c
Fix: delete useless warning of write_dmr
dyzheng Mar 13, 2025
9c5446b
Fix: DFTU output format
dyzheng Mar 17, 2025
cac8b15
Fix: error of noncolin and autoset mag
dyzheng Mar 19, 2025
e1e13fb
Fix: reference of noncolin
dyzheng Mar 19, 2025
0862694
Revert "Fix: nspin2/4 mismatch with nspin1 with PBE"
dyzheng Mar 28, 2025
816fe47
Perf: optimize the stream strategy in module_gint (#5845)
dzzz2001 Jan 10, 2025
ae6d7a4
Fix: modify orb info manually (#5853)
YuLiu98 Jan 13, 2025
05f7f43
Fix: parse_expression for scientific notation (#5882)
1041176461 Jan 30, 2025
86ac73e
modify openmp strategy (#5898)
dzzz2001 Feb 13, 2025
971ef1e
Fix document description for ocp and ocp_set (#5896)
AsTonyshment Feb 13, 2025
033bfcf
Fix: Resolve compilation issue with Libxc 7.0.0 in ABACUS (#5905)
AsTonyshment Feb 18, 2025
360d81f
Fix a bug and a magic number in module_exx_symmetry (#5848)
Qianruipku Feb 19, 2025
9b045c0
Docs: update docs about init_wfc (#5912)
YuLiu98 Feb 22, 2025
55e47bf
Fix the wrong symmetry analysis at nspin=2 (#5926)
maki49 Feb 24, 2025
2c0bc90
fix a bug about hcontainer in exx nscf (#5927)
maki49 Feb 25, 2025
821e110
fix cmake bug (#5929)
dzzz2001 Feb 25, 2025
8b956da
inline function of complexarray (#5964)
dzzz2001 Mar 7, 2025
fc37093
modify doc (#5965)
dzzz2001 Mar 7, 2025
b52c0dd
Fix segmentation fault in integrate test 312_NO_GO_wfc_get_wf (#5970)
AsTonyshment Mar 7, 2025
35fd8e9
Doc: polish Quick Start part of online doc (#6006)
WHUweiqingzhou Mar 14, 2025
11ddcb6
test: fix Dockerfile.intel (#5999)
pxlxingliang Mar 17, 2025
b7272bb
fix the format (#6008)
WHUweiqingzhou Mar 17, 2025
ede14b5
Fix : out_mat_dh will lead to different result with MPI-1core with MP…
xuan112358 Mar 18, 2025
2623f40
Fix: Enhance the warning message when the XC name cannot be recognize…
sunliang98 Mar 19, 2025
d3a5dac
Update latest Intel oneAPI default compiler for cxx (#6035)
Cstandardlib Mar 22, 2025
3ef9ada
Fix: Angular momentum quantum number check in reading SOC pseudopot f…
AsTonyshment Mar 22, 2025
fba7819
Feature: support the `default` as the value of `dft_functional` when …
kirk0830 Mar 5, 2025
c1d71c9
Optimize: Compilation time of vdwd3_autoset_xcparam.cpp (#6042)
Qianruipku Mar 23, 2025
4e08a1c
directly enter exx loop when init_wfc=file (#6019)
maki49 Mar 25, 2025
42dfc67
Perf: openmp for cal_force_stress (#5956)
dzzz2001 Mar 5, 2025
9f0d72d
Fix: DFT+U force&stress with of some elements are -1 (#6049)
dyzheng Mar 25, 2025
30ceb6d
Fix: add the print header for `cusolvermp` in scf info (#6038)
kirk0830 Mar 25, 2025
e036b2e
fix an output for debug (#6066)
maki49 Mar 27, 2025
df8aee8
Perf: optimize cal_DMR and folding_HR (#6068)
dzzz2001 Mar 28, 2025
fa29535
add a check before calculating EXX force (#6067)
maki49 Mar 28, 2025
521457e
fixing issue #5961 (#6071)
BariumOxide13716 Mar 28, 2025
734981a
modify warning output (#6074)
dzzz2001 Mar 28, 2025
6f7562e
Version: 3.10.0
dyzheng Mar 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile.intel
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ RUN source /opt/intel/oneapi/setvars.sh && \
ln -s /usr/local/include/elpa_openmp-$ELPA_VER/elpa /usr/local/include/ && \
cd /tmp && rm -rf elpa-$ELPA_VER

RUN cd /tmp && git clone https://github.com/Tencent/rapidjson.git && cp -r rapidjson/include/rapidjson /usr/include/ \
&& rm -rf rapidjson

RUN wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcpu.zip \
--no-check-certificate --quiet -O libtorch.zip && \
unzip -q libtorch.zip -d /opt && rm libtorch.zip
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# About ABACUS

ABACUS (Atomic-orbital Based Ab-initio Computation at UStc) is an open-source package based on density functional theory (DFT). The package utilizes both plane wave and numerical atomic basis sets with the usage of norm-conserving pseudopotentials to describe the interactions between nuclear ions and valence electrons. ABACUS supports LDA, GGA, meta-GGA, and hybrid functionals. Apart from single-point calculations, the package allows geometry optimizations and ab-initio molecular dynamics with various ensembles. The package also provides a variety of advanced functionalities for simulating materials, including the DFT+U, VdW corrections, and implicit solvation model, etc. In addition, ABACUS strives to provide a general infrastructure to facilitate the developments and applications of novel machine-learning-assisted DFT methods (DeePKS, DP-GEN, DeepH, DeePTB etc.) in molecular and material simulations.
ABACUS (**A**tomic-orbital **B**ased **A**b-initio **C**omputation at **US**tc) is an open-source package based on density functional theory (DFT). The package utilizes both plane wave and numerical atomic basis sets with the usage of pseudopotentials to describe the interactions between nuclear ions and valence electrons. ABACUS supports LDA, GGA, meta-GGA, and hybrid functionals. Apart from single-point calculations, the package allows geometry optimizations and ab-initio molecular dynamics with various ensembles. The package also provides a variety of advanced functionalities for simulating materials, including the DFT+U, VdW corrections, and implicit solvation model, etc. In addition, ABACUS strives to provide a general infrastructure to facilitate the developments and applications of novel machine-learning-assisted DFT methods (DeePKS, DP-GEN, DeepH, DeePTB etc.) in molecular and material simulations.

# Online Documentation
For detailed documentation, please refer to [our documentation website](https://abacus.deepmodeling.com/).
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindMKL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ endif()
endif() # MKL::MKL

# For compatibility with legacy libpaw_interface CMakeLists.txt
if(TARGET MKL::MKL)
if(TARGET MKL::MKL AND NOT TARGET IntelMKL::MKL)
add_library(IntelMKL::MKL ALIAS MKL::MKL)
endif()

Expand Down
8 changes: 8 additions & 0 deletions docs/CITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ The following references are required to be cited when using ABACUS. Specificall

- **For general purpose:**

*For LCAO basis:*

Mohan Chen, G. C. Guo, and Lixin He. "Systematically improvable optimized atomic basis sets for ab initio calculations." Journal of Physics: Condensed Matter 22.44 (2010): 445501.

Pengfei Li, et al. "Large-scale ab initio simulations based on systematically improvable atomic basis." Computational Materials Science 112 (2016): 503-517.

Peize Lin, Xinguo Ren, Xiaohui Liu, Lixin He. Ab initio electronic structure calculations based on numerical atomic orbitals: Basic fomalisms and recent progresses. Wiley Interdisciplinary Reviews: Computational Molecular Science, 2024, 14(1): e1687.

*For LCAO and PW basis:*

Weiqing Zhou, Deye Zheng, Qianrui Liu, et al. ABACUS: An Electronic Structure Analysis Package for the AI Era. arXiv preprint arXiv:2501.08697, 2025.

- **If Stochastic DFT is used:**

Qianrui Liu, and Mohan Chen. "Plane-Wave-Based Stochastic-Deterministic Density Functional Theory for Extended Systems." <https://arxiv.org/abs/2204.05662>.
Expand Down
4 changes: 2 additions & 2 deletions docs/DevelopingTeam.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ The current development team consists the following research groups/affiliations
- University of Science and Technology of China (Dr. Lixin He)
- Peking University (Dr. Mohan Chen)
- Institute of Physics, Chinese Academy of Sciences (Dr. Xinguo Ren)
- Beijing AI for Science Institute
- Institute of Artificial Intelligence, Hefei Comprehensive National Science Center.
- Beijing AI for Science Institute (Dr. Daye Zheng)
- Institute of Artificial Intelligence, Hefei Comprehensive National Science Center (Dr. Lixin He).
23 changes: 15 additions & 8 deletions docs/advanced/input_files/input-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ These variables are used to control general system parameters.
### init_wfc

- **Type**: String
- **Description**: Only useful for plane wave basis only now. It is the name of the starting wave functions. In the future. we should also make this variable available for localized orbitals set.
- **Description**: The type of the starting wave functions.

Available options are:

Expand All @@ -576,6 +576,8 @@ These variables are used to control general system parameters.
with `psi_initializer 1`, two more options are supported:
- nao: from numerical atomic orbitals. If they are not enough, other wave functions are initialized with random numbers.
- nao+random: add small random numbers on numerical atomic orbitals

> Only the `file` option is useful for the lcao basis set, which is mostly used when [calculation](#calculation) is set to `set_wf` and `get_pchg`. See more details in [out_wfc_lcao](#out_wfc_lcao).
- **Default**: atomic

### init_chg
Expand Down Expand Up @@ -3518,19 +3520,24 @@ These variables are used to control berry phase and wannier90 interface paramete

- **Type**: Boolean
- **Availability**:
- For PW and LCAO codes. if set to 1, occupations of bands will be setting of "ocp_set".
- For TDDFT in LCAO codes. if set to 1, occupations will be constrained since second ionic step.
- For OFDFT, this feature can't be used.
- For PW and LCAO codes: If set to 1, the band occupations will be determined by `ocp_set`.
- For RT-TDDFT in LCAO codes: If set to 1, same as above, but the occupations will be constrained starting from the second ionic step.
- For OFDFT: This feature is not available.
- **Description**:
- True: fix the occupations of bands.
- False: do not fix the occupations of bands.
- True: Fixes the band occupations based on the values specified in `ocp_set`.
- False: Does not fix the band occupations.
- **Default**: False

### ocp_set

- **Type**: String
- **Description**: If ocp is True, the ocp_set is a string to set the number of occupancy, like '1 10 * 1 0 1' representing the 13 band occupancy, 12th band occupancy 0 and the rest 1, the code is parsing this string into an array through a regular expression.
- **Default**: none
- **Description**:
- If `ocp` is set to 1, `ocp_set` must be provided as a string specifying the occupation numbers for each band across all k-points. The format follows a space-separated pattern, where occupations are assigned sequentially to bands for each k-point. A shorthand notation `N*x` can be used to repeat a value `x` for `N` bands.
- Example:
- `1 10*1 0 1` represents occupations for 13 bands, where the 12th band is fully unoccupied (`0`), and all others are occupied (`1`).
- For a system with multiple k-points, the occupations must be specified for all k-points, following their order in the output file kpoints (may lead to fractional occupations).
- Incorrect specification of `ocp_set` could lead to inconsistencies in electron counting, causing the calculation to terminate with an error.
- **Default**: None

[back to top](#full-list-of-input-keywords)

Expand Down
2 changes: 1 addition & 1 deletion docs/community/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ write(cs_stru, cs_atoms, format='abacus', pp=pp, basis=basis)

ABACUS applies the density difference between two SCF steps (labeled as `DRHO` in the screen output) as the convergence criterion, which is considered as a more robust choice compared with the energy difference. `DRHO` is calculated via `DRHO = |rho(G)-rho_previous(G)|^2`. Note that the energy difference between two SCF steps (labed as `EDIFF`) is also printed out in the screen output.

**4. Why EDIFF is much slower than DRHO?
**4. Why EDIFF is much slower than DRHO?**

For metaGGA calculations, it is normal because in addition to charge density, kinetic density also needs to be considered in metaGGA calculations. In this case, you can try set `mixing_tau = true`. If you find EDIFF is much slower than DRHO for non-metaGGA calculations, please start a new issue to us.

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ABACUS Documentation
ABACUS (Atomic-orbital Based Ab-initio Computation at UStc) is
an open-source computer code package based on density functional
theory (DFT). The package utilizes both plane wave and numerical
atomic basis sets with the usage of norm-conserving pseudopotentials
atomic basis sets with the usage of pseudopotentials
to describe the interactions between nuclear ions and valence electrons.
ABACUS supports LDA, GGA, meta-GGA, and hybrid functionals. Apart from
single-point calculations, the package allows geometry optimizations
Expand Down
10 changes: 6 additions & 4 deletions docs/quick_start/easy_install.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Easy Installation

This guide helps you install ABACUS with basic features. **For DeePKS, DeePMD and Libxc support, or building with `make`, please refer to [the advanced installation guide](../advanced/install.md)** after going through this page. We recommend building ABACUS with `cmake` to avoid dependency issues. We recommend compiling ABACUS(and possibly its requirements) from the source code using the latest compiler for the best performace. You can try [toolchain](#install-requirements-by-toolchain) to install ABACUS and dependencies in a source-code compilation way with convience. You can also deploy ABACUS **without building** by [Docker](#container-deployment) or [conda](#install-by-conda). Please note that ABACUS only supports Linux; for Windows users, please consider using [WSL](https://learn.microsoft.com/en-us/windows/wsl/) or docker.
This guide helps you install ABACUS with basic features. **For DeePKS, DeePMD and Libxc support, or building with `make`, please refer to [the advanced installation guide](../advanced/install.md)** after going through this page. We recommend building ABACUS with `cmake` to avoid dependency issues. We recommend compiling ABACUS (and possibly its requirements) from the source code using the latest compiler for the best performace. You can try [toolchain](#install-requirements-by-toolchain) to install ABACUS and dependencies in a source-code compilation way with convience. You can also deploy ABACUS **without building** by [Docker](#container-deployment) or [conda](#install-by-conda). Please note that ABACUS only supports Linux; for Windows users, please consider using [WSL](https://learn.microsoft.com/en-us/windows/wsl/) or docker.

## Get ABACUS source code

Expand Down Expand Up @@ -79,7 +79,7 @@ git remote -v

# Replace "origin" with "upstream" or the remote name corresponding to deepmodeling/abacus-develop if necessary
git fetch origin
git checkout v3.8.4 # Replace the tag with the latest version
git checkout v3.x.x # Replace the tag with the latest version, like v3.10.0
git describe --tags # Verify if the tag has been successfully checked out
```

Expand All @@ -106,7 +106,7 @@ Here, 'build' is the path for building ABACUS; and '-D' is used for setting up s
- `CMAKE_INSTALL_PREFIX`: the path of ABACUS binary to install; `/usr/local/bin/abacus` by default
- Compilers
- `CMAKE_CXX_COMPILER`: C++ compiler; usually `g++`(GNU C++ compiler) or `icpx`(Intel C++ compiler). Can also set from environment variable `CXX`. It is OK to use MPI compiler here.
- `MPI_CXX_COMPILER`: MPI wrapper for C++ compiler; usually `mpicxx` or `mpiicpc`(for Intel MPI).
- `MPI_CXX_COMPILER`: MPI wrapper for C++ compiler; usually `mpicxx` or `mpiicpx`(for Intel toolkits) or `mpiicpc`(for classic Intel Compiler Classic MPI before 2024.0).
- Requirements: Unless indicated, CMake will try to find under default paths.
- `MKLROOT`: If environment variable `MKLROOT` exists, `cmake` will take MKL as a preference, i.e. not using `LAPACK`, `ScaLAPACK` and `FFTW`. To disable MKL, unset environment variable `MKLROOT`, or pass `-DMKLROOT=OFF` to `cmake`.
- `LAPACK_DIR`: Path to OpenBLAS library `libopenblas.so`(including BLAS and LAPACK)
Expand Down Expand Up @@ -136,7 +136,7 @@ Here, 'build' is the path for building ABACUS; and '-D' is used for setting up s
Here is an example:

```bash
CXX=mpiicpc cmake -B build -DCMAKE_INSTALL_PREFIX=~/abacus -DELPA_DIR=~/elpa-2016.05.004/build -DCEREAL_INCLUDE_DIR=~/cereal/include
CXX=mpiicpx cmake -B build -DCMAKE_INSTALL_PREFIX=~/abacus -DELPA_DIR=~/elpa-2025.01.001/build -DCEREAL_INCLUDE_DIR=~/cereal/include
```

## Build and Install
Expand Down Expand Up @@ -192,6 +192,8 @@ OMP_NUM_THREADS=4 mpirun -n 4 abacus

In this case, the total thread count is 16.

> Notice: If the MPI library you are using is OpenMPI, which is commonly the case, when you set the number of processes to 1 or 2, OpenMPI will default to `--bind-to core`. This means that no matter how many threads you set, these threads will be restricted to run on 1 or 2 CPU cores. Therefore, setting a higher number of OpenMP threads might result in slower program execution. Hence, when using `mpirun -n` set to 1 or 2, it is recommended to set `--bind-to none` to avoid performance degradation. For example:`OMP_NUM_THREADS=6 mpirun --bind-to none -n 1 abacus`. The detailed binding strategy of OpenMPI can be referred to at https://docs.open-mpi.org/en/v5.0.x/man-openmpi/man1/mpirun.1.html#quick-summary.

ABACUS will try to determine the number of threads used by each process if `OMP_NUM_THREADS` is not set. However, it is **required** to set `OMP_NUM_THREADS` before running `mpirun` to avoid potential performance issues.

Please refer to [hands-on guide](./hands_on.md) for more instructions.
Expand Down
18 changes: 7 additions & 11 deletions docs/quick_start/hands_on.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### A quick LCAO example

ABACUS is well known for its support of LCAO (Linear Combination of Atomic Orbital) basis set in calculating periodic condensed matter systems, so it's a good choice to start from a LCAO example of self-consistent field (SCF) calculation. Here, FCC MgO has been chosen as a quick start example. The default name of a structure file in ABACUS is `STRU`. The `STRU` file for FCC MgO in a LCAO calculation is shown below:
ABACUS is well known for its support of LCAO (Linear Combination of Atomic Orbital) basis set in calculating periodic condensed matter systems. It's a good choice to start from a LCAO example of self-consistent field (SCF) calculation. Here, FCC MgO has been chosen as a quick start example. The default name of a structure file in ABACUS is `STRU`. The `STRU` file for FCC MgO in a LCAO calculation is shown below:

```
#This is the atom file containing all the information
Expand Down Expand Up @@ -48,11 +48,10 @@ Next, the `INPUT` file is required, which sets all key parameters to direct ABAC
```
INPUT_PARAMETERS
suffix MgO
ntype 2
pseudo_dir ./
orbital_dir ./
ecutwfc 100 # Rydberg
scf_thr 1e-4 # Rydberg
scf_thr 1e-6 # SCF criterion
basis_type lcao
calculation scf # this is the key parameter telling abacus to do a scf calculation
```
Expand All @@ -71,7 +70,7 @@ Gamma
After all the above input files have been set, one should be able to run the first quick example. The simplest way is to use the command line, e.g.:

```
mpirun -np 2 abacus
OMP_NUM_THREADS=1 mpirun -np 2 abacus
```

The main output information is stored in the file `OUT.MgO/running_scf.log`, which starts with
Expand Down Expand Up @@ -138,10 +137,9 @@ The `INPUT` file follows as:
```
INPUT_PARAMETERS
suffix MgO
ntype 2
pseudo_dir ./
ecutwfc 100 # Rydberg
scf_thr 1e-4 # Rydberg
scf_thr 1e-6 # SCF criterion
basis_type pw # changes the type of basis set
calculation scf # this is the key parameter telling abacus to do a scf calculation
```
Expand Down Expand Up @@ -201,12 +199,11 @@ The `INPUT` is provided as follows:
```
INPUT_PARAMETERS
suffix MgO
ntype 2
nelec 0.0
pseudo_dir ./
orbital_dir ./
ecutwfc 100 # Rydberg
scf_thr 1e-4 # Rydberg
scf_thr 1e-6 # SCF criterion
basis_type lcao
calculation cell-relax # this is the key parameter telling abacus to do a optimization calculation
force_thr_ev 0.01 # the threshold of the force convergence, in unit of eV/Angstrom
Expand All @@ -223,11 +220,10 @@ The `INPUT` is provided as follows:
```
INPUT_PARAMETERS
suffix MgO
ntype 2
nelec 0.0
pseudo_dir ./
ecutwfc 100 # Rydberg
scf_thr 1e-4 # Rydberg
scf_thr 1e-6 # SCF criterion
basis_type pw
calculation cell-relax # this is the key parameter telling abacus to do a optimization calculation
force_thr_ev 0.01 # the threshold of the force convergence, in unit of eV/Angstrom
Expand All @@ -236,4 +232,4 @@ relax_nmax 100 # the maximal number of ionic iteration steps
out_stru 1
```

Use the same `KPT`, `STRU`, and pseudopotential files as in the above SCF-PW examples. The final optimized structure can be found in `STRU_NOW.cif` and `OUT.MgO/running_cell-relax.log`.
Use the same `KPT`, `STRU`, and pseudopotential files as in the above SCF-PW examples. The final optimized structure can be found in `STRU_NOW.cif` and `STRU_ION_D` with different format.
6 changes: 3 additions & 3 deletions docs/quick_start/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The following files are the central output files for ABACUS. After executing the

Different from `INPUT` given by the users, `OUT.suffix/INPUT` contains all parameters in ABACUS.

> **Note:** `OUT.suffix/INPUT` contain the initial default of ABACUS instead of the real parameters used in calculations. If you want to figure out the real parameters used in calculations, you can open `OUT.suffix/runing_scf.log` and research corresponding parameter you are interested.
> **Note:** `OUT.suffix/INPUT` contain the initial default of ABACUS instead of the real parameters used in calculations. This file is stored for reproduction in case the default value is changed during development. If you want to figure out the real parameters used in calculations, you can open `OUT.suffix/runing_scf.log` and research corresponding parameter you are interested.

For a complete list of input parameters, please consult this [instruction](../advanced/input_files/input-main.md).

Expand All @@ -33,9 +33,9 @@ BAND Energy(ev) Occupation Kpoint = 1
5 9.41058 0
```

## *STRU_SIMPLE.cif*
## *STRU.cif*

ABACUS generates a `.cif` format structure file based on the input file `STRU`, facilitating users to visualize with commonly used software. `STRU_READIN_ADJUST.cif` is the structure after considering symmetry.
ABACUS generates a `.cif` format structure file based on the input file `STRU`, facilitating users to visualize with commonly used software.

## *warning.log*

Expand Down
14 changes: 0 additions & 14 deletions source/module_base/complexarray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,4 @@ void point_mult(ComplexArray &in1, ComplexArray &in2, ComplexArray &out){
in1.ptr[i].real() * in2.ptr[i].imag() +
in1.ptr[i].imag() * in2.ptr[i].real());}
}
const std::complex <double> &ComplexArray::operator()(const int ind1, const int ind2, const int ind3, const int ind4) const{
assert(ind1>=0); assert(ind1<bound1);
assert(ind2>=0); assert(ind2<bound2);
assert(ind3>=0); assert(ind3<bound3);
assert(ind4>=0); assert(ind4<bound4);
const int ind = ((ind1 * bound2 + ind2) * bound3 + ind3) * bound4 + ind4;
return ptr[ind];}
std::complex<double>& ComplexArray::operator()(const int ind1,const int ind2,const int ind3,const int ind4){
assert(ind1>=0); assert(ind1<bound1);
assert(ind2>=0); assert(ind2<bound2);
assert(ind3>=0); assert(ind3<bound3);
assert(ind4>=0); assert(ind4<bound4);
const int ind = ((ind1 * bound2 + ind2) * bound3 + ind3) * bound4 + ind4;
return ptr[ind];}
}
Loading
Loading