|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include "dftu_base_test_fixture.h"#include "source_cell/atom_spec.h"#include "source_pw/module_pwdft/dftu_base.h"#include "source_pw/module_pwdft/dftu_base_io.h"#include <fstream>#include <sstream>#include <string>#include <vector>Functions | |
| TEST_F (DFTUBaseTest, InitBaseReadsFixedOccMat) | |
| init_occ_mat=2 loads the fixed occupation matrix during run initialization. | |
| TEST_F (DFTUBaseTest, InitBaseReadsOccMatSocPauliRoundtrip) | |
| TEST_F (DFTUBaseTest, ReadOccMatCompactHandlesLongComment) | |
| TEST_F (DFTUBaseTest, ReadOccMatCompactMultipleAtomsSkipsUncorrelatedSpecies) | |
| TEST_F (DFTUBaseTest, ReadOccMatCompactSocRealSpinBasis) | |
| TEST_F (DFTUBaseTest, ReadOccMatRejectsLegacyHeader) | |
| TEST_F (DFTUBaseTest, ReadOccMatRejectsShortMatrixRow) | |
| TEST_F (DFTUBaseTest, ReadOccMatRejectsLongMatrixRow) | |
| TEST_F (DFTUBaseTest, ReadOccMatRejectsMissingSocBlock) | |
| TEST_F (DFTUBaseTest, ReadOccMatRejectsExtraContent) | |
| TEST_F | ( | DFTUBaseTest | , |
| InitBaseReadsFixedOccMat | ) |
init_occ_mat=2 loads the fixed occupation matrix during run initialization.
| TEST_F | ( | DFTUBaseTest | , |
| InitBaseReadsOccMatSocPauliRoundtrip | ) |
Reading an nspin=4 occupation-matrix file with SOC_LAYOUT_PAULI must reconstruct the 4 contiguous Pauli blocks [b0, b1, b2, b3] in the 2m x 2m flat buffer. The bug fixed in commit 1787365b3 was that the Im(n_ud) block ("spin 12 im") was discarded, so b2 came out zero/garbage and the subsequent SCF diverged. This test writes a fixture with a non-zero Im block and verifies all 4 blocks at the correct flat-buffer offsets.
| TEST_F | ( | DFTUBaseTest | , |
| ReadOccMatCompactHandlesLongComment | ) |
| TEST_F | ( | DFTUBaseTest | , |
| ReadOccMatCompactMultipleAtomsSkipsUncorrelatedSpecies | ) |
| TEST_F | ( | DFTUBaseTest | , |
| ReadOccMatCompactSocRealSpinBasis | ) |
| TEST_F | ( | DFTUBaseTest | , |
| ReadOccMatRejectsExtraContent | ) |
| TEST_F | ( | DFTUBaseTest | , |
| ReadOccMatRejectsLegacyHeader | ) |
| TEST_F | ( | DFTUBaseTest | , |
| ReadOccMatRejectsLongMatrixRow | ) |
| TEST_F | ( | DFTUBaseTest | , |
| ReadOccMatRejectsMissingSocBlock | ) |
| TEST_F | ( | DFTUBaseTest | , |
| ReadOccMatRejectsShortMatrixRow | ) |