diff --git a/examples/dft/31-xc_value_on_grid.py b/examples/dft/31-xc_value_on_grid.py index d0e7a980c9..94a0a02151 100644 --- a/examples/dft/31-xc_value_on_grid.py +++ b/examples/dft/31-xc_value_on_grid.py @@ -77,11 +77,11 @@ aoL_value = mol.eval_gto('GTOval_spinor', coords) # Small components aoS_value = 1/(2*lib.param.LIGHT_SPEED) * mol.eval_gto('GTOval_sp_spinor', coords) -# mL, mS are the spin-magentic moment at each point -rhoL, mL = r_numint.eval_rho(mol, aoL_value, dmLL) -rhoS, mS = r_numint.eval_rho(mol, aoS_value, dmSS) -rho = rhoL + rhoS -mx, my, mz = mL + mS +rho_m_L = r_numint.eval_rho(mol, aoL_value, dmLL) +rho_m_S = r_numint.eval_rho(mol, aoS_value, dmSS) +rho = rho_m_L[0] + rho_m_S[0] +# mx, my, mz are the spin-magentic moment at each point +mx, my, mz = rho_m_L[1:4] + rho_m_S[1:4] # # The values of exact exchange