Commit c778958b by Martin Schlipf

link HSE local part from rest of code

"HSE" is allowed xc functional now
use Coulomb potential in nonlocal part

git-svn-id: http://qboxcode.org/svn/qb/branches/hse-dev@1384 cba15fb0-1239-40c8-b417-11db7ca47a34
parent e8a2cd2b
......@@ -66,6 +66,18 @@ XCOperator::XCOperator(Sample& s, const ChargeDensity& cd) :cd_(cd)
hasHF_ = true;
HFmixCoeff_ = 0.25;
}
else if ( functional_name == "HSE" )
{
// create an exchange potential
xcp_ = new XCPotential(cd, functional_name);
// create the exchange operator with mixing coeff=0.25
xop_ = new ExchangeOperator(s, 0.25);
hasPotential_ = true;
hasGGA_ = xcp_->isGGA();
hasHF_ = true;
HFmixCoeff_ = 0.25;
}
else if ( functional_name == "B3LYP" )
{
// create an exchange potential
......
......@@ -20,6 +20,7 @@
#include "LDAFunctional.h"
#include "PBEFunctional.h"
#include "BLYPFunctional.h"
#include "HSEFunctional.h"
#include "B3LYPFunctional.h"
#include "Basis.h"
#include "FourierTransform.h"
......@@ -49,6 +50,10 @@ cd_(cd), vft_(*cd_.vft()), vbasis_(*cd_.vbasis())
const double c_coeff = 1.0;
xcf_ = new PBEFunctional(cd_.rhor,x_coeff,c_coeff);
}
else if ( functional_name == "HSE" )
{
xcf_ = new HSEFunctional(cd_.rhor);
}
else if ( functional_name == "B3LYP" )
{
xcf_ = new B3LYPFunctional(cd_.rhor);
......
......@@ -49,10 +49,11 @@ class Xc : public Var
v == "BLYP" ||
v == "HF" ||
v == "PBE0" ||
v == "HSE" ||
v == "B3LYP" ) )
{
if ( ui->onpe0() )
cout << " xc must be LDA, PBE, BLYP, HF, PBE0 or B3LYP" << endl;
cout << " xc must be LDA, PBE, BLYP, HF, PBE0, HSE or B3LYP" << endl;
return 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment