FoldInWsCmd.h 904 Bytes
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
////////////////////////////////////////////////////////////////////////////////
//
// FoldInWsCmd.h:
//
////////////////////////////////////////////////////////////////////////////////
// $Id: FoldInWsCmd.h,v 1.1 2008-03-21 00:26:19 fgygi Exp $

#ifndef FOLDINWSCMD_H
#define FOLDINWSCMD_H

#include <string>
#include <cstdlib>
#include <iostream>
using namespace std;

#include "UserInterface.h"
#include "Sample.h"

class FoldInWsCmd : public Cmd
{
  public:

  Sample *s;

  FoldInWsCmd(Sample *sample) : s(sample) {};

  char *name(void) const { return "fold_in_ws"; }
  char *help_msg(void) const
  {
    return
    "\n fold_in_ws\n\n"
    " syntax: fold_in_ws \n\n"
    "   The fold_in_ws command folds all atomic positions back in\n"
    "   the Wigner-Seitz cell of the current unit cell.\n\n";
  }

  int action(int argc, char **argv)
  {
    s->atoms.fold_in_ws();
    return 0;
  }
};
#endif