Skip to content

Commit e40e739

Browse files
committed
fix logic bug where elec den overwrites prot den in epc
1 parent 232cdaa commit e40e739

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/xc_integrator/replicated/host/reference_replicated_xc_host_integrator_exc_vxc_neo.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,8 @@ void ReferenceReplicatedXCHostIntegrator<ValueType>::
438438
// Prepare for kernal input
439439
for (int32_t iPt = 0; iPt < npts; iPt++ ){
440440
// Treat total erho as spin-up, treat total prho as spin down
441-
protonic_den_eval[2*iPt] = is_rks ? den_eval[iPt] : (den_eval[2*iPt] + den_eval[2*iPt+1]);
442441
protonic_den_eval[2*iPt+1] = protonic_den_eval[2*iPt] + protonic_den_eval[2*iPt+1];
442+
protonic_den_eval[2*iPt] = is_rks ? den_eval[iPt] : (den_eval[2*iPt] + den_eval[2*iPt+1]);
443443
}
444444

445445
// EPC Functional Evaluation (Calling ExchCXX Builtin Function)
@@ -457,7 +457,6 @@ void ReferenceReplicatedXCHostIntegrator<ValueType>::
457457
protonic_den_eval[2*iPt] = protonic_den_eval[2*iPt+1];
458458
protonic_den_eval[2*iPt] = 0.0;
459459
}
460-
461460
} // End if(evalProtonic)
462461
//----------------------End EPC functional Evaluation---------------------------------------
463462

0 commit comments

Comments
 (0)