Gromacs  5.1.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Typedefs | Enumerations | Functions
gmx Namespace Reference

Description

Generic GROMACS namespace.

Declares registerLegacyModules().

Author
Teemu Murtola teemu.nosp@m..mur.nosp@m.tola@.nosp@m.gmai.nosp@m.l.com

Namespaces

 anonymous_namespace{analysismodule.cpp}
 
 anonymous_namespace{arrayref.cpp}
 
 anonymous_namespace{autocorr.cpp}
 
 anonymous_namespace{cmdlinehelpcontext.cpp}
 
 anonymous_namespace{cmdlinehelpmodule.cpp}
 
 anonymous_namespace{cmdlinehelpwriter.cpp}
 
 anonymous_namespace{cmdlineinit.cpp}
 
 anonymous_namespace{cmdlinemodulemanager.cpp}
 
 anonymous_namespace{cmdlineoptionsmodule.cpp}
 
 anonymous_namespace{cmdlineprogramcontext.cpp}
 
 anonymous_namespace{errorcodes.cpp}
 
 anonymous_namespace{exceptions.cpp}
 
 anonymous_namespace{expfit.cpp}
 
 anonymous_namespace{filenameoption.cpp}
 
 anonymous_namespace{filenameoptionmanager.cpp}
 
 anonymous_namespace{fileredirector.cpp}
 
 anonymous_namespace{futil.cpp}
 
 anonymous_namespace{helpwritercontext.cpp}
 
 anonymous_namespace{histogram.cpp}
 
 anonymous_namespace{init.cpp}
 
 anonymous_namespace{insert-molecules.cpp}
 
 anonymous_namespace{modules.cpp}
 
 anonymous_namespace{nbsearch.cpp}
 
 anonymous_namespace{pargs.cpp}
 
 anonymous_namespace{programcontext.cpp}
 
 anonymous_namespace{rstparser.cpp}
 
 anonymous_namespace{selectioncollection.cpp}
 
 anonymous_namespace{selhelp.cpp}
 
 anonymous_namespace{shellcompletions.cpp}
 
 anonymous_namespace{stringutil.cpp}
 
 anonymous_namespace{timeunitmanager.cpp}
 
 internal
 Internal GROMACS namespace.
 
 test
 Testing utilities namespace.
 

Classes

class  AbstractAnalysisData
 Abstract base class for all objects that provide data. More...
 
class  AnalysisData
 Parallelizable data container for raw data. More...
 
class  AnalysisDataHandle
 Handle for inserting data into AnalysisData. More...
 
class  AbstractAnalysisArrayData
 Abstract base class for data objects that present in-memory data. More...
 
class  AnalysisArrayData
 Simple in-memory data array. More...
 
class  AnalysisDataValue
 Value type for representing a single value in analysis data objects. More...
 
class  AnalysisDataFrameHeader
 Value type for storing frame-level information for analysis data. More...
 
class  AnalysisDataPointSetRef
 Value type wrapper for non-mutable access to a set of data column values. More...
 
class  AnalysisDataFrameRef
 Value type wrapper for non-mutable access to a data frame. More...
 
class  AnalysisDataModuleInterface
 Interface for a module that gets notified whenever data is added. More...
 
class  AnalysisDataModuleSerial
 Convenience base class for serial analysis data modules. More...
 
class  AnalysisDataModuleParallel
 Convenience base class for parallel analysis data modules. More...
 
class  AnalysisDataModuleManager
 Encapsulates handling of data modules attached to AbstractAnalysisData. More...
 
class  AnalysisDataProxy
 Internal implementation class used to implement column modules. More...
 
class  AnalysisDataStorageFrame
 Allows assigning values for a data frame in AnalysisDataStorage. More...
 
class  AnalysisDataStorage
 Helper class that implements storage of data. More...
 
class  AnalysisDataFrameLocalDataSetHandle
 Handle to a single data set within frame-local data array. More...
 
class  AnalysisDataFrameLocalDataHandle
 Handle to a single frame data within frame-local data array. More...
 
class  AnalysisDataFrameLocalData
 Container for an array of frame-local values that supports parallel data processing. More...
 
class  AnalysisDataAverageModule
 Data module for independently averaging each column in input data. More...
 
class  AnalysisDataFrameAverageModule
 Data module for averaging of columns for each frame. More...
 
class  AnalysisDataDisplacementModule
 Data module for calculating displacements. More...
 
class  AnalysisDataFrameAverager
 Helper class for modules that average values over frames. More...
 
class  AnalysisHistogramSettingsInitializer
 Provides "named parameter" idiom for constructing histograms. More...
 
class  AnalysisHistogramSettings
 Contains parameters that specify histogram bin locations. More...
 
class  AbstractAverageHistogram
 Base class for representing histograms averaged over frames. More...
 
