Commit 2ec8827e by Francois Gygi

fix alpha_PBE0 use in XCPotential

git-svn-id: http://qboxcode.org/svn/qb/trunk@1444 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 3509a20b
......@@ -724,11 +724,11 @@ XCOperator.o: ExchangeOperator.h SlaterDet.h Basis.h Matrix.h
XCOperator.o: FourierTransform.h KPGridConnectivity.h
XCOperator.o: Sample.h AtomSet.h Context.h Atom.h D3vector.h UnitCell.h
XCOperator.o: ConstraintSet.h ExtForceSet.h Wavefunction.h Control.h
XCPotential.o: XCPotential.h ChargeDensity.h Timer.h Context.h
XCPotential.o: XCPotential.h Control.h ChargeDensity.h Timer.h Context.h
XCPotential.o: LDAFunctional.h XCFunctional.h PBEFunctional.h
XCPotential.o: BLYPFunctional.h B3LYPFunctional.h Basis.h D3vector.h
XCPotential.o: UnitCell.h FourierTransform.h blas.h
XCPotential.o: ChargeDensity.h Timer.h Context.h
XCPotential.o: Control.h ChargeDensity.h Timer.h Context.h
XMLGFPreprocessor.o: Timer.h Context.h Base64Transcoder.h Matrix.h
XMLGFPreprocessor.o: XMLGFPreprocessor.h
XMLGFPreprocessor.o: Matrix.h
......@@ -39,7 +39,7 @@ XCOperator::XCOperator(Sample& s, const ChargeDensity& cd) :cd_(cd)
( functional_name == "BLYP" ) )
{
// create only an xc potential
xcp_ = new XCPotential(cd, functional_name);
xcp_ = new XCPotential(cd, functional_name, s.ctrl);
hasPotential_ = true;
hasGGA_ = xcp_->isGGA();
hasHF_ = false;
......@@ -57,7 +57,7 @@ XCOperator::XCOperator(Sample& s, const ChargeDensity& cd) :cd_(cd)
else if ( functional_name == "PBE0" )
{
// create an exchange potential
xcp_ = new XCPotential(cd, functional_name);
xcp_ = new XCPotential(cd, functional_name, s.ctrl);
// create the exchange operator with mixing coeff=0.25
xop_ = new ExchangeOperator(s, s.ctrl.alpha_PBE0);
......@@ -69,7 +69,7 @@ XCOperator::XCOperator(Sample& s, const ChargeDensity& cd) :cd_(cd)
else if ( functional_name == "B3LYP" )
{
// create an exchange potential
xcp_ = new XCPotential(cd, functional_name);
xcp_ = new XCPotential(cd, functional_name, s.ctrl);
// create the exchange operator with mixing coeff=0.20
xop_ = new ExchangeOperator(s, 0.20);
......
......@@ -28,8 +28,8 @@
using namespace std;
////////////////////////////////////////////////////////////////////////////////
XCPotential::XCPotential(const ChargeDensity& cd, const string functional_name):
cd_(cd), vft_(*cd_.vft()), vbasis_(*cd_.vbasis())
XCPotential::XCPotential(const ChargeDensity& cd, const string functional_name,
const Control& ctrl): cd_(cd), vft_(*cd_.vft()), vbasis_(*cd_.vbasis())
{
if ( functional_name == "LDA" )
{
......@@ -45,7 +45,7 @@ cd_(cd), vft_(*cd_.vft()), vbasis_(*cd_.vbasis())
}
else if ( functional_name == "PBE0" )
{
const double x_coeff = 0.75;
const double x_coeff = 1.0 - ctrl.alpha_PBE0;
const double c_coeff = 1.0;
xcf_ = new PBEFunctional(cd_.rhor,x_coeff,c_coeff);
}
......
......@@ -18,6 +18,7 @@
#ifndef XCPOTENTIAL_H
#define XCPOTENTIAL_H
#include "Control.h"
#include "ChargeDensity.h"
#include <string>
#include <vector>
......@@ -51,7 +52,8 @@ class XCPotential
const XCFunctional* xcf() { return xcf_; }
bool isGGA(void);
XCPotential(const ChargeDensity& cd, const std::string functional_name);
XCPotential(const ChargeDensity& cd, const std::string functional_name,
const Control& ctrl);
~XCPotential();
void update(std::vector<std::vector<double> >& vr);
void compute_stress(std::valarray<double>& sigma_exc);
......
--------------------------------------------------------------------------------
rel1_60_0
Added alpha_PBE0 variable
--------------------------------------------------------------------------------
rel1_59_0
Added scf_tol variable
--------------------------------------------------------------------------------
rel1_58_0
Added utility scripts
--------------------------------------------------------------------------------
......
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