Commit 34b6aa08 by Francois Gygi

added plot command


git-svn-id: http://qboxcode.org/svn/qb/trunk@705 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 0b345de0
This diff is collapsed. Click to expand it.
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2008 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/>.
//
////////////////////////////////////////////////////////////////////////////////
//
// PlotCmd.h:
//
////////////////////////////////////////////////////////////////////////////////
// $Id: PlotCmd.h,v 1.1 2009-06-29 09:59:41 fgygi Exp $
#ifndef PLOTCMD_H
#define PLOTCMD_H
#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;
#include "UserInterface.h"
#include "Sample.h"
class PlotCmd : public Cmd
{
public:
Sample *s;
PlotCmd(Sample *sample) : s(sample) {};
char *name(void) const { return "plot"; }
char *help_msg(void) const
{
return
"\n plot\n\n"
" syntax: plot filename\n"
" plot -density filename\n"
" plot -wf <n> filename\n"
" plot -wf <nmin> <nmax> filename\n\n"
" The plot command creates a plot file in xyz or cube format.\n\n"
" The default format is xyz, used for plotting atoms only.\n"
" When using the -density option, the charge density is written\n"
" after the atomic positions.\n\n";
}
int action(int argc, char **argv);
};
#endif
......@@ -15,7 +15,7 @@
// qb.C
//
////////////////////////////////////////////////////////////////////////////////
// $Id: qb.C,v 1.64 2009-03-08 01:15:19 fgygi Exp $
// $Id: qb.C,v 1.65 2009-06-29 09:59:41 fgygi Exp $
#include <iostream>
#include <string>
......@@ -53,6 +53,7 @@ using namespace std;
#include "ListSpeciesCmd.h"
#include "LoadCmd.h"
#include "MoveCmd.h"
#include "PlotCmd.h"
#include "PrintCmd.h"
#include "QuitCmd.h"
#include "RandomizeWfCmd.h"
......@@ -239,6 +240,7 @@ int main(int argc, char **argv, char **envp)
ui.addCmd(new ListSpeciesCmd(s));
ui.addCmd(new LoadCmd(s));
ui.addCmd(new MoveCmd(s));
ui.addCmd(new PlotCmd(s));
ui.addCmd(new PrintCmd(s));
ui.addCmd(new QuitCmd(s));
ui.addCmd(new RandomizeWfCmd(s));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment