Skip to content

Commit 44da4b1

Browse files
committed
Remove a redundant routine
1 parent 329926c commit 44da4b1

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

src/libra_py/dynamics/ldr_torch/compute.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -283,28 +283,10 @@ def compute_populations(self):
283283
P = torch.sum(C_blocks.conj() * SC_blocks, dim=1).real
284284

285285
return P
286-
287-
def compute_denmat_raw(self):
288-
"""
289-
Compute electronic density matrix for a single step without the orthogonalization.
290-
"""
291-
N, s = self.ngrids, self.nstates
292-
Cvec = self.Ccurr
293-
294-
# Compute SC once: shape (ndim,)
295-
SC = self.S @ Cvec
296-
297-
C_blocks = Cvec.view(s, N)
298-
SC_blocks = SC.view(s, N)
299-
300-
# \rho_ij = \sum_n C_i,n^* (SC)_j,n
301-
rho = SC_blocks.conj() @ C_blocks.T
302-
303-
return rho
304286

305287
def compute_denmat(self):
306288
"""
307-
Compute electronic density matrix for a single step without the orthogonalization.
289+
Compute electronic density matrix for a single step using the orthogonalization.
308290
"""
309291
N, s = self.ngrids, self.nstates
310292
Cvec = self.Ccurr

0 commit comments

Comments
 (0)