class  AnalysisDataSimpleHistogramModule
 Data module for per-frame histograms. More...
 
class  AnalysisDataWeightedHistogramModule
 Data module for per-frame weighted histograms. More...
 
class  AnalysisDataBinAverageModule
 Data module for bin averages. More...
 
class  AnalysisDataLifetimeModule
 Data module for computing lifetime histograms for columns in input data. More...
 
class  AnalysisDataPlotSettings
 Common settings for data plots. More...
 
class  AbstractPlotModule
 Abstract data module for writing data into a file. More...
 
class  AnalysisDataPlotModule
 Plotting module for straightforward plotting of data. More...
 
class  AnalysisDataVectorPlotModule
 Plotting module specifically for data consisting of vectors. More...
 
class  AnalysisDataParallelOptions
 Parallelization options for analysis data objects. More...
 
class  CommandLineHelpContext
 Context information for writing out command-line help. More...
 
class  GlobalCommandLineHelpContext
 Helper for passing CommandLineHelpContext into parse_common_args(). More...
 
class  CommandLineHelpModule
 Command-line module for producing help. More...
 
class  ConstArrayRef
 STL-like container for non-mutable interface to a C array (or part of a std::vector). More...
 
class  CommandLineHelpWriter
 Writes help information for Options in ascii format. More...
 
class  CommandLineModuleSettings
 Settings to pass information between a module and the general runner. More...
 
class  CommandLineModuleInterface
 Module that can be run from command line using CommandLineModuleManager. More...
 
class  CommandLineModuleGroupData
 Internal data for a CommandLineModuleManager module group. More...
 
class  CommandLineCommonOptionsHolder
 Encapsulates some handling of common options to the wrapper binary. More...
 
class  CommandLineModuleManager
 Implements a wrapper command-line interface for multiple modules. More...
 
class  CommandLineModuleGroup
 Handle to add content to a group added with CommandLineModuleManager::addModuleGroup(). More...
 
class  CommandLineOptionsModuleInterface
 Module that can be run from a command line and uses gmx::Options for argument processing. More...
 
class  CommandLineParser
 Implements command-line parsing for Options objects. More...
 
class  ExecutableEnvironmentInterface
 Allows customization of the way various directories are found by CommandLineProgramContext. More...
 
class  CommandLineProgramContext
 Program context implementation for command line programs. More...
 
class  BinaryInformationSettings
 Settings for printBinaryInformation(). More...
 
class  BasicVector
 C++ class for 3D vectors. More...
 
class  ArrayRef
 STL-like container for an interface to a C array (or part of a std::vector). More...
 
class  TextTableFormatter
 Formats rows of a table for text output. More...
 
class  HelpManager
 Helper for providing interactive online help. More...
 
class  AbstractSimpleHelpTopic
 Abstract base class for help topics that have simple text and no subtopics. More...
 
class  AbstractCompositeHelpTopic
 Abstract base class for help topics that have simple text and subtopics. More...
 
class  SimpleHelpTopic
 Template for simple implementation of AbstractSimpleHelpTopic. More...
 
class  CompositeHelpTopic
 Template for simple implementation of AbstractCompositeHelpTopic. More...
 
class  HelpTopicInterface
 Provides a single online help topic. More...
 
class  HelpLinks
 Hyperlink data for writing out help. More...
 
class  HelpWriterContext
 Context information for writing out help. More...
 
class  RstParagraphIterator
 Iterator over reStructuredText paragraphs. More...
 
class  OptionStorageTemplate
 Templated base class for constructing option value storage classes. More...
 
class  AbstractOption
 Abstract base class for specifying option properties. More...
 
class  OptionTemplate
 Templated base class for constructing concrete option settings classes. More...
 
class  OptionInfo
 Gives information and allows modifications to an option after creation. More...
 
class  AbstractOptionStorage
 Abstract base class for converting, validating, and storing option values. More...
 
class  BooleanOption
 Specifies an option that provides boolean values. More...
 
class  IntegerOption
 Specifies an option that provides integer values. More...
 
class  Int64Option
 Specifies an option that provides 64-bit integer values. More...
 
class  DoubleOption
 Specifies an option that provides floating-point (double) values. More...
 
class  FloatOption
 Specifies an option that provides floating-point (float) values. More...
 
class  StringOption
 Specifies an option that provides string values. More...
 
class  BooleanOptionInfo
 Wrapper class for accessing boolean option information. More...
 
class  IntegerOptionInfo
 Wrapper class for accessing integer option information. More...
 
class  Int64OptionInfo
 Wrapper class for accessing 64-bit integer option information. More...
 
class  DoubleOptionInfo
 Wrapper class for accessing floating-point option information. More...
 
class  FloatOptionInfo
 Wrapper class for accessing floating-point option information. More...
 
