src/QMCWaveFunctions/lcao/CuspCorrection.cpp
//  Compute the chi squared distance given a value for phi at zero.
Compute the chi squared distance given a value for phi at zero.
Compute the chi squared distance given a value for phi at zero .
RealType evaluateForPhi0Body(RealType phi0,
                             ValueVector_t& pos,
                             ValueVector_t& ELcurr,
                             ValueVector_t& ELideal,
                             CuspCorrection& cusp,
                             OneMolecularOrbital& phiMO,
                             ValGradLap phiAtRc,
                             RealType etaAtZero,
                             RealType ELorigAtRc,
                             RealType Z)
{
  cusp.cparam.sg = phi0 > 0.0 ? 1.0 : -1.0;
  cusp.cparam.C  = (phiAtRc.val * phi0 < 0.0) ? 1.5 * phiAtRc.val : 0.0;
  TinyVector<ValueType, 5> X;
  ValueType phiBarAtRc; 
  evalX(phiAtRc.val, phiAtRc.grad, phiAtRc.lap, cusp.cparam.Rc, Z, cusp.cparam.C, phi0, etaAtZero, X);
  X2alpha(X, cusp.cparam.Rc, cusp.cparam.alpha);
  RealType Zeff = getZeff(Z, etaAtZero, cusp.phiBar(0.0, phiMO));
  getCurrentLocalEnergy(pos, Zeff, cusp.cparam.Rc, ELorigAtRc, cusp, phiMO, ELcurr);
  RealType chi2 = getELchi2(ELcurr, ELideal);
  return chi2;
}
RealType evaluateForPhi0Body ( RealType phi0 , ValueVector_t & pos , ValueVector_t & ELcurr , ValueVector_t & ELideal , CuspCorrection & cusp , OneMolecularOrbital & phiMO , ValGradLap phiAtRc , RealType etaAtZero , RealType ELorigAtRc , RealType Z ) { cusp . cparam . sg = phi0 > 0.0 ? 1.0 : -1.0 ; cusp . cparam . C = ( phiAtRc . val * phi0 < 0.0 ) ? 1.5 * phiAtRc . val : 0.0 ; TinyVector < ValueType , 5 > X ; ValueType phiBarAtRc ; evalX ( phiAtRc . val , phiAtRc . grad , phiAtRc . lap , cusp . cparam . Rc , Z , cusp . cparam . C , phi0 , etaAtZero , X ) ; X2alpha ( X , cusp . cparam . Rc , cusp . cparam . alpha ) ; RealType Zeff = getZeff ( Z , etaAtZero , cusp . phiBar ( 0.0 , phiMO ) ) ; getCurrentLocalEnergy ( pos , Zeff , cusp . cparam . Rc , ELorigAtRc , cusp , phiMO , ELcurr ) ; RealType chi2 = getELchi2 ( ELcurr , ELideal ) ; return chi2 ; }
Compute the chi squared distance given a value for phi at zero.
Compute the chi squared distance given a value for phi at zero .
// phiMO.phi(Rc);