Files | |
file | command.h |
Provides the base class and various helpers for defining commands in the input file. | |
file | minimize.h |
Provides base class for defining the minimize commands. | |
file | ParamList.h |
Helper class for parsing command lines in input file. | |
file | parser.h |
Functions for parsing JDFTx input files. | |
Classes | |
class | Command |
Abstract base class for all commands. More... | |
class | DeprecatedCommand |
Base class for a deprecated command which will translate old syntax into the new command that replaces it. More... | |
struct | LinkDescription< Enum > |
Generate a description functor for addDescriptions() from an EnumStringMap. More... | |
struct | CommandMinimize |
Abstract base class for all the minimize commands. More... | |
class | ParamList |
Wrapper to std::istringstream that eases parsing of input file command lines. More... | |
Functions | |
std::map< string, Command * > & | getCommandMap () |
Retrieve the map from command names to objects created during static initialization. | |
std::map< string, DeprecatedCommand * > & | getDeprecatedMap () |
Retrieve the map from deprecated command names to objects. | |
template<typename GetDescription > | |
string | addDescriptions (string optionList, const GetDescription &getDescription, string spacer="\n+ ") |
Process the EnumStringMap::optionList() to add descriptions using an arbitrary functor. More... | |
string | nullDescription (const string &) |
Null description function that can be used with addDescriptions(). This can be useful for simply reformatting EnumStringMap::optionList() | |
template<typename Enum > | |
LinkDescription< Enum > | linkDescription (const EnumStringMap< Enum > &nameMap, const EnumStringMap< Enum > &descMap) |
Helper function to select appropriate LinkDescription<> by overloading. More... | |
std::shared_ptr< class SpeciesInfo > | findSpecies (string id, Everything &e, bool addSpecies=false) |
Find species matching an id (and create it from a wildcard if necessary) More... | |
bool | isReadable (string fname) |
Check if file is readable in an MPI friendly way. This function must be called from all processes, the file will be checked on one process and the result broadcast to all processes. More... | |
void | setAvailableFilename (string filenamePattern, string varName, string &target) |
void | setAvailableFilenames (string filenamePattern, Everything &e) |
Apply setAvailableFilename for all standard input variables (action of CommandInitialState) | |
std::vector< std::pair< string, string > > | readInputFile (string filename) |
Read input from file into an array of command/argument-list pairs. This routine handles comments, line continuation as well as environment substitution. In MPI mode, the input will be read only on head and distributed to all the processes. More... | |
void | parse (std::vector< std::pair< string, string > > input, Everything &everything, bool printDefaults=false) |
Parse input and initialize everything. More... | |
void | printDefaultTemplate (Everything &e) |
Output command documentation in the form of an input file template. This will output the comments for all the commands, along with the default command line, if any. More... | |
void | writeCommandManual (Everything &e, string section) |
Output command docuemntation in Doxygen format which gets converted to the HTML and LaTeX manuals. More... | |
string addDescriptions | ( | string | optionList, |
const GetDescription & | getDescription, | ||
string | spacer = "\n+ " |
||
) |
Process the EnumStringMap::optionList() to add descriptions using an arbitrary functor.
GetDescription | Function/functor with the signature string GetDescription(const string&) . |
optionList | List of strings separated by pipe characters as returned by EnumStringMap::optionList() |
getDescription | A function/functor that returns the description given an option from optionList |
spacer | Spacer to insert before each option/description pair |
std::shared_ptr<class SpeciesInfo> findSpecies | ( | string | id, |
Everything & | e, | ||
bool | addSpecies = false |
||
) |
Find species matching an id (and create it from a wildcard if necessary)
id | Psuedopotential species identifier string (typically chemical symbol) |
e | Reference to Everything |
addSpecies | Whether to add species from wildcards when trying to find id. |
bool isReadable | ( | string | fname | ) |
Check if file is readable in an MPI friendly way. This function must be called from all processes, the file will be checked on one process and the result broadcast to all processes.
fname | File name to check for |
LinkDescription<Enum> linkDescription | ( | const EnumStringMap< Enum > & | nameMap, |
const EnumStringMap< Enum > & | descMap | ||
) |
Helper function to select appropriate LinkDescription<> by overloading.
Enum | The template parameter of EnumStringMap |
nameMap | Link between enum members to corresponding name strings |
descMap | Link between enum members to corresponding description strings |
void parse | ( | std::vector< std::pair< string, string > > | input, |
Everything & | everything, | ||
bool | printDefaults = false |
||
) |
Parse input and initialize everything.
input | List o commands and arguments as obtained by readInputFile() |
everything | Reference to everything to initialize |
printDefaults | If true, print status of commands that were invoked by default in addition to those invoked manually |
void printDefaultTemplate | ( | Everything & | e | ) |
Output command documentation in the form of an input file template. This will output the comments for all the commands, along with the default command line, if any.
e | A reference to Everything |
Read input from file into an array of command/argument-list pairs. This routine handles comments, line continuation as well as environment substitution. In MPI mode, the input will be read only on head and distributed to all the processes.
filename | Name of file to read, or empty for reading from stdin |
Set target to the filename for reading variable varName from file with pattern specified by filenamePattern if that file exists and is readable
void writeCommandManual | ( | Everything & | e, |
string | section | ||
) |
Output command docuemntation in Doxygen format which gets converted to the HTML and LaTeX manuals.
e | A reference to Everything |
section | Which executable to generate documentation for i.e. only include commands whose section matches this |