1 //////////////////////////////////////////////////////////////////////////////// 2 // 3 // Copyright (c) 2008 The Regents of the University of California 4 // 5 // This file is part of Qbox 6 // 7 // Qbox is distributed under the terms of the GNU General Public License 8 // as published by the Free Software Foundation, either version 2 of 9 // the License, or (at your option) any later version. 10 // See the file COPYING in the root directory of this distribution 11 // or <http://www.gnu.org/licenses/>. 12 // 13 //////////////////////////////////////////////////////////////////////////////// 14 // 15 // BHandHLYPFunctional.h 16 // 17 //////////////////////////////////////////////////////////////////////////////// 18 19 #ifndef BHANDHLYPFUNCTIONAL_H 20 #define BHANDHLYPFUNCTIONAL_H 21 22 #include "XCFunctional.h" 23 #include <vector> 24 25 class BHandHLYPFunctional : public XCFunctional 26 { 27 BHandHLYPFunctional(); 28 29 std::vector<double> _exc, _exc_up, _exc_dn; 30 std::vector<double> _vxc1, _vxc1_up, _vxc1_dn, 31 _vxc2, _vxc2_upup, _vxc2_updn, _vxc2_dnup, _vxc2_dndn; 32 std::vector<double> _grad_rho[3], _grad_rho_up[3], _grad_rho_dn[3]; 33 34 void excbhandhlyp(double rho, double grad, 35 double *exc, double *vxc1, double *vxc2); 36 37 void excbhandhlyp(double rho_up, double rho_dn, 38 double grad_up2, double grad_dn2, double grad_up_grad_dn, 39 double *exc_up, double *exc_dn, double *vxc1_up, double *vxc1_dn, 40 double *vxc2_upup, double *vxc2_dndn, double *vxc2_updn, double *vxc2_dnup); 41 42 public: 43 44 BHandHLYPFunctional(const std::vector<std::vector<double> > &rhoe); 45 isGGA()46 bool isGGA() const { return true; }; name()47 std::string name() const { return "BHandHLYP"; }; 48 void setxc(void); 49 }; 50 #endif 51