@@ -437,13 +437,9 @@ void ReferenceReplicatedXCHostIntegrator<ValueType>::
437437 if (evalProtonic){
438438 // Prepare for kernal input
439439 for (int32_t iPt = 0 ; iPt < npts; iPt++ ){
440- // Sum up electronic density
441- const auto electonic_den = is_rks ? den_eval[iPt] : (den_eval[2 *iPt] + den_eval[2 *iPt+1 ]);
442- // Sum up protonic density
443- const auto protonic_den = protonic_den_eval[2 *iPt] + protonic_den_eval[2 *iPt+1 ];
444440 // Treat total erho as spin-up, treat total prho as spin down
445- protonic_den_eval[2 *iPt] = electonic_den ;
446- protonic_den_eval[2 *iPt+1 ] = protonic_den ;
441+ protonic_den_eval[2 *iPt] = is_rks ? den_eval[iPt] : (den_eval[ 2 *iPt] + den_eval[ 2 *iPt+ 1 ]) ;
442+ protonic_den_eval[2 *iPt+1 ] = protonic_den_eval[ 2 *iPt] + protonic_den_eval[ 2 *iPt+ 1 ] ;
447443 }
448444
449445 // EPC Functional Evaluation (Calling ExchCXX Builtin Function)
@@ -452,8 +448,8 @@ void ReferenceReplicatedXCHostIntegrator<ValueType>::
452448 // Digest kernal output
453449 for (int32_t iPt = 0 ; iPt < npts; iPt++ ){
454450 // assign df/derho
455- vrho[2 *iPt] += protonic_vrho[2 *iPt];
456- vrho[2 *iPt+1 ] += protonic_vrho[2 *iPt];
451+ vrho[spin_dim_scal *iPt] += protonic_vrho[2 *iPt];
452+ if ( not is_rks) vrho[spin_dim_scal *iPt+1 ] += protonic_vrho[2 *iPt];
457453 // assign df/dprho
458454 protonic_vrho[2 *iPt] = protonic_vrho[2 *iPt+1 ];
459455 protonic_vrho[2 *iPt+1 ] = 0.0 ;
@@ -583,10 +579,10 @@ void ReferenceReplicatedXCHostIntegrator<ValueType>::
583579 *elec_EXC = EXC_WORK + EPC_WORK;
584580 *prot_EXC = EPC_WORK;
585581
586- std::cout << " N_EL = " << std::setprecision (12 ) << std::scientific << *N_EL << std::endl;
587- std::cout << " N_PROT = " << std::setprecision (12 ) << std::scientific << *N_PROT << std::endl;
588- std::cout << " elec_EXC = " << std::setprecision (12 ) << std::scientific << *elec_EXC << std::endl;
589- std::cout << " prot_EXC = " << std::setprecision (12 ) << std::scientific << *prot_EXC << std::endl;
582+ // std::cout << "N_EL = " << std::setprecision(12) << std::scientific << *N_EL << std::endl;
583+ // std::cout << "N_PROT = " << std::setprecision(12) << std::scientific << *N_PROT << std::endl;
584+ // std::cout << "elec_EXC = " << std::setprecision(12) << std::scientific << *elec_EXC << std::endl;
585+ // std::cout << "prot_EXC = " << std::setprecision(12) << std::scientific << *prot_EXC << std::endl;
590586
591587 // Symmetrize Electronic VXC
592588 for ( int32_t j = 0 ; j < nbf; ++j )
0 commit comments