Sample.h 1.39 KB
Newer Older
Francois Gygi committed
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/>.
//
////////////////////////////////////////////////////////////////////////////////
//
Francois Gygi committed
15 16 17 18 19 20 21 22
// Sample.h
//
////////////////////////////////////////////////////////////////////////////////

#ifndef SAMPLE_H
#define SAMPLE_H

#include "AtomSet.h"
Francois Gygi committed
23
#include "ConstraintSet.h"
Francois Gygi committed
24
#include "ExtForceSet.h"
Francois Gygi committed
25 26 27 28
#include "Wavefunction.h"
#include "Control.h"

class Context;
29
class UserInterface;
Francois Gygi committed
30 31 32 33

class Sample
{
  private:
34

Francois Gygi committed
35
  public:
36

Francois Gygi committed
37 38 39
  const Context& ctxt_;

  AtomSet atoms;
Francois Gygi committed
40
  ConstraintSet constraints;
Francois Gygi committed
41
  ExtForceSet extforces;
Francois Gygi committed
42 43 44
  Wavefunction wf;
  Wavefunction* wfv; // wavefunction velocity
  Control ctrl;
45
  UserInterface *ui;
Francois Gygi committed
46

47
  Sample(const Context& ctxt, UserInterface *ui_ = 0) : ctxt_(ctxt), ui(ui_),
48
    atoms(ctxt), constraints(ctxt),
Francois Gygi committed
49
    extforces(ctxt), wf(ctxt), wfv(0) {}
50
  ~Sample(void) { delete wfv; }
Francois Gygi committed
51 52 53 54 55 56 57 58
  void reset(void)
  {
    atoms.reset();
    constraints.reset();
    extforces.reset();
    wf.reset();
    delete wfv;
  }
Francois Gygi committed
59 60
};
#endif