class  StringOptionInfo
 Wrapper class for accessing string option information. More...
 
class  BooleanOptionStorage
 Converts, validates, and stores boolean values. More...
 
class  IntegerOptionStorage
 Converts, validates, and stores integer values. More...
 
class  Int64OptionStorage
 Converts, validates, and stores integer values. More...
 
class  DoubleOptionStorage
 Converts, validates, and stores floating-point (double) values. More...
 
class  FloatOptionStorage
 Converts, validates, and stores floating-point (float) values. More...
 
class  StringOptionStorage
 Converts, validates, and stores string values. More...
 
class  FileNameOption
 Specifies an option that provides file names. More...
 
class  FileNameOptionInfo
 Wrapper class for accessing file name option information. More...
 
class  FileNameOptionManager
 Handles interaction of file name options with global options. More...
 
class  FileNameOptionStorage
 Converts, validates, and stores file names. More...
 
class  OptionManagerContainer
 Container to keep managers added with Options::addManager() and pass them to options. More...
 
class  OptionManagerInterface
 Base class for option managers. More...
 
class  Options
 Collection of options. More...
 
class  OptionsAssigner
 Decorator class for assigning values to Options. More...
 
class  OptionsVisitor
 Pure interface for visiting options in a Options object. More...
 
class  OptionsTypeVisitor
 Abstract base class for visiting options of a particular type. More...
 
class  OptionsIterator
 Decorator class for visiting options in a Options object. More...
 
class  OptionsModifyingVisitor
 Pure interface for visiting options in a Options object, allowing modifications. More...
 
class  OptionsModifyingTypeVisitor
 Abstract base class for visiting options of a particular type, allowing modifications. More...
 
class  OptionsModifyingIterator
 Decorator class for visiting options in a Options object, allowing changes. More...
 
class  TimeUnitManager
 Provides common functionality for time unit conversions. More...
 
class  SelectionCompiler
 Implements selection compilation. More...
 
class  AnalysisNeighborhoodPositions
 Input positions for neighborhood searching. More...
 
class  AnalysisNeighborhood
 Neighborhood searching for analysis tools. More...
 
class  AnalysisNeighborhoodPair
 Value type to represent a pair of positions found in neighborhood searching. More...
 
class  AnalysisNeighborhoodSearch
 Initialized neighborhood search with a fixed set of reference positions. More...
 
class  AnalysisNeighborhoodPairSearch
 Initialized neighborhood pair search with a fixed set of positions. More...
 
class  SelectionParserValue
 Describes a parsed value, possibly resulting from expression evaluation. More...
 
class  SelectionParserParameter
 Describes a parsed method parameter. More...
 
class  PositionCalculationCollection
 Collection of gmx_ana_poscalc_t structures for the same topology. More...
 
class  Selection
 Provides access to a single selection. More...
 
class  SelectionPosition
 Provides access to information about a single selected position. More...
 
class  SelectionEvaluator
 Implements selection evaluation. More...
 
class  SelectionCollection
 Collection of selections. More...
 
class  SelectionFileOption
 Specifies a special option that provides selections from a file. More...
 
class  SelectionFileOptionInfo
 Wrapper class for accessing and modifying selection file option information. More...
 
class  SelectionFileOptionStorage
 Implementation for a special option for reading selections from files. More...
 
class  SelectionOption
 Specifies an option that provides selection(s). More...
 
class  SelectionOptionInfo
 Wrapper class for accessing and modifying selection option information. More...
 
class  SelectionOptionManager
 Handles interaction of selection options with other options and user input. More...
 
class  SelectionOptionStorage
 Converts, validates, and stores selection values. More...
 
struct  SelectionLocation
 Stores the location of a selection element in the selection text. More...
 
class  SelectionTreeElement
 Represents an element of a selection expression. More...
 
class  SelectionParserSymbol
 Single symbol for the selection parser. More...
 
class  SelectionParserSymbolIterator
 Input iterator for iterating symbols of a given type. More...
 
class  SelectionParserSymbolTable
 Symbol table for the selection parser. More...
 
class  TrajectoryAnalysisModuleData
 Base class for thread-local data storage during trajectory analysis. More...
 
class  TrajectoryAnalysisModule
 Base class for trajectory analysis modules. More...
 
class  TrajectoryAnalysisSettings
 Trajectory analysis module configuration object. More...
 
class  TopologyInformation
 Topology information passed to a trajectory analysis module. More...
 
class  TrajectoryAnalysisCommandLineRunner
 Runner class for command-line analysis tools. More...
 
class  SurfaceAreaCalculator
 Computes surface areas for a group of atoms/spheres. More...
 
class  TrajectoryAnalysisRunnerCommon
 Implements common trajectory analysis runner functionality. More...
 
