Gromacs  2025.0-dev-20241011-013a99c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::AnalysisDataVectorPlotModule Class Reference

#include <gromacs/analysisdata/modules/plot.h>

+ Inheritance diagram for gmx::AnalysisDataVectorPlotModule:
+ Collaboration diagram for gmx::AnalysisDataVectorPlotModule:

Description

Plotting module specifically for data consisting of vectors.

See AbstractPlotModule for common plotting options.

Public Member Functions

 AnalysisDataVectorPlotModule (const AnalysisDataPlotSettings &settings)
 Creates AnalysisDataVectorPlotModule and assign common settings.
 
void setWriteX (bool bWrite)
 Set whether to write X component.
 
void setWriteY (bool bWrite)
 Set whether to write Y component.
 
void setWriteZ (bool bWrite)
 Set whether to write Z component.
 
void setWriteNorm (bool bWrite)
 Set whether to write norm of the vector.
 
void setWriteMask (const bool bWrite[4])
 Set mask for what to write.
 
void pointsAdded (const AnalysisDataPointSetRef &points) override
 Called one or more times during each data frame. More...
 
- Public Member Functions inherited from gmx::AbstractPlotModule
void setSettings (const AnalysisDataPlotSettings &settings)
 Set common settings for the plotting.
 
void setFileName (const std::string &filename)
 Set the output file name. More...
 
void setPlainOutput (bool bPlain)
 Set plain output. More...
 
void setErrorsAsSeparateColumn (bool bSeparate)
 Plot errors as a separate output column after each value column.
 
void setOmitX (bool bOmitX)
 Omit the X coordinates from the output. More...
 
void setTitle (const char *title)
 Set plot title.
 
void setTitle (const std::string &title)
 Set plot title. More...
 
void setSubtitle (const char *subtitle)
 Set plot subtitle.
 
void setSubtitle (const std::string &subtitle)
 Set plot subtitle. More...
 
void setXLabel (const char *label)
 Set X axis label.
 
void setXAxisIsTime ()
 Treat X axis as time. More...
 
void setYLabel (const char *label)
 Set Y axis label.
 
void setLegend (int nsets, const char *const *setname)
 Add legend from an array of strings. More...
 
void appendLegend (const char *setname)
 Add a legend string for the next data set. More...
 
void appendLegend (const std::string &setname)
 Add a legend string for the next data set. More...
 
void setXFormat (int width, int precision, char format= 'f')
 Set field width and precision for X value output.
 
void setYFormat (int width, int precision, char format= 'f')
 Set field width and precision for Y value output.
 
int flags () const override
 Returns properties supported by the module. More...
 
void dataStarted (AbstractAnalysisData *data) override
 Called (once) when the data has been set up properly. More...
 
void frameStarted (const AnalysisDataFrameHeader &header) override
 Called at the start of each data frame. More...
 
void frameFinished (const AnalysisDataFrameHeader &header) override
 Called when a data frame is finished. More...
 
void dataFinished () override
 Called (once) when no more data is available. More...
 

Additional Inherited Members

- Public Types inherited from gmx::IAnalysisDataModule
enum  Flag {
  efAllowMultipoint = 1 << 0, efOnlyMultipoint = 1 << 1, efAllowMulticolumn = 1 << 2, efAllowMissing = 1 << 3,
  efAllowMultipleDataSets = 1 << 4
}
 Possible flags for flags(). More...
 
- Protected Member Functions inherited from gmx::AbstractPlotModule
 AbstractPlotModule (const AnalysisDataPlotSettings &settings)
 Creates AbstractPlotModule and assign common settings.
 
bool isFileOpen () const
 Whether an output file has been opened.
 
void writeValue (const AnalysisDataValue &value) const
 Appends a single value to the current output line. More...
 

Member Function Documentation

void gmx::AnalysisDataVectorPlotModule::pointsAdded ( const AnalysisDataPointSetRef points)
overridevirtual

Called one or more times during each data frame.

Parameters
[in]pointsSet of points added (also provides access to frame-level data).
Exceptions
APIErrorif the provided data is not compatible.
unspecifiedCan throw any exception required by the implementing class to report errors.

Can be called once or multiple times for a frame. For all data objects currently implemented in the library (and all objects that will use AnalysisDataStorage for internal implementation), it is called exactly once for each frame if the data is not multipoint, but currently this restriction is not enforced.

Implements gmx::AbstractPlotModule.


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