Skip to content

Commit 2357507

Browse files
committed
fix the initial guess
1 parent 7c46674 commit 2357507

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/module_lr/esolver_lrtd_lcao.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,9 @@ void LR::ESolver_LR<T, TR>::set_X_initial_guess()
587587
const int is_in_x = openshell ? 0 : is; // if openshell, spin-up and spin-down are put together
588588
if (px.in_this_processor(virt_global, occ_global))
589589
{
590+
const int xstart_pair = ik * px.get_local_size();
590591
const int ipair_loc = px.global2local_col(occ_global) * px.get_row_size() + px.global2local_row(virt_global);
591-
X[is_in_x].data<T>()[xstart_bs + ipair_loc] = (static_cast<T>(1.0) / static_cast<T>(nk));
592+
X[is_in_x].data<T>()[xstart_bs + xstart_pair + ipair_loc] = (static_cast<T>(1.0) / static_cast<T>(nk));
592593
}
593594
}
594595
}

0 commit comments

Comments
 (0)