struct  EmptyArrayRef
 Tag type to initialize empty array references. More...
 
class  PrivateImplPointer
 Helper class to manage a pointer to a private implementation class. More...
 
class  DataFileOptions
 Search parameters for DataFileFinder. More...
 
struct  DataFileInfo
 Information about a data file found by DataFileFinder::enumerateFiles(). More...
 
class  DataFileFinder
 Searches data files from a set of paths. More...
 
class  DirectoryEnumerator
 Lists files in a directory. More...
 
class  ExceptionInitializer
 Provides information for Gromacs exception constructors. More...
 
class  GromacsException
 Base class for all exception objects in Gromacs. More...
 
class  FileIOError
 Exception class for file I/O errors. More...
 
class  UserInputError
 Exception class for user input errors. More...
 
class  InvalidInputError
 Exception class for situations where user input cannot be parsed/understood. More...
 
class  InconsistentInputError
 Exception class for situations where user input is inconsistent. More...
 
class  SimulationInstabilityError
 Exception class for simulation instabilities. More...
 
class  InternalError
 Exception class for internal errors. More...
 
class  APIError
 Exception class for incorrect use of an API. More...
 
class  NotImplementedError
 Exception class for use of an unimplemented feature. More...
 
class  FileInitializer
 Parameters for creating a File object. More...
 
class  File
 Basic file object. More...
 
class  FileInputRedirectorInterface
 Allows overriding file existence checks from code that supports it. More...
 
class  FileOutputRedirectorInterface
 Allows capturing stdout and file output from code that supports it. More...
 
class  FlagsTemplate
 Template class for typesafe handling of combination of flags. More...
 
class  Regex
 Represents a regular expression. More...
 
class  MessageStringCollector
 Helper class for collecting message strings, optionally with context. More...
 
class  MessageStringContext
 Convenience class for creating a message context. More...
 
struct  InstallationPrefixInfo
 Provides information about installation prefix (see ProgramContextInterface::installationPrefix()). More...
 
class  ProgramContextInterface
 Provides context information about the program that is calling the library. More...
 
class  scoped_cptr
 Stripped-down version of scoped_ptr that uses sfree() or custom deleter. More...
 
class  StringFormatter
 Function object that wraps a call to formatString() that expects a single conversion argument, for use with algorithms. More...
 
class  IdentityFormatter
 Function object to implement the same interface as StringFormatter to use with strings that should not be formatted further. More...
 
class  TextLineWrapperSettings
 Stores settings for line wrapping. More...
 
class  TextLineWrapper
 Wraps lines to a predefined length. More...
 
class  gmx_unique_ptr
 Smart pointer for unique ownership. More...
 

Typedefs

typedef boost::shared_ptr
< AnalysisDataModuleInterface
AnalysisDataModulePointer
 Smart pointer for managing a generic analysis data module.
 
typedef ConstArrayRef
< AnalysisDataValue
AnalysisDataValuesRef
 Shorthand for reference to an array of data values.
 
typedef boost::shared_ptr
< AnalysisDataAverageModule
AnalysisDataAverageModulePointer
 Smart pointer to manage an AnalysisDataAverageModule object.
 
typedef boost::shared_ptr
< AnalysisDataFrameAverageModule
AnalysisDataFrameAverageModulePointer
 Smart pointer to manage an AnalysisDataFrameAverageModule object.
 
typedef boost::shared_ptr
< AnalysisDataDisplacementModule
AnalysisDataDisplacementModulePointer
 Smart pointer to manage an AnalysisDataDisplacementModule object.
 
typedef boost::shared_ptr
< AbstractAverageHistogram
AverageHistogramPointer
 Smart pointer to manage an AbstractAverageHistogram object.
 
typedef boost::shared_ptr
< AnalysisDataSimpleHistogramModule
AnalysisDataSimpleHistogramModulePointer
 Smart pointer to manage an AnalysisDataSimpleHistogramModule object.
 
typedef boost::shared_ptr
< AnalysisDataWeightedHistogramModule
AnalysisDataWeightedHistogramModulePointer
 Smart pointer to manage an AnalysisDataWeightedHistogramModule object.
 
typedef boost::shared_ptr
< AnalysisDataBinAverageModule
AnalysisDataBinAverageModulePointer
 Smart pointer to manage an AnalysisDataBinAverageModule object.
 
typedef boost::shared_ptr
< AnalysisDataLifetimeModule
AnalysisDataLifetimeModulePointer
 Smart pointer to manage an AnalysisDataLifetimeModule object.
 
typedef boost::shared_ptr
< AnalysisDataPlotModule
AnalysisDataPlotModulePointer
 Smart pointer to manage an AnalysisDataPlotModule object.
 
typedef boost::shared_ptr
< AnalysisDataVectorPlotModule
AnalysisDataVectorPlotModulePointer
 Smart pointer to manage an AnalysisDataVectorPlotModule object.
 
