JDFTx  1.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
parser.h File Reference

Functions for parsing JDFTx input files. More...

#include <electronic/common.h>
#include <vector>

Functions

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...
 

Detailed Description

Functions for parsing JDFTx input files.

Function Documentation

void parse ( std::vector< std::pair< string, string > >  input,
Everything everything,
bool  printDefaults = false 
)

Parse input and initialize everything.

Parameters
inputList o commands and arguments as obtained by readInputFile()
everythingReference to everything to initialize
printDefaultsIf 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.

Parameters
eA reference to Everything
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.

Parameters
filenameName of file to read, or empty for reading from stdin
Returns
Pairs of commands and their argument lists
void writeCommandManual ( Everything e,
string  section 
)

Output command docuemntation in Doxygen format which gets converted to the HTML and LaTeX manuals.

Parameters
eA reference to Everything
sectionWhich executable to generate documentation for i.e. only include commands whose section matches this