BOSampleStepper.h 1.84 KB
Newer Older
1 2
////////////////////////////////////////////////////////////////////////////////
//
Francois Gygi committed
3 4 5 6
// Copyright (c) 2008 The Regents of the University of California
//
// This file is part of Qbox
//
Francois Gygi committed
7 8
// Qbox is distributed under the terms of the GNU General Public License
// as published by the Free Software Foundation, either version 2 of
Francois Gygi committed
9 10 11 12 13 14
// the License, or (at your option) any later version.
// See the file COPYING in the root directory of this distribution
// or <http://www.gnu.org/licenses/>.
//
////////////////////////////////////////////////////////////////////////////////
//
15 16 17 18 19 20 21 22
// BOSampleStepper.h
//
////////////////////////////////////////////////////////////////////////////////

#ifndef BOSAMPLESTEPPER_H
#define BOSAMPLESTEPPER_H

#include "SampleStepper.h"
Francois Gygi committed
23
#include "EnergyFunctional.h"
24
#include "Sample.h"
25
#include "ChargeDensity.h"
26
#include "Wavefunction.h"
27

28 29 30 31 32 33
class WavefunctionStepper;
class IonicStepper;

class BOSampleStepper : public SampleStepper
{
  private:
34

35 36
  Wavefunction dwf;
  Wavefunction* wfv;
Francois Gygi committed
37
  int nitscf_;
38
  int nite_;
Francois Gygi committed
39 40
  ChargeDensity cd_;
  EnergyFunctional ef_;
41

42 43 44
  WavefunctionStepper* wf_stepper;
  IonicStepper* ionic_stepper;

45
  bool update_density_first_;
46
  bool update_vh_, update_vxc_;
47

48 49 50 51 52 53
  // Do not allow construction of BOSampleStepper unrelated to a Sample
  BOSampleStepper(void);

  public:

  mutable TimerMap tmap;
54

55
  void step(int niter);
56 57
  // initialize density with sum of atomic densities
  void initialize_density(void);
58
  void set_update_vh(bool update_vh) { update_vh_ = update_vh; }
59 60 61
  void set_update_vxc(bool update_vxc) { update_vxc_ = update_vxc; }
  void set_update_density_first(bool update_density_first)
    { update_density_first_ = update_density_first; }
62

63 64 65
  EnergyFunctional& ef(void) { return ef_; }
  ChargeDensity& cd(void) { return cd_; }

Francois Gygi committed
66
  BOSampleStepper(Sample& s, int nitscf, int nite);
Francois Gygi committed
67
  ~BOSampleStepper();
68 69
};
#endif