typedef std::map< std::string,
CommandLineModulePointer
CommandLineModuleMap
 Container type for mapping module names to module objects.
 
typedef gmx_unique_ptr
< CommandLineModuleGroupData >
::type 
CommandLineModuleGroupDataPointer
 Smart pointer type for managing a CommandLineModuleGroup.
 
typedef std::vector
< CommandLineModuleGroupDataPointer
CommandLineModuleGroupList
 Container type for keeping a list of module groups.
 
typedef gmx_unique_ptr
< CommandLineModuleInterface >
::type 
CommandLineModulePointer
 Smart pointer type for managing a CommandLineModuleInterface.
 
typedef boost::shared_ptr
< ExecutableEnvironmentInterface
ExecutableEnvironmentPointer
 Shorthand for a smart pointer to ExecutableEnvironmentInterface.
 
typedef BasicVector< realRVec
 Shorthand for C++ rvec-equivalent type.
 
typedef gmx_unique_ptr
< AbstractCompositeHelpTopic >
::type 
CompositeHelpTopicPointer
 Smart pointer type to manage a AbstractCompositeHelpTopic object.
 
typedef gmx_unique_ptr
< HelpTopicInterface >::type 
HelpTopicPointer
 Smart pointer type to manage a HelpTopicInterface object.
 
typedef FloatOption RealOption
 Typedef for either DoubleOption or FloatOption, depending on precision. More...
 
typedef FloatOptionInfo RealOptionInfo
 Typedef for either DoubleOptionInfo or FloatOptionInfo, depending on precision. More...
 
typedef FlagsTemplate< OptionFlagOptionFlags
 Holds a combination of OptionFlag values.
 
typedef std::list
< SelectionParserValue
SelectionParserValueList
 Container for a list of SelectionParserValue objects.
 
typedef gmx::gmx_unique_ptr
< SelectionParserValueList >
::type 
SelectionParserValueListPointer
 Smart pointer type for managing a SelectionParserValueList.
 
typedef std::list
< SelectionParserParameter
SelectionParserParameterList
 Container for a list of SelectionParserParameter objects.
 
typedef gmx::gmx_unique_ptr
< SelectionParserParameterList >
::type 
SelectionParserParameterListPointer
 Smart pointer type for managing a SelectionParserParameterList.
 
typedef std::vector< SelectionSelectionList
 Container of selections used in public selection interfaces.
 
typedef gmx_unique_ptr
< internal::SelectionData >
::type 
SelectionDataPointer
 Smart pointer for managing an internal selection data object.
 
typedef std::vector
< SelectionDataPointer
SelectionDataList
 Container for storing a list of selections internally.
 
typedef FlagsTemplate
< SelectionFlag
SelectionFlags
 Holds a collection of SelectionFlag values.
 
typedef boost::shared_ptr
< SelectionTreeElement
SelectionTreeElementPointer
 Smart pointer type for selection tree element pointers.
 
typedef void(* sel_evalfunc )(struct gmx_sel_evaluate_t *data, const SelectionTreeElementPointer &sel, gmx_ana_index_t *g)
 Function pointer for evaluating a gmx::SelectionTreeElement.
 
typedef boost::shared_ptr
< TrajectoryAnalysisModuleData
TrajectoryAnalysisModuleDataPointer
 Smart pointer to manage a TrajectoryAnalysisModuleData object.
 
typedef boost::shared_ptr
< TrajectoryAnalysisModule
TrajectoryAnalysisModulePointer
 Smart pointer to manage a TrajectoryAnalysisModule.
 
typedef void(* ErrorHandlerFunc )(int retcode, const char *msg, const char *file, int line)
 Callback function pointer type for error handlers. More...
 
typedef scoped_cptr< void > scoped_guard_sfree
 Simple guard which calls sfree. See scoped_cptr for details.
 

Enumerations

enum  ShellCompletionFormat { eShellCompletionFormat_Bash }
 Output format for ShellCompletionWriter. More...
 
enum  HelpOutputFormat { eHelpOutputFormat_Console, eHelpOutputFormat_Rst, eHelpOutputFormat_Other, eHelpOutputFormat_NR }
 Output format for help writing. More...
 
enum  OptionFileType {
  eftUnknown, eftTopology, eftTrajectory, eftPDB,
  eftIndex, eftPlot, eftGenericData, eftOptionFileType_NR
}
 Purpose of file(s) provided through an option.
 
enum  OptionFlag {
  efOption_Set = 1<<0, efOption_HasDefaultValue = 1<<1, efOption_ExplicitDefaultValue = 1<<2, efOption_ClearOnNextSet = 1<<3,
  efOption_Required = 1<<4, efOption_MultipleTimes = 1<<5, efOption_Hidden = 1<<6, efOption_Vector = 1<<8,
  efOption_DefaultValueIfSetExists = 1<<11, efOption_NoDefaultValue = 1<<9, efOption_DontCheckMinimumCount = 1<<10
}
 Flags for options. More...
 
