JDFTx  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CommandMinimize Struct Referenceabstract

Abstract base class for all the minimize commands. More...

#include <minimize.h>

Inheritance diagram for CommandMinimize:
Command

Public Member Functions

 CommandMinimize (string systemName, string path)
 provide a command called systemName-minimize in specified section
 
void process (ParamList &pl, Everything &e)
 Process the command from its command line. More...
 
void printStatus (Everything &e, int iRep)
 Print a command line that would result in the current status. More...
 

Protected Member Functions

virtual MinimizeParamstarget (Everything &e)=0
 Derived class should specify where the parameters are stored. More...
 
- Protected Member Functions inherited from Command
 Command (string name, string path)
 
void require (string)
 utility to add a command to the requires list
 
void forbid (string)
 utility to add a command to the forbids list
 

Additional Inherited Members

- Public Attributes inherited from Command
string name
 Identifier for the command in the input file. Must be unique!
 
string format
 Usage syntax for the command (excluding the command name)
 
string comments
 Detailed help for the command which goes into jdftx -t as well as the Doxygen manual. Please check formatting in both versions.
 
string section
 Which executable the command belongs to, and hence which section it must be documented under.
 
string category
 Category of command under which to list the documentation.
 
string subcategory
 Subcategory of command under which to list the documentation.
 
std::set< stringrequires
 Names of other commands that this one requires; those commands will be processed before this one.
 
std::set< stringforbids
 Names of other commands that this one is incompatibile with.
 
bool allowMultiple
 Whether this command can occur multiple times in an input file (default: false).
 
bool hasDefault
 Whether this command has a default (default: false). If true, process() will be called with an empty parameter list.
 
string emptyParamError
 Error message if command is manually issued with no parameters. Ddefault: empty i.e. allow empty parameter list.
 

Detailed Description

Abstract base class for all the minimize commands.

Member Function Documentation

void CommandMinimize::printStatus ( Everything e,
int  iRep 
)
virtual

Print a command line that would result in the current status.

Parameters
eObjct of class Everything whose status to reproduce
iRepFor commands with allowMultiple=true, printStatus will be called multiple times and iRep is the index of the present call

Implements Command.

void CommandMinimize::process ( ParamList pl,
Everything e 
)
virtual

Process the command from its command line.

Parameters
plParser utility object that simplifies extraction of parameters from the commandline
eObject of class Everything into which the settings extracted form this command should be stored
Exceptions
stringOn any syntax / parse errors, throw a string containing a brief error (preferably single phrase) error message.

Implements Command.

virtual MinimizeParams& CommandMinimize::target ( Everything e)
protectedpure virtual

Derived class should specify where the parameters are stored.

Parameters
eReference to Everything
Returns
Return reference to the relevant MinimizeParams that this command should operate on.

The documentation for this struct was generated from the following file: