- Timestamp:
- Apr 21, 2008, 2:19:24 PM (17 years ago)
- Children:
- b70503
- Parents:
- f2ce71c
- git-author:
- Frederik Heber <heber@…> (04/18/08 15:28:22)
- git-committer:
- Frederik Heber <heber@…> (04/21/08 14:19:24)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pcp/src/excor.c
rf2ce71c r6c8ee7 518 518 break; 519 519 case SpinDouble: 520 res = /*EC->fac1213**/VCR_unpol;520 res = VCR_unpol; /*EC->fac1213**/ 521 521 break; 522 522 } … … 735 735 struct ExCor *EC = &P->ExCo; 736 736 double SumEc = 0; 737 //double SumEx_GC = 0.; // Gradient correction part according to Becke '92 737 738 double rs, p = 0.0, pUp = 0.0, pDown = 0.0, zeta, rsUp, rsDown, SumEx=0.0; 738 739 double Factor = R->XCEnergyFactor/Lev0->MaxN; 740 //double Dp, DpUp, DpDown; 739 741 int i; 740 742 … … 742 744 // put (corecorrected) densities in p, pUp, pDown 743 745 p = Dens->DensityArray[TotalDensity][i]; 746 //Dp = DensityGradient(Dens->DensityArray[TotalDensity], i, Lev0, Lat); 744 747 if (R->CurrentMin > UnOccupied) 745 748 if (PP->corecorr == CoreCorrected) 746 749 p += Dens->DensityArray[CoreWaveDensity][i]; 747 750 switch (Psi->PsiST) { 751 default: 748 752 case SpinDouble: 749 753 pUp = 0.5*p; 750 754 pDown = 0.5*p; 755 //DpUp = 0.5*Dp; 756 //DpDown = 0.5*Dp; 751 757 break; 752 758 case SpinUp: … … 754 760 pUp = Dens->DensityArray[TotalUpDensity][i]; 755 761 pDown = Dens->DensityArray[TotalDownDensity][i]; 762 //DpUp = DensityGradient(Dens->DensityArray[TotalUpDensity], i, Lev0, Lat); 763 //DpDown = DensityGradient(Dens->DensityArray[TotalDownDensity], i, Lev0, Lat); 756 764 if (PP->corecorr == CoreCorrected) { 757 765 pUp += 0.5*Dens->DensityArray[CoreWaveDensity][i]; … … 759 767 } 760 768 break; 761 default:762 ;763 769 } 764 770 // set all to zero if one of them is negative … … 776 782 zeta = CalcZeta(EC,pUp,pDown); 777 783 SumEc += CalcSECr(EC, rs, zeta, p); 784 //SumEx_GC += CalcSE_GC(EC, pUp, DpUp); 785 //SumEx_GC += CalcSE_GC(EC, pDown, DpDown); 778 786 } 779 787 E->AllLocalDensityEnergy[CorrelationEnergy] = Factor*SumEc; 780 E->AllLocalDensityEnergy[ExchangeEnergy] = Factor* SumEx;788 E->AllLocalDensityEnergy[ExchangeEnergy] = Factor*(SumEx); // - SumEx_GC); 781 789 } 782 790
Note:
See TracChangeset
for help on using the changeset viewer.