enum  TimeUnit {
  eTimeUnit_fs, eTimeUnit_ps, eTimeUnit_ns, eTimeUnit_us,
  eTimeUnit_ms, eTimeUnit_s
}
 Time values for TimeUnitManager. More...
 
enum  SelectionStringMatchType { eStringMatchType_Auto, eStringMatchType_Exact, eStringMatchType_Wildcard, eStringMatchType_RegularExpression }
 String matching mode for string keyword expressions. More...
 
enum  SelectionFlag {
  efSelection_OnlyStatic = 1<<0, efSelection_OnlyAtoms = 1<<1, efSelection_DynamicMask = 1<<2, efSelection_DisallowEmpty = 1<<3,
  efSelection_EvaluateVelocities = 1<<5, efSelection_EvaluateForces = 1<<6
}
 Flags for options. More...
 
enum  ErrorCode {
  eeOK, eeOutOfMemory, eeFileNotFound, eeFileIO,
  eeInvalidInput, eeInconsistentInput, eeInstability, eeNotImplemented,
  eeInvalidValue, eeInvalidCall, eeInternalError, eeAPIError,
  eeRange, eeCommunication, eeUnknownError
}
 Possible error return codes from Gromacs functions. More...
 

Functions

AnalysisHistogramSettingsInitializer histogramFromRange (real min, real max)
 Initializes a histogram using a range and a bin width. More...
 
AnalysisHistogramSettingsInitializer histogramFromBins (real start, int nbins, real binwidth)
 Initializes a histogram using bin width and the number of bins. More...
 
CommandLineProgramContextinitForCommandLine (int *argc, char ***argv)
 Initializes the GROMACS library for command-line use. More...
 
void finalizeForCommandLine ()
 Deinitializes the GROMACS library after initForCommandLine(). More...
 
int processExceptionAtExitForCommandLine (const std::exception &ex)
 Handles an exception and deinitializes after initForCommandLine. More...
 
int runCommandLineModule (int argc, char *argv[], CommandLineModuleInterface *module)
 Implements a main() method that runs a single module. More...
 
int runCommandLineModule (int argc, char *argv[], const char *name, const char *description, CommandLineOptionsModuleInterface *(*factory)())
 Implements a main() method that runs a single module. More...
 
void writeCommandLineHelpCMain (const CommandLineHelpContext &context, const char *name, int(*mainFunction)(int argc, char *argv[]))
 Helper to implement CommandLineModuleInterface::writeHelp() with a C-like main() function that calls parse_common_args(). More...
 
void printBinaryInformation (FILE *fp, const ProgramContextInterface &programContext)
 Print basic information about the executable. More...
 
void printBinaryInformation (FILE *fp, const ProgramContextInterface &programContext, const BinaryInformationSettings &settings)
 Print basic information about the executable with custom settings. More...
 
template<typename ValueType >
static BasicVector< ValueType >
::RawArray * 
as_vec_array (BasicVector< ValueType > *x)
 Casts a gmx::BasicVector array into an equivalent raw C array.
 
template<typename ValueType >
static const BasicVector
< ValueType >::RawArray * 
as_vec_array (const BasicVector< ValueType > *x)
 Casts a gmx::BasicVector array into an equivalent raw C array.
 
static rvec * as_rvec_array (RVec *x)
 Casts a gmx::RVec array into an rvec array.
 
static const rvec * as_rvec_array (const RVec *x)
 Casts a gmx::RVec array into an rvec array.
 
HelpTopicPointer createSelectionHelpTopic ()
 */ More...
 
void registerTrajectoryAnalysisModules (CommandLineModuleManager *manager)
 Registers all trajectory analysis command-line modules. More...
 
template<typename T >
void swap (ArrayRef< T > &a, ArrayRef< T > &b)
 Simple swap method for ArrayRef objects. More...
 
template<typename T >
void swap (ConstArrayRef< T > &a, ConstArrayRef< T > &b)
 Simple swap method for ConstArrayRef objects. More...
 
const char * getErrorCodeString (int errorcode)
 Returns a short string description of an error code. More...
 
ErrorHandlerFunc setFatalErrorHandler (ErrorHandlerFunc handler)
 Sets callback function for handling errors. More...
 
void printFatalErrorMessage (FILE *fp, const std::exception &ex)
 Formats a standard fatal error message for reporting an exception. More...
 
std::string formatExceptionMessageToString (const std::exception &ex)
 Formats an error message for reporting an exception. More...
 
