28#ifndef _chemistry_qc_dft_functional_h
29#define _chemistry_qc_dft_functional_h
35#include <util/state/state.h>
36#include <math/scmat/vector3.h>
37#include <chemistry/qc/wfn/wfn.h>
38#include <chemistry/qc/wfn/density.h>
43struct PointInputData {
44 enum {X=BatchElectronDensity::X,
45 Y=BatchElectronDensity::Y,
46 Z=BatchElectronDensity::Z};
47 enum {XX=BatchElectronDensity::XX,
48 YX=BatchElectronDensity::YX,
49 YY=BatchElectronDensity::YY,
50 ZX=BatchElectronDensity::ZX,
51 ZY=BatchElectronDensity::ZY,
52 ZZ=BatchElectronDensity::ZZ};
75 void compute_derived(
int spin_polarized,
79 PointInputData(
const SCVector3& r_): r(r_) {}
96 void zero(){energy=df_drho_a=df_drho_b=df_dgamma_aa=df_dgamma_bb=df_dgamma_ab=0.0;}
101class DenFunctional:
virtual public SavableState {
104 int compute_potential_;
108 double lower_bound,
double upper_bound);
118 virtual void set_spin_polarized(
int i);
121 virtual void set_compute_potential(
int i);
125 virtual int need_density_gradient();
128 virtual int need_density_hessian();
132 double *gradient,
int acenter,
134 const double *dmat_a,
const double *dmat_b,
135 int ncontrib,
const int *contrib,
136 int ncontrib_bf,
const int *contrib_bf,
137 const double *bs_values,
const double *bsg_values,
138 const double *bsh_values);
141 virtual double a0()
const;
151class NElFunctional:
public DenFunctional {
164class SumDenFunctional:
public DenFunctional {
203 void set_spin_polarized(
int);
204 void set_compute_potential(
int);
205 int need_density_gradient();
288class StdDenFunctional:
public SumDenFunctional {
291 void init_arrays(
int n);
307class LSDACFunctional:
public DenFunctional {
319 double &ec_local,
double &decrs,
double &deczeta) = 0;
332class PBECFunctional:
public DenFunctional {
337 void init_constants();
338 double rho_deriv(
double rho_a,
double rho_b,
double mdr,
339 double ec_local,
double ec_local_dra);
340 double gab_deriv(
double rho,
double phi,
double mdr,
double ec_local);
347 int need_density_gradient();
349 void set_spin_polarized(
int);
363class PW91CFunctional:
public DenFunctional {
374 void init_constants();
375 double limit_df_drhoa(
double rhoa,
double gamma,
376 double ec,
double decdrhoa);
384 int need_density_gradient();
387 void set_spin_polarized(
int);
397class P86CFunctional:
public DenFunctional {
407 void init_constants();
414 int need_density_gradient();
422class NewP86CFunctional:
public DenFunctional {
432 void init_constants();
433 double rho_deriv(
double rho_a,
double rho_b,
double mdr);
434 double gab_deriv(
double rho_a,
double rho_b,
double mdr);
440 ~NewP86CFunctional();
442 int need_density_gradient();
449class SlaterXFunctional:
public DenFunctional {
455 ~SlaterXFunctional();
467class VWNLCFunctional:
public LSDACFunctional {
469 double Ap_, Af_, A_alpha_;
470 double x0p_mc_, bp_mc_, cp_mc_, x0f_mc_, bf_mc_, cf_mc_;
471 double x0p_rpa_, bp_rpa_, cp_rpa_, x0f_rpa_, bf_rpa_, cf_rpa_;
472 double x0_alpha_mc_, b_alpha_mc_, c_alpha_mc_;
473 double x0_alpha_rpa_, b_alpha_rpa_, c_alpha_rpa_;
474 void init_constants();
476 double F(
double x,
double A,
double x0,
double b,
double c);
477 double dFdr_s(
double x,
double A,
double x0,
double b,
double c);
493 double x0p_, bp_, cp_, x0f_, bf_, cf_;
510 double &,
double &,
double &);
532class VWN3LCFunctional:
public VWNLCFunctional {
534 int monte_carlo_prefactor_;
537 VWN3LCFunctional(
int mcp = 1,
int mce0 = 1);
548class VWN4LCFunctional:
public VWNLCFunctional {
550 int monte_carlo_prefactor_;
563class VWN5LCFunctional:
public VWNLCFunctional {
580class PW92LCFunctional:
public LSDACFunctional {
582 double F(
double x,
double A,
double alpha_1,
double beta_1,
double beta_2,
583 double beta_3,
double beta_4,
double p);
584 double dFdr_s(
double x,
double A,
double alpha_1,
double beta_1,
double beta_2,
585 double beta_3,
double beta_4,
double p);
601class PZ81LCFunctional:
public LSDACFunctional {
603 double Fec_rsgt1(
double rs,
double beta_1,
double beta_2,
double gamma);
604 double dFec_rsgt1_drho(
double rs,
double beta_1,
double beta_2,
double gamma,
606 double Fec_rslt1(
double rs,
double A,
double B,
double C,
double D);
607 double dFec_rslt1_drho(
double rs,
double A,
double B,
double C,
double D,
620class XalphaFunctional:
public DenFunctional {
640class Becke88XFunctional:
public DenFunctional {
645 Becke88XFunctional();
648 ~Becke88XFunctional();
651 int need_density_gradient();
664class LYPCFunctional:
public DenFunctional {
670 void init_constants();
678 int need_density_gradient();
687class PW86XFunctional:
public DenFunctional {
693 void init_constants();
701 int need_density_gradient();
721class PBEXFunctional:
public DenFunctional {
726 double &mpw,
double &dmpw_dr,
double &dmpw_dg);
727 void init_constants();
735 int need_density_gradient();
750class PW91XFunctional:
public DenFunctional {
758 double &mpw,
double &dmpw_dr,
double &dmpw_dg);
759 void init_constants();
767 int need_density_gradient();
786 double &mpw,
double &dmpw_dr,
double &dmpw_dg);
788 enum Func { B88, PW91, mPW91 };
818 int need_density_gradient();
822 void init_constants(Func);
829class G96XFunctional:
public DenFunctional {
832 void init_constants();
840 int need_density_gradient();
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
virtual double a0() const
Returns the fraction of Hartee-Fock exchange to be included.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
static std::ostream & out0()
Return an ostream that writes from node 0.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
The GaussianBasisSet class is used describe a basis set composed of atomic gaussian orbitals.
Definition gaussbas.h:146
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
A template class that maintains references counts.
Definition ref.h:332
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
Restores objects that derive from SavableState.
Definition statein.h:70
Serializes objects that derive from SavableState.
Definition stateout.h:61
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void print(std::ostream &=ExEnv::out0()) const
Print the object.
StdDenFunctional(const Ref< KeyVal > &)
The name keyword is read from the input and is used to initialize the functional.
double a0() const
Override the DenFunctional::a0() member, so that a0's in contributing functionals can be added in as ...
void print(std::ostream &=ExEnv::out0()) const
Print the object.
SumDenFunctional(const Ref< KeyVal > &)
This KeyVal constructor reads the following keywords:
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
VWN1LCFunctional(int use_rpa)
Construct a VWN1 functional using the RPA parameters.
VWN1LCFunctional()
Construct a VWN1 functional using Monte-Carlo parameters.
VWN1LCFunctional(const Ref< KeyVal > &)
Construct a VWN1 functional using the Monte-Carlo parameters by default.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
VWN2LCFunctional(const Ref< KeyVal > &)
Construct a VWN2 functional.
VWN2LCFunctional()
Construct a VWN2 functional.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
void print(std::ostream &=ExEnv::out0()) const
Print the object.
mPW91XFunctional(Func variant)
Construct an mPW form exchange functional using the given functional variant.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
mPW91XFunctional(const Ref< KeyVal > &)
Construct an mPW form exchange functional.
mPW91XFunctional()
Construct an mPW exchange functional.
Contains data generated at each point by a DenFunctional.
Definition functional.h:83