diff --git a/src/QMCHamiltonians/GeCorePolPotential.cpp b/src/QMCHamiltonians/GeCorePolPotential.cpp new file mode 100644 index 000000000..17b6cd892 --- /dev/null +++ b/src/QMCHamiltonians/GeCorePolPotential.cpp @@ -0,0 +1,199 @@ +////////////////////////////////////////////////////////////////// +// (c) Copyright 2003 by Jeongnim Kim and Jordan Vincent +////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////// +// National Center for Supercomputing Applications & +// Materials Computation Center +// University of Illinois, Urbana-Champaign +// Urbana, IL 61801 +// e-mail: jnkim@ncsa.uiuc.edu +// Tel: 217-244-6319 (NCSA) 217-333-3324 (MCC) +// +// Supported by +// National Center for Supercomputing Applications, UIUC +// Materials Computation Center, UIUC +////////////////////////////////////////////////////////////////// +// -*- C++ -*- +#include "QMCHamiltonians/CorePolPotential.h" +#include "Particle/DistanceTable.h" +#include "Particle/DistanceTableData.h" +#include "Utilities/OhmmsInfo.h" + +namespace ohmmsqmc { + + GeCorePolPotential::GeCorePolPotential(ParticleSet& ions, ParticleSet& els, + const string species): + d_ie(NULL), d_ii(NULL), alpha(0.3558), r_b(0.7048), eCoreCore(0.0) { + + //set the distance tables + d_ie = DistanceTable::getTable(DistanceTable::add(ions,els)); + d_ie->create(1); + d_ii = DistanceTable::getTable(DistanceTable::add(ions)); + d_ii->create(1); + d_ii->evaluate(ions); + + nCenters = ions.getTotalNum(); + nParticles = els.getTotalNum(); + C = -0.5*alpha; + r_binv = 1.0/r_b; + + CoreCoef.resize(nCenters); + CoreCoreDipole.resize(nCenters,nCenters); + ElCoreDipole.resize(nCenters,d_ie->getTotNadj()); + CoreCoreDipole = 0.0; + ElCoreDipole = 0.0; + + //only calculate the cpp for Ge atoms + int GeCounter = 0; + for(int iat=0; iatrinv(nn),3);//(1/R_{JI}^3) R_{JI} = R_J-R_I + PosType dipole = rinv3*d_ii->dr(nn);//(\vec{R_{JI}}/R_{JI}^3) + CoreCoreDipole(iat,jat) = dipole*ions.Species(iz,ions.GroupID[jat]);//charge of jat + CoreCoreDipole(jat,iat) = -1.0*dipole*ions.Species(iz,ions.GroupID[iat]);//charge of iat + } + } + } + + //calculate the core-core term (constant) + /* + nn = 0; + for(int iat=0; iatproperties; + while(att != NULL) { + string aname((const char*)(att->name)); + if(aname == "cpp") { + xmlChar* att1=xmlGetProp(cur, (const xmlChar*)"species"); + if(!att1) { + ERRORMSG("No Core species specified!") + return false; + } else { + acore = new string((const char*)att1); + } + + } + att=att->next; + } + } + cur1=cur1->next; + } + + + //only calculate the cpp for Ge atoms + int GeCounter = 0; + for(int iat=0; iat CoreCoef; + ///CoreCoreDipole(C,C') \f$= \frac{Z_{C'} {\bf R_{CC'}}}{R_{CC'}^3}\f$ + Matrix CoreCoreDipole; + ///ElCoreDipole(C,i) \f$= \frac{{\bf r_{Ci}}f({\bar{r_{bCi}}}{r_{Ci}^3}\f$ + Matrix ElCoreDipole; + + ///constructor + GeCorePolPotential(ParticleSet& ions, ParticleSet& els, + const string species); + + ~GeCorePolPotential(); + + ValueType evaluate(ParticleSet& P); + + inline ValueType + evaluate(ParticleSet& P, RealType& x) { + return x=evaluate(P); + } + + inline RealType fcpp(RealType z) { + return pow((1.0-exp(-1.0*z*z)),2); + } + + void evaluate(WalkerSetRef& W, ValueVectorType& LE){ } + + }; +} +#endif + +/*************************************************************************** + * $RCSfile$ $Author$ + * $Revision$ $Date$ + * $Id$ + ***************************************************************************/ +