void formatExceptionMessageToFile (FILE *fp, const std::exception &ex)
 Formats an error message for reporting an exception. More...
 
int processExceptionAtExit (const std::exception &ex)
 Handles an exception that is causing the program to terminate. More...
 
int translateException (const std::exception &ex)
 Converts an exception into a return code.
 
FileInputRedirectorInterfacedefaultFileInputRedirector ()
 Returns default implementation for FileInputRedirectorInterface. More...
 
FileOutputRedirectorInterfacedefaultFileOutputRedirector ()
 Returns default implementation for FileOutputRedirectorInterface. More...
 
const DataFileFindergetLibraryFileFinder ()
 Gets a finder for locating data files from share/top/. More...
 
void setLibraryFileFinder (const DataFileFinder *finder)
 Sets a finder for location data files from share/top/. More...
 
bool regexMatch (const char *str, const Regex &regex)
 Matches a string with a regular expression. More...
 
bool regexMatch (const std::string &str, const Regex &regex)
 Matches a string with a regular expression. More...
 
void init (int *argc, char ***argv)
 Initializes the GROMACS library. More...
 
void finalize ()
 Deinitializes the GROMACS library. More...
 
const ProgramContextInterfacegetProgramContext ()
 Returns the global ProgramContextInterface instance. More...
 
void setProgramContext (const ProgramContextInterface *context)
 Sets the global ProgramContextInterface instance. More...
 
template<class T >
void sfree_wrapper (T *p)
 sfree wrapper to be used as scoped_cptr deleter
 
bool endsWith (const std::string &str, const char *suffix)
 Tests whether a string ends with another string. More...
 
std::string stripSuffixIfPresent (const std::string &str, const char *suffix)
 Removes a suffix from a string. More...
 
std::string stripString (const std::string &str)
 Removes leading and trailing whitespace from a string. More...
 
std::string formatString (const char *fmt,...)
 Formats a string (snprintf() wrapper). More...
 
std::vector< std::string > splitString (const std::string &str)
 Splits a string to whitespace separated tokens. More...
 
std::string replaceAll (const std::string &input, const char *from, const char *to)
 Replace all occurrences of a string with another string. More...
 
std::string replaceAll (const std::string &input, const std::string &from, const std::string &to)
 Replace all occurrences of a string with another string. More...
 
std::string replaceAllWords (const std::string &input, const char *from, const char *to)
 Replace whole words with others. More...
 
std::string replaceAllWords (const std::string &input, const std::string &from, const std::string &to)
 Replace whole words with others. More...
 
bool isNullOrEmpty (const char *str)
 Tests whether a string is null or empty. More...
 
bool startsWith (const std::string &str, const std::string &prefix)
 Tests whether a string starts with another string. More...
 
bool startsWith (const char *str, const char *prefix)
 Tests whether a string starts with another string. More...
 
template<typename InputIterator , typename FormatterType >
std::string formatAndJoin (InputIterator begin, InputIterator end, const char *separator, const FormatterType &formatter)
 Formats all the range as strings, and then joins them with a separator in between. More...
 
template<typename ContainerType , typename FormatterType >
std::string formatAndJoin (const ContainerType &container, const char *separator, const FormatterType &formatter)
 Formats all elements of the container as strings, and then joins them with a separator in between. More...
 
template<typename InputIterator >
std::string joinStrings (InputIterator begin, InputIterator end, const char *separator)
 Joins strings from a range with a separator in between. More...
 
template<typename ContainerType >
std::string joinStrings (const ContainerType &container, const char *separator)
 Joins strings from a container with a separator in between. More...
 
template<size_t count>
std::string joinStrings (const char *const (&array)[count], const char *separator)
 Joins strings from an array with a separator in between. More...
 
template<typename T >
boost::shared_ptr< T > & move (boost::shared_ptr< T > &ptr)
 Moves gmx::gmx_unique_ptr type pointers. More...
 

Enumeration Type Documentation

Output format for help writing.

Enumerator
eHelpOutputFormat_Console 

Plain text directly on the console.

eHelpOutputFormat_Rst 

reStructuredText for online manual and man pages.

eHelpOutputFormat_Other 

Used for extensions in other modules.

eHelpOutputFormat_NR 

Used for the number of output formats.

Flags for options.

These flags are not part of the public interface, even though they are in an installed header. They are needed in a few template class implementations.

Todo:
The flags related to default values are confusing, consider reorganizing them.
Enumerator
efOption_Set 

Option has been set.

efOption_HasDefaultValue 

The current value of the option is a programmatic default value.

efOption_ExplicitDefaultValue 

An explicit default value has been provided for the option.

efOption_ClearOnNextSet 

Next assignment to the option clears old values.

This flag is set when a new option source starts, such that values from the new source will overwrite old ones.

efOption_Required 

Option is required to be set.

efOption_MultipleTimes 

