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 // BOSampleStepper.h 16 // 17 //////////////////////////////////////////////////////////////////////////////// 18 19 #ifndef BOSAMPLESTEPPER_H 20 #define BOSAMPLESTEPPER_H 21 22 #include "SampleStepper.h" 23 #include "EnergyFunctional.h" 24 #include "Sample.h" 25 #include "ChargeDensity.h" 26 #include "Wavefunction.h" 27 28 class WavefunctionStepper; 29 class IonicStepper; 30 31 class BOSampleStepper : public SampleStepper 32 { 33 private: 34 35 Wavefunction dwf; 36 int nitscf_; 37 int nite_; 38 ChargeDensity cd_; 39 EnergyFunctional ef_; 40 41 WavefunctionStepper* wf_stepper; 42 IonicStepper* ionic_stepper; 43 44 bool update_density_first_; 45 bool update_vh_, update_vxc_; 46 47 // Do not allow construction of BOSampleStepper unrelated to a Sample 48 BOSampleStepper(void); 49 50 public: 51 52 mutable TimerMap tmap; 53 54 void step(int niter); 55 // initialize density with sum of atomic densities 56 void initialize_density(void); set_update_vh(bool update_vh)57 void set_update_vh(bool update_vh) { update_vh_ = update_vh; } set_update_vxc(bool update_vxc)58 void set_update_vxc(bool update_vxc) { update_vxc_ = update_vxc; } set_update_density_first(bool update_density_first)59 void set_update_density_first(bool update_density_first) 60 { update_density_first_ = update_density_first; } 61 ef(void)62 EnergyFunctional& ef(void) { return ef_; } cd(void)63 ChargeDensity& cd(void) { return cd_; } 64 65 BOSampleStepper(Sample& s, int nitscf, int nite); 66 ~BOSampleStepper(); 67 }; 68 #endif 69