Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
OutputFile Class Reference

Description

All meta-data that is shared for one output file type for one bias.

Public Member Functions

 OutputFile (const std::string &filename, const std::string &baseTitle, int numBias, int biasIndex)
 Constructor, Set the output base file name and title. More...
 
void initializeAwhOutputFile (int subBlockStart, int numSubBlocks, const AwhBiasParams *awhBiasParams, AwhGraphSelection graphSelection, EnergyUnit energyUnit, real kTValue)
 Initializes the output file setup for the AWH output. More...
 
void initializeFrictionOutputFile (int subBlockStart, int numSubBlocks, const AwhBiasParams *awhBiasParams, EnergyUnit energyUnit, real kTValue)
 Initializes the output file setup for the fricion output. More...
 
FILE * openBiasOutputFile (double time, const gmx_output_env_t *oenv) const
 Opens a single output file for a bias, prints title and legends. More...
 
void writeData (const t_enxblock &block, int subBlockStart, FILE *fp) const
 Writes data selected from block to file. More...
 

Constructor & Destructor Documentation

OutputFile::OutputFile ( const std::string &  filename,
const std::string &  baseTitle,
int  numBias,
int  biasIndex 
)

Constructor, Set the output base file name and title.

Result is a valid object, but will produce empty output files.

Parameters
[in]filenameThe name for output files, frame time, and possibly bias number, will be added per file/frame.
[in]baseTitleThe base title of the plot, the bias number might be added.
[in]numBiasThe total number of AWH biases in the system.
[in]biasIndexThe index of this bias.

Member Function Documentation

void OutputFile::initializeAwhOutputFile ( int  subBlockStart,
int  numSubBlocks,
const AwhBiasParams *  awhBiasParams,
AwhGraphSelection  graphSelection,
EnergyUnit  energyUnit,
real  kTValue 
)

Initializes the output file setup for the AWH output.

Parameters
[in]subBlockStartIndex of the first sub-block to write in the energy frame.
[in]numSubBlocksThe total number of sub-blocks in the framw.
[in]awhBiasParamsThe AWH bias parameters.
[in]graphSelectionSelects which graphs to plot.
[in]energyUnitRequested energy unit in output.
[in]kTValuekB*T in kJ/mol.
void OutputFile::initializeFrictionOutputFile ( int  subBlockStart,
int  numSubBlocks,
const AwhBiasParams *  awhBiasParams,
EnergyUnit  energyUnit,
real  kTValue 
)

Initializes the output file setup for the fricion output.

Initializes the output file setup for the fricion output (note that the filename is not set here).

Parameters
[in]subBlockStartIndex of the first sub-block to write in the energy frame.
[in]numSubBlocksThe total number of sub-blocks in the framw.
[in]awhBiasParamsThe AWH bias parameters.
[in]energyUnitRequested energy unit in output.
[in]kTValuekB*T in kJ/mol.
FILE * OutputFile::openBiasOutputFile ( double  time,
const gmx_output_env_t *  oenv 
) const

Opens a single output file for a bias, prints title and legends.

Parameters
[in]timeThe time for of frame to be written.
[in]oenvThe output environment.
Returns
the file pointer.
void OutputFile::writeData ( const t_enxblock &  block,
int  subBlockStart,
FILE *  fp 
) const

Writes data selected from block to file.

Prints data selected by outputFile from block to fp.

Parameters
[in]blockThe energy block with the data to write.
[in]subBlockStartThe sub-block start index.
[in]fpThe file pointer.

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