ExtForceSet.h 1.39 KB
Newer Older
Francois Gygi committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2009 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 <http://www.gnu.org/licenses/>.
//
////////////////////////////////////////////////////////////////////////////////
//
// ExtForceSet.h
//
////////////////////////////////////////////////////////////////////////////////

#ifndef EXTFORCESET_H
#define EXTFORCESET_H

#include <vector>
#include <string>

class Atom;
class AtomSet;
class ExtForce;
class Context;

class ExtForceSet
{
  private:

  const Context& ctxt_;
  std::vector<ExtForce *> extforce_list;

  public:

  ExtForceSet(const Context& ctxt) : ctxt_(ctxt) {}
  ~ExtForceSet();
  bool define_extforce(AtomSet &atoms, int argc, char **argv);
  bool set_extforce(int argc, char **argv);
  bool delete_extforce(int argc, char **argv);
  void list_extforces(std::ostream &os);
  int size(void) const { return extforce_list.size(); }
  double energy(const std::vector<std::vector<double> > &r,
                std::vector<std::vector<double> > &f) const;
  void setup(AtomSet& atoms);
  void reset(void);
};
#endif