Changeset 6c8ee7 for pcp


Ignore:
Timestamp:
Apr 21, 2008, 2:19:24 PM (17 years ago)
Author:
Frederik Heber <heber@…>
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)
Message:

CalculateXCEnergyNoRT(): some comment-out lines added (todo with GradientDensity)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pcp/src/excor.c

    rf2ce71c r6c8ee7  
    518518    break;
    519519  case SpinDouble:
    520     res = /*EC->fac1213**/VCR_unpol;
     520    res = VCR_unpol; /*EC->fac1213**/
    521521    break;
    522522  }
     
    735735  struct ExCor *EC = &P->ExCo;
    736736  double SumEc = 0;
     737  //double SumEx_GC = 0.; // Gradient correction part according to Becke '92
    737738  double rs, p = 0.0, pUp = 0.0, pDown = 0.0, zeta, rsUp, rsDown, SumEx=0.0;
    738739  double Factor = R->XCEnergyFactor/Lev0->MaxN;
     740  //double Dp, DpUp, DpDown;
    739741  int i;
    740742 
     
    742744    // put (corecorrected) densities in p, pUp, pDown 
    743745    p = Dens->DensityArray[TotalDensity][i];
     746    //Dp = DensityGradient(Dens->DensityArray[TotalDensity], i, Lev0, Lat);
    744747    if (R->CurrentMin > UnOccupied)
    745748    if (PP->corecorr == CoreCorrected)
    746749      p += Dens->DensityArray[CoreWaveDensity][i];
    747750    switch (Psi->PsiST) {
     751    default:
    748752    case SpinDouble:
    749753      pUp = 0.5*p;
    750754      pDown = 0.5*p;
     755      //DpUp = 0.5*Dp;
     756      //DpDown = 0.5*Dp;
    751757      break;
    752758    case SpinUp: 
     
    754760      pUp = Dens->DensityArray[TotalUpDensity][i];
    755761      pDown = Dens->DensityArray[TotalDownDensity][i];
     762      //DpUp = DensityGradient(Dens->DensityArray[TotalUpDensity], i, Lev0, Lat);
     763      //DpDown = DensityGradient(Dens->DensityArray[TotalDownDensity], i, Lev0, Lat);
    756764      if (PP->corecorr == CoreCorrected) {
    757765                                pUp += 0.5*Dens->DensityArray[CoreWaveDensity][i];
     
    759767      }
    760768      break;
    761     default:
    762       ;
    763769    }
    764770    // set all to zero if one of them is negative
     
    776782    zeta = CalcZeta(EC,pUp,pDown);
    777783    SumEc += CalcSECr(EC, rs, zeta, p);
     784    //SumEx_GC += CalcSE_GC(EC, pUp, DpUp);
     785    //SumEx_GC += CalcSE_GC(EC, pDown, DpDown);
    778786  }
    779787  E->AllLocalDensityEnergy[CorrelationEnergy] = Factor*SumEc;
    780   E->AllLocalDensityEnergy[ExchangeEnergy] = Factor*SumEx;
     788  E->AllLocalDensityEnergy[ExchangeEnergy] = Factor*(SumEx); // - SumEx_GC);
    781789}
    782790
Note: See TracChangeset for help on using the changeset viewer.