Sample.h 1.37 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
// Sample.h
//
////////////////////////////////////////////////////////////////////////////////
Francois Gygi committed
18
// $Id: Sample.h,v 1.13 2010-02-20 23:13:02 fgygi Exp $
Francois Gygi committed
19 20 21 22 23

#ifndef SAMPLE_H
#define SAMPLE_H

#include "AtomSet.h"
Francois Gygi committed
24
#include "ConstraintSet.h"
Francois Gygi committed
25
#include "ExtForceSet.h"
Francois Gygi committed
26 27 28 29 30 31 32 33
#include "Wavefunction.h"
#include "Control.h"

class Context;

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 45
  Wavefunction wf;
  Wavefunction* wfv; // wavefunction velocity
  Control ctrl;

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