1 //////////////////////////////////////////////////////////////////////////////// 2 // 3 // Copyright (c) 2015 The Regents of the University of California 4 // 5 // This file is part of Qbox 6 // 7 // Qbox is distributed under the terms of the GNU General Public License 8 // as published by the Free Software Foundation, either version 2 of 9 // the License, or (at your option) any later version. 10 // See the file COPYING in the root directory of this distribution 11 // or <http://www.gnu.org/licenses/>. 12 // 13 //////////////////////////////////////////////////////////////////////////////// 14 // 15 // PartialChargeCmd.h: 16 // 17 //////////////////////////////////////////////////////////////////////////////// 18 19 #ifndef PARTIALCHARGECMD_H 20 #define PARTIALCHARGECMD_H 21 22 #include <iostream> 23 #include <cstdlib> 24 #include <string> 25 using namespace std; 26 27 #include "UserInterface.h" 28 #include "Sample.h" 29 30 class PartialChargeCmd : public Cmd 31 { 32 public: 33 34 Sample *s; 35 PartialChargeCmd(Sample * sample)36 PartialChargeCmd(Sample *sample) : s(sample) {}; 37 name(void)38 const char *name(void) const { return "partial_charge"; } help_msg(void)39 const char *help_msg(void) const 40 { 41 return 42 "\n partial_charge\n\n" 43 " syntax: partial_charge [-spin {1|2}] name radius\n" 44 " The partial_charge command computes the amount of charge\n" 45 " density contained in a sphere centered on an atom.\n" 46 " When using the -spin option, the charge of the given spin\n" 47 " is computed.\n\n"; 48 } 49 50 int action(int argc, char **argv); 51 }; 52 #endif 53