Skip to content

Commit 218e8ad

Browse files
committed
fix after rebase
1 parent 68158c9 commit 218e8ad

File tree

1 file changed

+2
-1
lines changed
  • source/module_hamilt_lcao/hamilt_lcaodft

1 file changed

+2
-1
lines changed

source/module_hamilt_lcao/hamilt_lcaodft/edm.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ elecstate::DensityMatrix<std::complex<double>, double> Force_LCAO<std::complex<d
5858
{
5959

6060
// construct a DensityMatrix object
61-
elecstate::DensityMatrix<std::complex<double>, double> edm(&kv, &pv, nspin);
61+
const int nspin_dm = nspin == 2 ? 2 : 1;
62+
elecstate::DensityMatrix<std::complex<double>, double> edm(&pv, nspin_dm, kv.kvec_d, kv.get_nks() / nspin_dm);
6263

6364
//--------------------------------------------
6465
// calculate the energy density matrix here.

0 commit comments

Comments
 (0)