Skip to content

Commit 51e36d3

Browse files
author
dyzheng
committed
docs: drop redundant LCAO force/stress derivation document
Remove docs/nao_lcao_force_stress_derivation.md and the code-comment references that pointed at it. The conventions it documented (DMK = (C f C†)^T storage, e^{-ikR} inverse Fourier sign, closed-trace protection for force/stress) are already stated inline in density_matrix.h/.cpp and the T1/T2/T3/T8 unit tests.
1 parent 4a0cf9c commit 51e36d3

5 files changed

Lines changed: 4 additions & 166 deletions

File tree

docs/nao_lcao_force_stress_derivation.md

Lines changed: 0 additions & 157 deletions
This file was deleted.

source/source_estate/module_dm/density_matrix.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void DensityMatrix_Tools::cal_DMR(
112112
if(ik_in >= 0 && ik_in != ik) { continue; }
113113
// Inverse Fourier transform: D(R) = sum_k D(k) * exp(-i*k*R)
114114
// k-point weights are embedded in DMK, so there is no 1/Nk
115-
// prefactor. See Sec. 3 of nao_lcao_force_stress_derivation.md
115+
// prefactor.
116116
const ModuleBase::Vector3<double> dR(R_index[0], R_index[1], R_index[2]);
117117
const double arg = (dm._kvec_d[ik] * dR) * ModuleBase::TWO_PI;
118118
double sinp, cosp;
@@ -268,7 +268,7 @@ void DensityMatrix_Tools::cal_DMR_td(
268268
if(ik_in >= 0 && ik_in != ik) { continue; }
269269
// Inverse Fourier transform: D(R) = sum_k D(k) * exp(-i*k*R)
270270
// k-point weights are embedded in DMK, so there is no 1/Nk
271-
// prefactor. See Sec. 3 of nao_lcao_force_stress_derivation.md
271+
// prefactor.
272272
const ModuleBase::Vector3<double> dR(R_index[0], R_index[1], R_index[2]);
273273
const double arg = (dm._kvec_d[ik] * dR) * ModuleBase::TWO_PI;
274274
double sinp, cosp;

source/source_estate/module_dm/density_matrix.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ namespace elecstate
1111
{
1212
// ---------------------------------------------------------------------------
1313
// Density-matrix conventions (DMK/DMR), frozen by the DM/DMK/DMR chain.
14-
// See docs/nao_lcao_force_stress_derivation.md for the full derivation.
1514
//
1615
// 1. DMK(μ,ν;k) = Σ_n f_nk C*_{μn}(k) C_{νn}(k) = (C f C†)^T = D_std^T.
1716
// μ = row (bra) orbital, ν = column (ket) orbital. Stored as the transpose

source/source_estate/module_dm/test/test_cal_dm_r.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,6 @@ TEST_F(DMTest, cal_DMR_blas_complex)
392392
// folding_HR (e^{+ikR}). This is the test that locks the Fourier sign of the
393393
// inverse transform: with the k-phase flipped (density_matrix.cpp: -sinp ->
394394
// +sinp), D~(k) = DMK(-k) = DMK(k)† and the assertions below turn red.
395-
// See Sec. 3 of docs/nao_lcao_force_stress_derivation.md.
396395
TEST_F(DMTest, T1_fourier_round_trip)
397396
{
398397
// k-grid {0, 1/4, 1/2, 3/4} along x: contains non-Gamma k-points and k and
@@ -512,7 +511,6 @@ TEST_F(DMTest, T1_fourier_round_trip)
512511
// ((iat1,iat2,R) and (iat2,iat1,-R)), cal_DMR must satisfy
513512
// D(iat2,iat1,-R) = D(iat1,iat2,R)^T (real DMR, nspin<4)
514513
// D(iat2,iat1,-R) = D(iat1,iat2,R)^\dagger (complex DMR, nspin=4)
515-
// See Sec. 5 of docs/nao_lcao_force_stress_derivation.md.
516514
TEST_F(DMTest, T2_dmr_hermiticity)
517515
{
518516
// two k-points, both non-Gamma, k and -k distinct
@@ -634,9 +632,8 @@ TEST_F(DMTest, T2_dmr_hermiticity)
634632
// T8: full-direction pairing storage guard. Every (iat1,iat2,R) block of the
635633
// DMR HContainer built by init_DMR must have a (iat2,iat1,-R) counterpart.
636634
// gint_rho and the force/stress paths rely on this pairing (closed-trace
637-
// protection, see Sec. 5 of docs/nao_lcao_force_stress_derivation.md).
638-
// A future half-set
639-
// storage optimization will turn this test red.
635+
// protection). A future half-set storage optimization will turn this test
636+
// red.
640637
TEST_F(DMTest, T8_full_direction_pairing_guard)
641638
{
642639
// multi-k DM (TK=complex) keeps the R structure of init_DMR(Record_adj);

source/source_lcao/module_operator_lcao/test/test_dm_trace.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
* This holds even when O(R) is NOT symmetric within the same R (the key case
2525
* for overlap/kinetic derivative operators): the protection comes from the
2626
* closed trace + per-k Hermiticity of O(k), not from same-R symmetry.
27-
* See Sec. 5 of docs/nao_lcao_force_stress_derivation.md.
2827
************************************************/
2928

3029
namespace

0 commit comments

Comments
 (0)