//////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2008 The Regents of the University of California // // This file is part of Qbox // // Qbox is distributed under the terms of the GNU General Public License // as published by the Free Software Foundation, either version 2 of // the License, or (at your option) any later version. // See the file COPYING in the root directory of this distribution // or . // //////////////////////////////////////////////////////////////////////////////// // // NonLocalPotential.h // //////////////////////////////////////////////////////////////////////////////// // $Id: NonLocalPotential.h,v 1.9 2008-09-08 15:56:18 fgygi Exp $ #ifndef NONLOCALPOTENTIAL_H #define NONLOCALPOTENTIAL_H #include "AtomSet.h" #include "Basis.h" #include "SlaterDet.h" #include "Context.h" #include "Matrix.h" class NonLocalPotential { private: const Context& ctxt_; const AtomSet& atoms_; const SlaterDet& sd_; const Basis& basis_; int nsp; // number of species int nspnl; // number of non-local species std::vector nop; // nop[is] std::vector lloc; // lloc[is] std::vector na; // na[is] std::vector npr; // npr[is] std::vector nprna; // nprna[is] std::vector > lproj; // lproj[is][ipr] std::vector > wt; // wt[is][ipr] std::vector > twnl; // twnl[is][npr*ngwl] std::vector > dtwnl; // dtwnl[is][6*npr*ngwl],ij=0,..,5 std::vector nquad; // nquad[is] // rquad[is][iquad], iquad = 0, nquad[is]-1 std::vector > rquad; // wquad[is][iquad], iquad = 0, nquad[is]-1 std::vector > wquad; mutable TimerMap tmap; void init(void); public: NonLocalPotential(const AtomSet& as, const SlaterDet& sd) : ctxt_(sd.context()), atoms_(as), sd_(sd), basis_(sd.basis()) { init(); } ~NonLocalPotential(void); void update_twnl(void); double energy(bool compute_hpsi, SlaterDet& dsd, bool compute_forces, std::vector >& fion, bool compute_stress, std::valarray& sigma_enl); }; #endif