Option can be specified multiple times.

efOption_Hidden 

Option is hidden from standard help.

efOption_Vector 

Option value is a vector, but a single value is also accepted.

See Also
AbstractOption::setVector()
efOption_DefaultValueIfSetExists 

Option has a defaultValueIfSet() specified.

efOption_NoDefaultValue 

Option does not support default values.

efOption_DontCheckMinimumCount 

Storage object does its custom checking for minimum value count.

If this flag is set, the class derived from OptionStorageTemplate should implement processSetValues(), processAll(), and possible other functions it provides such that it always fails if not enough values are provided. This is useful to override the default check, which is done in OptionStorageTemplate::processSet().

Flags for options.

These flags are not part of the public interface, even though they are in an installed header. They are needed in the implementation of SelectionOption.

Enumerator
efSelection_DynamicMask 

Whether POS_MASKONLY should be used for output position evaluation.

efSelection_DisallowEmpty 

If set, unconditionally empty selections result in compilation errors.

efSelection_EvaluateVelocities 

Whether velocities of output positions should be evaluated.

efSelection_EvaluateForces 

Whether forces on output positions should be evaluated.

Function Documentation

void gmx::printBinaryInformation ( FILE *  fp,
const ProgramContextInterface &  programContext 
)

Print basic information about the executable.

Parameters
fpWhere to print the information to.
[in]programContextProgram information object to use.
void gmx::printBinaryInformation ( FILE *  fp,
const ProgramContextInterface &  programContext,
const BinaryInformationSettings &  settings 
)

Print basic information about the executable with custom settings.

Needed to read the members without otherwise unnecessary accessors.

Parameters
fpWhere to print the information to.
[in]programContextProgram information object to use.
[in]settingsSpecifies what to print.
See Also
BinaryInformationSettings
int gmx::processExceptionAtExitForCommandLine ( const std::exception &  ex)

Handles an exception and deinitializes after initForCommandLine.

Parameters
[in]exException that is the cause for terminating the program.
Returns
Return code to return from main().

This method should be called as the last thing before terminating the program because of an exception. See processExceptionAtExit() for details. Additionally this method undoes the work done by initForCommandLine.

Does not throw.

bool gmx::regexMatch ( const std::string &  str,
const Regex &  regex 
)

Matches a string with a regular expression.

Parameters
[in]strString to match.
[in]regexRegular expression to match.
Returns
true if regex matches the whole str.

Does not throw currently, but this is subject to change if/when better error handling is implemented (currently, it returns false if the matching fails, e.g., because of out-of-memory).

int gmx::runCommandLineModule ( int  argc,
char *  argv[],
CommandLineModuleInterface *  module 
)

Implements a main() method that runs a single module.

Parameters
argcargc passed to main().
argvargv passed to main().
moduleModule to run.

This method allows for uniform behavior for binaries that only contain a single module without duplicating any of the implementation from CommandLineModuleManager (startup headers, common options etc.).

The signature assumes that module construction does not throw (because otherwise the caller would need to duplicate all the exception handling code). It is possible to move the construction inside the try/catch in this method using an indirection similar to TrajectoryAnalysisCommandLineRunner::runAsMain(), but until that is necessary, the current approach leads to simpler code.

Usage:

int main(int argc, char *argv[])
{
CustomCommandLineModule module;
return gmx::runCommandLineModule(argc, argv, &module);
}

Does not throw. All exceptions are caught and handled internally.

int gmx::runCommandLineModule ( int  argc,
char *  argv[],
const char *  name,
const char *  description,
CommandLineOptionsModuleInterface *(*)()  factory 
)

Implements a main() method that runs a single module.

Parameters
argcargc passed to main().
argvargv passed to main().
[in]nameName for the module.
[in]descriptionShort description for the module.
factoryFactory method that creates the module to run.

This method allows for uniform behavior for binaries that only contain a single module without duplicating any of the implementation from CommandLineModuleManager (startup headers, common options etc.).

Usage:

class CustomCommandLineOptionsModule : public CommandLineOptionsModuleInterface
{
// <...>
};
static CommandLineOptionsModuleInterface *create()
{
return new CustomCommandLineOptionsModule();
}
int main(int argc, char *argv[])
{
argc, argv, "mymodule", "short description", &create);
}

Does not throw. All exceptions are caught and handled internally.

void gmx::setLibraryFileFinder ( const DataFileFinder *  finder)

Sets a finder for location data files from share/top/.

Parameters
[in]finderfinder to set (can be NULL to restore the default finder).

The library does not take ownership of finder. The provided object must remain valid until the global instance is changed by another call to setLibraryFileFinder().

The global instance is used by gmxlibfn() and libopen().

This method is not thread-safe. See setProgramContext(); the same constraints apply here as well.

Does not throw.