Gromacs  2022.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
gmx::LegacyMdrunOptions Class Reference

#include <gromacs/mdrun/legacymdrunoptions.h>

+ Collaboration diagram for gmx::LegacyMdrunOptions:

Description

This class provides the same command-line option functionality to both CLI and API sessions.

This class should not exist, but is necessary now to introduce support for the CLI and API without duplicating code. It should be eliminated following the TODOs below.

Warning
Instances provide lifetime scope for members that do not have effective lifetime management or which are frequently accessed unsafely. The caller is responsible for keeping a LegacyMdrunOptions object alive for as long as any consumers, direct or transitive.
Todo:
Modules in mdrun should acquire proper option handling so that all of these declarations and defaults are local to the modules.
Todo:
Contextual aspects, such as working directory and environment variable handling are more properly the role of SimulationContext, and should be moved there.

Public Member Functions

int updateFromCommandLine (int argc, char **argv, ArrayRef< const char * > desc)
 Parses the command-line input and prepares to start mdrun.
 

Public Attributes

MdrunOptions mdrunOptions
 Ongoing collection of mdrun options.
 
DomdecOptions domdecOptions
 Options for the domain decomposition.
 
gmx_hw_opt_t hw_opt
 Parallelism-related user options.
 
int nstlist_cmdline = 0
 Command-line override for the duration of a neighbor list with the Verlet scheme.
 
ReplicaExchangeParameters replExParams
 Parameters for replica-exchange simulations.
 
std::vector< t_filenmfilenames
 Filename options to fill from command-line argument values.
 
real pforce = -1
 Print a warning if any force is larger than this (in kJ/mol nm).
 
bool appendOption = true
 The value of the -append option.
 
gmx_output_env_t * oenv = nullptr
 Output context for writing text files. More...
 
rvec realddxyz = { 0, 0, 0 }
 Command line options, defaults, docs and storage for them to fill.
 
const char * ddrank_opt_choices [static_cast< int >(DdRankOrder::Count)+1]
 
const char * dddlb_opt_choices [static_cast< int >(DlbOption::Count)+1]
 
const char * thread_aff_opt_choices [static_cast< int >(ThreadAffinity::Count)+1]
 
const char * nbpu_opt_choices [5] = { nullptr, "auto", "cpu", "gpu", nullptr }
 
const char * pme_opt_choices [5] = { nullptr, "auto", "cpu", "gpu", nullptr }
 
const char * pme_fft_opt_choices [5] = { nullptr, "auto", "cpu", "gpu", nullptr }
 
const char * bonded_opt_choices [5] = { nullptr, "auto", "cpu", "gpu", nullptr }
 
const char * update_opt_choices [5] = { nullptr, "auto", "cpu", "gpu", nullptr }
 
const char * devicesSelectedByUser = ""
 
const char * userGpuTaskAssignment = ""
 
ImdOptionsimdOptions = mdrunOptions.imdOptions
 
t_pargs pa [48]
 

Member Data Documentation

const char* gmx::LegacyMdrunOptions::dddlb_opt_choices[static_cast< int >(DlbOption::Count)+1]
Initial value:
= { nullptr,
"auto",
"no",
"yes",
nullptr }
const char* gmx::LegacyMdrunOptions::ddrank_opt_choices[static_cast< int >(DdRankOrder::Count)+1]
Initial value:
= { nullptr,
"interleave",
"pp_pme",
"cartesian",
nullptr }
gmx_output_env_t* gmx::LegacyMdrunOptions::oenv = nullptr

Output context for writing text files.

Todo:
Clarify initialization, ownership, and lifetime.
const char* gmx::LegacyMdrunOptions::thread_aff_opt_choices[static_cast< int >(ThreadAffinity::Count)+1]
Initial value:
= { nullptr,
"auto",
"on",
"off",
nullptr }

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