Gromacs  2024.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Todo List
Member _gmx_sel_evaluate_subexpr (gmx_sel_evaluate_t *data, const gmx::SelectionTreeElementPointer &sel, gmx_ana_index_t *g)
The call to gmx_ana_index_difference() can take quite a lot of unnecessary time if the subexpression is evaluated either several times for the same group or for completely distinct groups. However, in the majority of cases, these situations occur when _gmx_sel_evaluate_subexpr_staticeval() can be used, so this should not be a major problem.
Class AmdPackedFloat3
This class shall be removed as soon as the compiler is improved.
Member anonymous_namespace{bonded.cpp}::pbc_rvec_sub (const t_pbc *pbc, const rvec xi, const rvec xj, rvec dx)
This kind of code appears in many places. Consolidate it
Member anonymous_namespace{minimize.cpp}::EnergyEvaluator::run (em_state_t *ems, rvec mu_tot, tensor vir, tensor pres, int64_t count, gmx_bool bFirst, int64_t step)
In practice, the same objects mu_tot, vir, and pres are always passed to this function, so we would rather have them as data members. However, their C-array types are unsuited for aggregate initialization. When the types improve, the call signature of this method can be reduced.
Member anonymous_namespace{pdb2gmx.cpp}::renameResidue (const gmx::MDLogger &logger, t_atoms *pdba, const char *oldnm, const char *newnm, bool bFullCompare, t_symtab *symtab)
Refactor this function to accept a lambda that accepts i and numMatchesFound but always produces newnm. Then remove renameResiduesInteractively by calling this method with suitable lambdas that capture its parameter rr and ignores numMatchesFound.
Member anonymous_namespace{pdb2gmx.cpp}::renameResidueInteractively (t_atoms *pdba, const char *oldnm, const char *gettp(int, gmx::ArrayRef< const RtpRename >), bool bFullCompare, t_symtab *symtab, gmx::ArrayRef< const RtpRename > rr)
Remove this function, per todo in renameResidue.
Member AtomProperties::atomNumberFromElement (const char *element)
This should be made const once the lazy implementation is done properly for the class.
Member AtomProperties::elementFromAtomNumber (int atomNumber)
This should be made const once the lazy implementation is done properly for the class.
File biasgrid.h
: Replace this by a more generic grid class once that is available.
File bonded.cpp
We should re-work this. For example, a harmonic bond has so few computations that force components should be accurate to a small and computed relative error.
Class BondedInteractionList
This should be merged with BondedInteraction.
File boxdeformation.cpp

The .mdp specification should have a boolean for this module.

grompp should set up fields in the tpr file that carry the information about the original box, then the deform module would can be build alongside the update module, rather than need to be set up before the checkpoint is read.

File boxmatrix.cpp
Test error conditions when they throw exceptions
Member buildSupportsNonbondedOnGpu (std::string *error)
Move this to NB module once it exists.
Member c_skipNeutralAtoms
Estimate performance differences.
Member CHECK_SEL (sel)
Get rid of this macro. It should now be possible to handle all errors using exceptions.
Member clearModificationBlock (MoleculePatchDatabase *globalPatches)
Remove once constructor/destructor takes care of all of this.
File clustsize.cpp
These will be superseded by tests of the new style analysis modules.
File compiler.cpp

Better error handling and memory management in error situations. At least, the main compilation function leaves the selection collection in a bad state if an error occurs.

The memory usage could still be optimized. Use of memory pooling could still be extended, and a lot of redundant gmin/gmax data could be eliminated for complex arithmetic expressions.

File constr.cpp

Better tests for virial are needed.

Tests for bigger systems to test threads synchronization, reduction, etc. on the GPU.

Tests for algorithms for derivatives.

Free-energy perturbation tests

File constrtestdata.cpp

Better tests for virial are needed.

Tests for bigger systems to test threads synchronization, reduction, etc. on the GPU.

Tests for algorithms for derivatives.

Free-energy perturbation tests

Member copyPreprocessResidues (const PreprocessResidue &s, PreprocessResidue *d, t_symtab *symtab)
Remove once copy can be done directly.
Page Custom selection methods
The modifier handling could be made more flexible and more generic; the current implementation does not allow many things which would be possible with slight changes in the internals of the library.
Class df_history_t
Split out into microstate and observables history.
File domdec_network.h
Wrap the raw dd_bcast in md.cpp into a higher-level function in the domdec module, then this file can be module-internal.
File energyoutput.cpp

Position and orientation restraints tests.

Average and sum in edr file test.

AWH output tests.

The log and edr outputs are currently saved to the file on the disk and then read to compare with the reference data. This will be more elegant (and run faster) when we refactor the output routines to write to a stream interface, which can already be handled in-memory when running tests.

File evaluate.cpp
One of the major bottlenecks for selection performance is that all the evaluation is carried out for atoms. There are several cases when the evaluation could be done for residues or molecules instead, including keywords that select by residue and cases where residue centers are used as reference positions. Implementing this would require a mechanism for recognizing whether something can be evaluated by residue/molecule instead by atom, and converting selections by residue/molecule into selections by atom when necessary.
File exactcontinuation.cpp
Extend the coverage to the appending case.
File expanded.cpp
Add more tests as the expanded ensemble implementation gets more modular (#3848).
Member findDevices ()
: Check if errors do propagate in OpenCL as they do in CUDA and whether there is a mechanism to "clear" them.
Member fit_acf (int ncorr, int fitfn, const gmx_output_env_t *oenv, gmx_bool bVerbose, real tbeginfit, real tendfit, real dt, real c1[], real *fit)
check parameters
Member ftype_is_bonded_potential (int ftype)
This function could go away when idef is not a big bucket of everything.
Member getDeviceComputeUnitFactor (const DeviceInformation &deviceInfo)
: Handled AMD RDNA?
Class gmx::AbstractAnalysisArrayData
Add support for multiple data sets.
Class gmx::AbstractAnalysisData
Improve the exception-handling semantics. In most cases, it doesn't make much sense to continue data processing after one module fails, but having the alternative would not hurt.
Member gmx::AbstractAnalysisData::addColumnModule (int col, int span, const AnalysisDataModulePointer &module)

This method doesn't currently work in all cases with multipoint data or with multiple data sets. In particular, if the added module requests storage and uses getDataFrame(), it will behave unpredictably (most likely asserts).

Generalize this method to multiple data sets (e.g., for adding modules that only process a single data set).

Member gmx::AbstractAnalysisData::applyModule (IAnalysisDataModule *module)
Currently, this method may not work correctly if module requests storage (addModule() has the same problem if called after data is started).
Member gmx::AbstractOptionStorage::processSet ()=0
Improve the call semantics.
Member gmx::Allocator< T, AllocationPolicy >::operator== (const Allocator< T2, AllocationPolicy > &) const
Use std::is_empty_v when CUDA 11 is a requirement.
Class gmx::AnalysisData
Parallel implementation is not complete.
Class gmx::AnalysisDataStorage
Proper multi-threaded implementation.
Member gmx::analysismodules::anonymous_namespace{msd.cpp}::calcSingleSquaredDistance (const RVec c1, const RVec c2)
Remove NOLINTs once clang-tidy is updated to v11, it should be able to handle constexpr.
Class gmx::analysismodules::Msd

Implement -tensor for full MSD tensor calculation

Implement -rmcomm for total-frame COM removal

Implement -pdb for molecule B factors

Class gmx::AnalysisNeighborhood
Generalize the exclusion machinery to make it easier to use for other cases than atom-atom exclusions from the topology.
Class gmx::AnalysisNeighborhoodSearch

Make it such that reset() is not necessary to call in code that repeatedly assigns the result of AnalysisNeighborhood::initSearch() to the same variable (see sm_distance.cpp).

Consider removing minimumDistance(), as nearestPoint() already returns the distance.

Class gmx::anonymous_namespace{densityfitting.cpp}::DensityFittingSimulationParameterSetup
Implement builder pattern that will not use unqiue_ptr to check if parameters have been set or not.
Member gmx::anonymous_namespace{handlerestart.cpp}::exist_output_file (const std::filesystem::path &fnm_cp, int nfile, const t_filenm fnm[])
This could be implemented sanely with a for loop.
Member gmx::applyGlobalSimulationState (const SimulationInput &simulationInput, PartialDeserializedTprFile *partialDeserializedTpr, t_state *globalState, t_inputrec *inputrec, gmx_mtop_t *globalTopology)
Factor the logic for global/local and main-rank-checks. The SimulationInput utilities should behave properly for the various distributed data scenarios. Consider supplying data directly to the consumers rather than exposing the implementation details of the legacy aggregate types.
Member gmx::applyLocalState (const SimulationInput &simulationInput, t_fileio *logfio, const t_commrec *cr, int *dd_nc, t_inputrec *ir, t_state *state, ObservablesHistory *observablesHistory, bool reproducibilityRequested, const MDModulesNotifiers &notifiers, gmx::ReadCheckpointDataHolder *modularSimulatorCheckpointData, bool useModularSimulator)

Factor the distributed data aspects of simulation input data into the SimulationInput implementation.

Consider refactoring to decouple the checkpoint facility from its consumers (state, observablesHistory, mdModulesNotifiers, and parts of ir).

Consider refactoring to decouple the checkpoint facility from its consumers (state, observablesHistory, mdModulesNotifiers, and parts of ir).

Consider refactoring to decouple the checkpoint facility from its consumers (state, observablesHistory, mdModulesNotifiers, and parts of ir).

Class gmx::ArrayRef< typename >
This class is not complete. There are likely also methods missing (not required for current usage).
Member gmx::ArrayRef< typename >::ArrayRef (U &&o)
Use std::is_convertible_v when CUDA 11 is a requirement.
Member gmx::ArrayRefWithPadding< typename >::ArrayRefWithPadding (U &&o)
Use std::is_same_v when CUDA 11 is a requirement.
Class gmx::Awh
Update parameter reading and checkpointing, when general C++ framework is ready.
Member gmx::AwhParams::potential () const
should use actual enum class.
Member gmx::BiasParams::isCheckHistogramForAnomaliesStep (int64_t step) const
Currently this function just calls isCheckCoveringStep but the checks could be done less frequently.
Member gmx::BoxMatrix
Implement a full replacement for C-style real[DIM][DIM]
Member gmx::CheckpointHandler::decideIfCheckpointingThisStep (bool bNS, bool bFirstStep, bool bLastStep)
Change these bools to enums to make calls more self-explanatory
Member gmx::checkUserGpuIds (ArrayRef< const std::unique_ptr< DeviceInformation >> deviceInfoList, ArrayRef< const int > compatibleGpus, ArrayRef< const int > gpuIds)
Note that the selected GPUs can be different on each rank, and the IDs of compatible GPUs can be different on each node, so this routine ought to do communication to determine whether all ranks are able to proceed. Currently this relies on the MPI runtime to kill the other processes because GROMACS lacks the appropriate infrastructure to do a good job of coordinating error messages and behaviour across MPMD ranks and multiple simulations.
Class gmx::ClfftInitializer

Consider making a composite object that also handles on-demand compilation, managing lifetime of PME FFT kernel programs to avoid exhausting resources and/or recompiling kernels previously used. See Issue #2535.

Consider implementing an appropriate flavor of the nifty counter idiom so that both static initialization and deinitialization can work in a fast, leak-free, and thread-safe way without imposing constraints on the calling code. See Issue #2535.

Member gmx::ColvarsForceProviderState::xOldWhole_
Change the type to a standard one to avoid memory leak.
Class gmx::compat::not_null< T >
Eliminate this when we require a version of C++ that supports std::not_null.
Member gmx::Constraints::setConstraints (gmx_localtop_t *top, int numAtoms, int numHomeAtoms, gmx::ArrayRef< const real > masses, gmx::ArrayRef< const real > inverseMasses, bool hasMassPerturbedAtoms, real lambda, gmx::ArrayRef< const unsigned short > cFREEZE)
Make this a callback that is called automatically once a new domain has been made.
Member gmx::ConstraintsElement< variable >::elementSetup () override
Should this rather happen at grompp time? Right position of this operation is currently depending on the integrator algorithm (after domdec, before compute globals...), so doing this earlier would be much more stable!
Member gmx::CoordinateFileFlags
Use std::bitset<16> for the entries.
Member gmx::cshake (const int iatom[], int ncon, int *nnit, int maxnit, ArrayRef< const real > constraint_distance_squared, ArrayRef< RVec > positions, const t_pbc *pbc, ArrayRef< const RVec > initial_displacements, ArrayRef< const real > half_of_reduced_mass, real omega, ArrayRef< const real > invmass, ArrayRef< const real > distance_squared_tolerance, ArrayRef< real > scaled_lagrange_multiplier, int *nerror)
Make SHAKE use better data structures, in particular for iatom.
Member gmx::DataFileInfo::fromDefaultDir_
Consider replacing with an enum that identifies the source (current dir, GMXLIB, default).
Member gmx::DefaultInitializationAllocator< T, A >::construct (U *ptr) noexcept(std::is_nothrow_default_constructible< U >::value)
Use std::is_nothrow_default_constructible_v when CUDA 11 is a requirement.
Class gmx::detail::PaddingTraits< T >
Consider explicitly tying these types to the SimdTrait types. That would require depending on the SIMD module, or extracting the traits from it. This would also permit maxSimdWidthOfBaseType to be set more efficiently, e.g. as a metaprogramming max over the maximum width from different implementations.
Member gmx::detectAllDeviceInformation (const PhysicalNodeCommunicator &physicalNodeComm)
Coordinating the efficient detection of devices across multiple ranks per node should be separated from the lower-level hardware detection. See https://gitlab.com/gromacs/gromacs/-/issues/3650.
Member gmx::DeviceStreamManager::context () const
This relies on the fact that only one unique device is described by nonbondedDeviceInfo and pmeDeviceInfo.
Class gmx::EnergyAnalysisFrame
Make this supersede t_enxframe.
Member gmx::EnergyData::initializeEnergyHistory (StartingBehavior startingBehavior, ObservablesHistory *observablesHistory, EnergyOutput *energyOutput)
Make member function once legacy use is not needed anymore
Class gmx::ExceptionInitializer
With the exception of the reason string, information added with this class is not currently accessible through any public API, except for calling printFatalErrorMessage(), formatExceptionMessageToString() or formatExceptionMessageToFile(). This is not implemented as there is not yet need for it, and it is not clear what would be the best alternative for the access. It should be possible to refactor the internal implementation to suit the needs of such external access without requiring changes in code that throws these exceptions.
Member gmx::FileNameOption::libraryFile (bool bLibrary=true)
Currently, this flag only affects the help output. Callers must take care themselves to actually search the file in the library directories. It would be nicer to do this searching within the file name option implementation.
Class gmx::FileNameOptionManager
Most of the functionality in this class is specific to command line parsing, so it would be cleaner to replace this with an interface, and have the actual code in the commandline module.
Member gmx::getPageSize ()
Move this function into sysinfo.cpp where other OS-specific code/includes live
Member gmx::gmx_mdrun (MPI_Comm communicator, const gmx_hw_info_t &hwinfo, int argc, char *argv[])
Progress on https://gitlab.com/gromacs/gromacs/-/issues/3774 will remove the need of test binaries to call gmx_mdrun in a way that is different from the command-line and gmxapi.
Member gmx::GpuTaskAssignments::reportGpuUsage (const MDLogger &mdlog, bool printHostName, PmeRunMode pmeRunMode, const SimulationWorkload &simulationWork)
It could be useful to report also whether any nodes differed, and in what way.
Class gmx::GpuTaskAssignmentsBuilder

Later, this might become a loop over all registered modules relevant to the mdp inputs, to find those that have such tasks.

Later we might need the concept of computeTasksOnThisRank, from which we construct gpuTasksOnThisRank.

Member gmx::GromacsException::prependContext (const std::string &context)
The added information is currently not accessible through what(), nor through any other means except for calling printFatalErrorMessage(), formatExceptionMessageToString() or formatExceptionMessageToFile(). See ExceptionInitializer for more discussion.
Member gmx::HashedMap< T >::find (int key)
Use std::as_const when CUDA 11 is a requirement.
Member gmx::HelpWriterContext::setReplacement (const std::string &search, const std::string &replace)
Improve semantics if the same search item is set multiple times.
Class gmx::HostAllocationPolicy
As a minor optimization, consider also having a stateless version of this policy, which might be slightly faster or more convenient to use in the cases where it is known at compile time that the allocation will be used to transfer to a GPU.
Class gmx::ImdSession::Impl

Make this class (or one extracted from it) model IForceProvider.

Use RAII for files and allocations

Class gmx::IndexGroupsAndNames
update this class, once the two legacy data structures, t_blocka and the char ** of group names are refactored.
Class gmx::InteractiveMD
If adding doxygen stubs actual add the full stub.
Class gmx::InteractiveMolecularDynamics
Some aspects of this module provides forces (when the user pulls on things in VMD), so in future it should have a class that models IForceProvider and is contributed to the collection of such things.
Member gmx::internal::AnalysisDataStorageImpl::needStorage () const
This could be extended to non-multipoint data as well.
Member gmx::internal::AnalysisDataStorageImpl::pendingLimit_
Get rid of this alltogether, as it is no longer used much.
Class gmx::IonSwapping
Add full information.
Class gmx::IOptionValueStore< T >
Try to make this more like a write-only interface, getting rid of the need to access the stored values through this interface. That would simplify things.
Class gmx::IRestraintPotential
Template headers can help to build compatible calculation methods with different input requirements. For reference, see https://github.com/kassonlab/sample_restraint
Member gmx::IRestraintPotential::bindSession (gmxapi::SessionResources *resources)
This should be more general than the RestraintPotential interface.
Member gmx::IRestraintPotential::evaluate (Vector r1, Vector r2, double t)=0
The virtual function call should be replaced by a (table of) function objects retrieved before the run.
Member gmx::IRestraintPotential::update (gmx::Vector v, gmx::Vector v0, double t)
: Provide gmxapi facility for plugin restraints to wrap themselves with a default implementation to let this class be pure virtual.
Class gmx::LegacyMdrunOptions

Modules in mdrun should acquire proper option handling so that all of these declarations and defaults are local to the modules.

Contextual aspects, such as working directory and environment variable handling are more properly the role of SimulationContext, and should be moved there.

Member gmx::LegacyMdrunOptions::oenv
Clarify initialization, ownership, and lifetime.
Member gmx::Lincs::ntask
This is mostly used to loop over task, which would be nicer to do with range-based for loops, but the thread index is used for constructing bit masks and organizing the virial output buffer, so other things need to change, first.
Member gmx::lincsKernel (sycl::handler &cgh, const int numConstraintsThreads, const AtomPair *__restrict__ gm_constraints, const float *__restrict__ gm_constraintsTargetLengths, const int *__restrict__ gm_coupledConstraintsCounts, const int *__restrict__ gm_coupledConstraintsIndices, const float *__restrict__ gm_massFactors, float *__restrict__ gm_matrixA, const float *__restrict__ gm_inverseMasses, const int numIterations, const int expansionOrder, const Float3 *__restrict__ gm_x, Float3 *__restrict__ gm_xp, const float invdt, Float3 *__restrict__ gm_v, float *__restrict__ gm_virialScaled, PbcAiuc pbcAiuc)

Reduce synchronization overhead. Some ideas are:

  1. Consider going to warp-level synchronization for the coupled constraints.
  2. Move more data to local/shared memory and try to get rid of atomic operations (at least on the device level).
  3. Use analytical solution for matrix A inversion.
  4. Introduce mapping of thread id to both single constraint and single atom, thus designating Nth threads to deal with Nat <= Nth coupled atoms and Nc <= Nth coupled constraints. See Issue #2885 for details (https://gitlab.com/gromacs/gromacs/-/issues/2885)

The use of restrict for gm_xp and gm_v causes failure, probably because of the atomic operations. Investigate this issue further.

Member gmx::makeArrayRef (T &c)
Use std::is_const_v when CUDA 11 is a requirement.
Member gmx::makeOpenClInternalErrorString (const char *message, cl_int status)
Make use of this function more.
Class gmx::MDAtoms
The group-scheme kernels needed a plain C-style t_mdatoms, so this type combines that with the memory management needed for efficient PME on GPU transfers. The mdatoms_ member should be removed.
Class gmx::Mdrunner

Most of the attributes should be declared by specific modules as command-line options. Accordingly, they do not conform to the naming scheme, because that would make for a lot of noise in the diff, only to have it change again when the options move to their modules.

Preparing logging and MPI contexts could probably be a higher-level responsibility, so that an Mdrunner would get made without needing to re-initialize these components (as currently happens always for the main rank, and differently for the spawned ranks with thread-MPI).

Member gmx::Mdrunner::addPotential (std::shared_ptr< IRestraintPotential > restraint, const std::string &name)
Mdrunner should fetch such resources from the SimulationContext rather than offering this public interface.
Member gmx::Mdrunner::cloneOnSpawnedThread () const
clarify (multiple) invariants during MD runner start-up. The runner state before and after launching threads is distinct enough that it should be codified in the invariants of different classes. That would mean that the object returned by this method would be of a different type than the object held by the client up to the point of call, and its name would be changed to "launchOnSpawnedThread" or something not including the word "clone".
Member gmx::MdrunnerBuilder::addBondedTaskAssignment (const char *bonded_opt)

Replace with modern strings or (better) enum classes.

Make optional and/or encapsulate into task assignment module.

Member gmx::MdrunnerBuilder::addDomainDecomposition (const DomdecOptions &options)
revisit whether we should be passing this parameter struct or a higher-level handle of some sort.
Member gmx::MdrunnerBuilder::addElectrostatics (const char *pme_opt, const char *pme_fft_opt)

Replace with modern strings or (better) enum classes.

Make optional and/or encapsulate into electrostatics module.

Member gmx::MdrunnerBuilder::addFilenames (ArrayRef< const t_filenm > filenames)
Modules should manage their own filename options and defaults.
Member gmx::MdrunnerBuilder::addHardwareDetectionResult (const gmx_hw_info_t *hwinfo)
It would be better to express this as either a not-null const pointer or a const reference, but neither of those is consistent with incremental building of an object. This motivates future work to be able to make a deep copy of the detection result. See https://gitlab.com/gromacs/gromacs/-/issues/3650
Member gmx::MdrunnerBuilder::addNonBonded (const char *nbpu_opt)

Replace with string or enum that we can have sensible defaults for.

Either the Builder or modular Director code should provide sensible defaults.

Member gmx::MdrunnerBuilder::addOutputEnvironment (gmx_output_env_t *outputEnvironment)
Allow client code to set up output environment and provide as a resource. This parameter is used to set up resources that are dependent on the execution environment and API context. Such resources should be retrieved by the simulator from a client-provided resource, but currently the resources are only fully initialized in Mdrunner.
Member gmx::MdrunnerBuilder::addReplicaExchange (const ReplicaExchangeParameters &params)
revisit whether we should be passing this parameter struct or a higher-level handle of some sort.
Member gmx::MdrunnerBuilder::addSimulationMethod (const MdrunOptions &options, real forceWarningThreshold, StartingBehavior startingBehavior)
Map these parameters to more appropriate encapsulating types. Find a better way to indicate "unspecified" than a magic value of the parameter type.
Member gmx::MdrunnerBuilder::addUpdateTaskAssignment (const char *update_opt)

Replace with modern strings or (better) enum classes.

Make optional and/or encapsulate into task assignment module.

Member gmx::NumTempScaleValues
Unify with similar enum in CPU update module
Member gmx::openTNG (const std::string &name, const Selection &sel, const gmx_mtop_t *mtop)
Those should be methods in a replacement for t_trxstatus instead.
Member gmx::operator<< (Exception ex, const ExceptionInfo< Tag, T > &item)
Use std::is_base_of_v when CUDA 11 is a requirement.
Member gmx::OptionFlag
The flags related to default values are confusing, consider reorganizing them.
Class gmx::OutputAdapterContainer

Keeping track of those abilities has to be the responsibility of an object implementing and interface that declares it capabilities and will execute the the function of writing to a file.

This could be changed to instead construct the container with a pointer to an ICoordinateOutputWriter that can be passed to the IOutputAdapter modules to check their cross-dependencies.

Member gmx::PaddedVector< T, Allocator >::rvec_array ()
Use std::is_same_v when CUDA 11 is a requirement.
Member gmx::PaddedVector< T, Allocator >::rvec_array () const
Use std::is_same_v when CUDA 11 is a requirement.
Member gmx::PmeLoadBalanceHelper::pmePrinting () const
Check this!
Member gmx::reportGpuUsage (const MDLogger &mdlog, ArrayRef< const GpuTaskAssignment > gpuTaskAssignmentOnRanksOfThisNode, size_t numGpuTasksOnThisNode, size_t numPpRanks, bool printHostName, PmeRunMode pmeRunMode, const SimulationWorkload &simulationWork)
It could be useful to report also whether any nodes differed, and in what way.
Class gmx::RestraintManager
This should be generalized as work description and factory functions in Context.
Class gmx::ScalingMatrix
Should be generalized.
Member gmx::Selection::setEvaluateVelocities (bool bEnabled)
Implement it such that in the above case, hasVelocities() will return false for such frames.
Class gmx::SelectionOption

Support for specifying that an option accepts, e.g., two to four selections. Currently, only a fixed count or any number of selections is possible. In addition to allowing this in OptionTemplate, also SelectionOptionManager needs to be updated.

Class gmx::SimulationContext

Clarify and strengthen the invariant represented by SimulationContext.

This class should also handle aspects of simulation environment such as working directory and environment variables.

Impose sensible access restrictions. Either the SimulationContext should be passed to the Mdrunner as logically constant or a separate handle class can provide access to resources that have been allocated by (negotiated with) the client for the current simulation (or simulation segment). Non-const accessors to shared resources need to be associated with update signals that the simulation components (modules and runner) can subscribe to.

Member gmx::SimulationContext::SimulationContext (MPI_Comm communicator, ArrayRef< const std::string > multiSimDirectoryNames)
Refine distribution of environment management. There should be a context level at which only the current simulator directory matters, and a level above which encapsulates multisim details in a specialized type.
Class gmx::SimulatorEnv
Fix doxygen checks.
Class gmx::SimulatorStateData
Think of a better name and annoy people that forget to add documentation for their code.
Member gmx::SurfaceAreaCalculator::calculate (const rvec *x, const t_pbc *pbc, int nat, int index[], int flags, real *area, real *volume, real **at_area, real **lidots, int *n_dots) const
Make the output options more C++-like, in particular for the array outputs.
Class gmx::test::AbstractTrajectoryAnalysisModuleTestFixture
Adding facilities to AnalysisData to check whether there are any output modules attached to the data object (directly or indirectly), marking the mocks as output modules, and using these checks in the tools instead of or in addition to the output file presence would be a superior. Also, the full file names should be deducible from the options.
Class gmx::test::AnalysisDataTestFixture
Support for arbitrary AnalysisDataValues (errors and missing values).
Member gmx::test::anonymous_namespace{bonded.cpp}::c_coordinatesForTests
Test also some weirder values
Class gmx::test::anonymous_namespace{bonded.cpp}::OutputQuantities
Later this might turn into the actual output struct.
Member gmx::test::anonymous_namespace{com.cpp}::populateMoleculeType (gmx_moltype_t *moltype)
Return moltype once t_atoms is a proper class.
Class gmx::test::anonymous_namespace{exactcontinuation.cpp}::ContinuationFramePairManager< FrameReader >
This class has a similar interface with one in mdcomparison.h, but not enough to warrant extracting an interface class. Perhaps parts of this should be cast as a class that returns iterators to successive frames, so that the fancy footwork for pretending a two-part run is one sequence is separate from the comparison of that sequene with that of the one-part run?
Member gmx::test::anonymous_namespace{exactcontinuation.cpp}::ContinuationFramePairManager< FrameReader >::shouldContinueComparing ()
This would be straightforward if velocity Verlet behaved like other integrators.
Class gmx::test::anonymous_namespace{exactcontinuation.cpp}::MdrunNoAppendContinuationIsExact

Is there value in testing with mdrun -reprod? As well as without it?

Add FEP case.

Member gmx::test::anonymous_namespace{msd.cpp}::isRelevantXvgHeader (const std::string &line)
This is mostly taken from xvgtest.cpp. We could probably create some modular checker functionality where each line is compared against a set of subcheckers automatically. Then we could build matchers like this out of the modular components.
Member gmx::test::anonymous_namespace{pdb2gmx.cpp}::c_regexStringsToSkip
It would be preferable to just scrub the content that actually varies, but we don't use enough regular expression support for that yet.
Member gmx::test::anonymous_namespace{simulationdatabase.cpp}::prepareDefaultMdpFieldValues (const std::string &simulationName)
ideally some of these default values should be the same as grompp uses, and sourced from the same place, but that code is a bit of a jungle until we transition to using IMdpOptions more.
Member gmx::test::checkEnergiesAgainstReferenceData (const std::string &energyFilename, const EnergyTermsToCompare &energyTermsToCompare, TestReferenceChecker *checker, MaxNumFrames maxNumEnergyFrames)
This is quite similar to the functionality used in PmeTest, and we should consider reducing the duplication.
Member gmx::test::compareBox (const TrajectoryFrame &reference, const TrajectoryFrame &test, const TrajectoryFrameMatchSettings &matchSettings, const FloatingPointTolerance tolerance)
This could be streamlined when we have a proper 3D matrix class and view.
Member gmx::test::EnergyComparison::getEnergyNames () const
This returns a copy of the keys, which is convenient, but inefficient. Alternatively, this could return a view of the keys from a range rather than a container, but there's no implementation of that in C++11 at the moment.
Class gmx::test::FloatingPointTolerance
The factory methods that take ULP difference could be better formulated as methods that take the acceptable number of incorrect bits and/or the number of accurate bits.
Class gmx::test::FramePairManager< FrameReader >
This is largely duplicated by ContinuationFrameManager. These could be refactored into components that compare iterators to frames.
Member gmx::test::outputParameters ()
Test nstlog, nstdhdl, nstxout-compressed
Class gmx::test::TerminationHelper
This approach is not very elegant, but "stuff doesn't segfault or give a fatal error" is a useful result. We can improve it when we can mock out more do_md() functionality. Before that, we'd probably prefer not to run this test case in per-patchset verification, but this is the best we can do for now.
Member gmx::test::throwIfNonEmptyAndOnlyWhitespace (const std::string &s, const char *id)
Eliminate this limitation of TinyXML2. See e.g. https://github.com/leethomason/tinyxml2/issues/432
Member gmx::TextWriter::wrapperSettings ()
Wrapping is not currently implemented for code that writes partial lines with writeString().
Class gmx::TimeUnitManager

This class is independent of the options implementation. To ease reuse, it could be moved to the utility module, and only TimeUnitBehavior left here.

Member gmx::TopologyInformation::fillFromInputFile (const std::string &filename)
This should throw upon error but currently does not.
Class gmx::TrajectoryAnalysisSettings
Remove plain flags from the public interface.
Class gmx::TrajectoryFrame

Eventually t_trxframe should be replaced by a class such as this. Currently we need to introduce BoxMatrix so that we can have a normal C++ getter that returns the contents of a box matrix, since you cannot use a real[DIM][DIM] as a function return type.

Consider a std::optional work-alike type for expressing that a field may or may not have content.

Class gmx_hw_opt_t
During mdrunner(), if the user has left any of these values at their defaults (which tends to mean "choose automatically"), then those values are over-written with the result of such automation. This creates problems for the subsequent code in knowing what was done, why, and reporting correctly to the user. Find a way to improve this.
Class gmx_multisim_t
Change this to class
Member gmx_pme_init (const t_commrec *cr, const NumPmeDomains &numPmeDomains, const t_inputrec *ir, const matrix box, real haloExtentForAtomDisplacement, gmx_bool bFreeEnergy_q, gmx_bool bFreeEnergy_lj, gmx_bool bReproducible, real ewaldcoeff_q, real ewaldcoeff_lj, int nthread, PmeRunMode runMode, PmeGpu *pmeGpu, const DeviceContext *deviceContext, const DeviceStream *deviceStream, const PmeGpuProgram *pmeGpuProgram, const gmx::MDLogger &mdlog)
We should evolve something like a GpuManager that holds DeviceInformation* and PmeGpuProgram* and perhaps other related things whose lifetime can/should exceed that of a task (or perhaps task manager). See Issue #2522.
Member GMX_UNUSED_VALUE (value)
Deprecated - use gmx_unused
File grompp.cpp
Refactor SimulationRunner to split off SimulationPreparer, so that integration tests of grompp can stand apart from tests of mdrun.
File haloexchange_mpi.cpp
Add 3D case
File handlerestart.cpp
Clean up the error-prone logic here. Add doxygen.
File handlerestart.h
There may be other code in runner.cpp etc. that can usefully live here
Class history_t
Rename this with a more descriptive name.
File hostallocator.h
This should not be in the public API, but it needs to be for the moment because state.h is in that API.
File indexutil.cpp
Tests for other functions, at least the set operations.
Member initParamLookupTable (DeviceBuffer< ValueType > *deviceBuffer, DeviceTexture *, const ValueType *hostBuffer, int numValues, const DeviceContext &deviceContext)
Decide if using image2d is most efficient.
File invertmatrix.cpp
Test error conditions when they throw exceptions
File iserializer.h
Generalize and transfer serialization functionality used in mrc density file header serialization to here.
File leapfrog.cpp

Add tests for integrators with pressure control.

Add PBC handling test.

File leapfrogtestdata.h

Add anisotropic Parrinello-Rahman and other pressure coupling schemes

Add PBC handling test.

Reference values tests.

File legacyenergy.cpp
These will be superseded by tests of the energyanalysis modules.
File mempool.h
Document these functions.
Group module_domdec
Get domdec stuff out of mdtypes/commrec.h
Group module_imd
Rename the directory, source and test files to interactive_md, and prefer type names like InteractiveMDSession. Avoid ambiguity with IMDModule.
Group module_modularsimulator
Can we link to docs/doxygen/lib/modularsimulator.md?
Member Nbnxm::gpu_try_finish_task (NbnxmGpu *nb, const gmx::StepWorkload &stepWork, const AtomLocality aloc, real *e_lj, real *e_el, gmx::ArrayRef< gmx::RVec > shiftForces, GpuTaskCompletion completionKind)
Move into shared source file, perhaps including cuda_runtime.h if needed for any remaining CUDA-specific objects.
Member Nbnxm::Grid::cxy_ind () const
Needs a useful name.
Member Nbnxm::Grid::cxy_na () const
Needs a useful name.
Member NbnxmGpu::deviceContext_

Make it constant reference, once NbnxmGpu is a proper class.

Make it constant reference, once NbnxmGpu is a proper class.

Make it constant reference, once NbnxmGpu is a proper class.

File nbsearch.cpp
The grid implementation could still be optimized in several different ways:
  • A better heuristic for selecting the grid size or falling back to a simple all-pairs search.
  • A multi-level grid implementation could be used to be able to use small grids for short cutoffs with very inhomogeneous particle distributions without a memory cost.
File nbsearch.cpp
Increase coverage of these tests for different corner cases: other PBC cases than full 3D, large cutoffs (larger than half the box size), etc. At least some of these probably don't work correctly.
File pbc_aiuc.h
CPU, GPU and SIMD routines essentially do the same operations on different data-types. Currently this leads to code duplication, which has to be resolved. For details, see Issue #2863 https://gitlab.com/gromacs/gromacs/-/issues/2863
Member pbcDxAiuc (const PbcAiuc &pbcAiuc, const rvec &r1, const rvec &r2, rvec dr)
This routine operates on rvec types and uses PbcAiuc to define periodic box, but essentially does the same thing as SIMD and GPU version. These will have to be unified in future to avoid code duplication. See Issue #2863: https://gitlab.com/gromacs/gromacs/-/issues/2863
Member pbcDxAiucSycl (const PbcAiuc &pbcAiuc, const rvec &r1, const rvec &r2, rvec dr)
This routine operates on rvec types and uses PbcAiuc to define periodic box, but essentially does the same thing as SIMD and GPU version. These will have to be unified in future to avoid code duplication. See Issue #2863: https://gitlab.com/gromacs/gromacs/-/issues/2863
Member pbcDxAiucSycl (const PbcAiuc &pbcAiuc, const sycl::float4 &r1, const sycl::float4 &r2, Float3 &dr)
This routine uses CUDA float4 types for input coordinates and returns in rvec data-type. Other than that, it does essentially the same thing as the version below, as well as SIMD and CPU versions. This routine is used in GPU listed forces module. To avoid code duplication, these implementations should be unified. See Issue #2863: https://gitlab.com/gromacs/gromacs/-/issues/2863
Member pmalloc (void **h_ptr, size_t nbytes, const DeviceContext *)
This function should allocate page-locked memory to help reduce D2H and H2D transfer times, similar with pmalloc from pmalloc.cu.
Member pme_gpu_active (const gmx_pme_t *pme)
The GPU module should not be constructed (or at least called) when it is not active, so there should be no need to check whether it is active. An assertion that this is true makes sense.
File pme_gpu_constants.h
The values are currently common to both CUDA and OpenCL implementations, but should be reconsidered when we tune the OpenCL implementation. See Issue #2528.
Member pme_gpu_reinit_computation (const gmx_pme_t *pme, const bool gpuGraphWithSeparatePmeRank, gmx_wallcycle *wcycle)
Rename this function to clear – it clearly only does output resetting and we should be clear about what the function does..
Member pme_gpu_reinit_computation (const gmx_pme_t *pme, const bool gpuGraphWithSeparatePmeRank, gmx_wallcycle *wcycle)
Rename this function to clear – it clearly only does output resetting and we should be clear about what the function does..
File pme_gpu_settings.h
Some renaming/refactoring, which does not impair the performance: – PmeGpuSettings -> PmeGpuTasks
File pme_gpu_staging.h
Some renaming/refactoring, which does not impair the performance: – bringing the function names up to guidelines – PmeGpuSettings -> PmeGpuTasks – refining GPU notation application (#2053) – renaming coefficients to charges (?)
Member pme_gpu_task_enabled (const gmx_pme_t *pme)
This is a rather static data that should be managed by the hardware assignment manager. For now, it is synonymous with the active PME codepath (in the absence of dynamic switching).
File pme_gpu_types_host.h
Some renaming/refactoring, which does not impair the performance: – bringing the function names up to guidelines – PmeGpuSettings -> PmeGpuTasks – refining GPU notation application (#2053) – renaming coefficients to charges (?)
Member pme_run_mode (const gmx_pme_t *pme)
This is a rather static data that should be managed by the higher level task scheduler.
Member PmeGpu::kernelParams
Test whether this should be copied to the constant GPU memory once for each computation (or even less often with no box updates) instead of being an argument.
Class PmeGpuProgramImpl
In future if we would need to react to either user input or auto-tuning to compile different kernels, then we might wish to revisit the number of kernels we pre-compile, and/or the management of their lifetime.
Member PmeRunMode
: make this enum class with gmx_pme_t C++ refactoring
Member PmeShared::previousBox

Manage this on higher level.

Alternatively, when this structure is used by CPU PME code, make use of this field there as well.

File poscalc.cpp

There is probably some room for optimization in the calculation of positions with bases. In particular, the current implementation may do a lot of unnecessary copying. The interface would need to be changed to make it possible to use the same output positions for several calculations.

The current algorithm for setting up base calculations could be improved in cases when there are calculations that cannot use a common base but still overlap partially (e.g., with three calculations A, B, and C such that A could use both B and C as a base, but B and C cannot use the same base). Setting up the bases in an optimal manner in every possible situation can be quite difficult unless several bases are allowed for one calculation, but better heuristics could probably be implemented. For best results, the setup should probably be postponed (at least partially) to gmx_ana_poscalc_init_eval().

Member PreprocessingAtomTypes::atomTypeFromName (const std::string &str) const
The code should be changed to instead use a gmx::compat version of std::optional to return an iterator to the element being searched, or an empty optional construct if the entry has not been found.
Member PreprocessingBondAtomType::bondAtomTypeFromName (const std::string &str) const
The code should be changed to instead use a gmx::compat version of std::optional to return a handle to the element being searched, or an empty optional construct if the entry has not been found.
Member releaseDevice (DeviceInformation *)
This should go through all the devices, not only the one currently active. Reseting only one device will not work, e.g. in CUDA tests.
Member releaseDevice (DeviceInformation *)
This should go through all the devices, not only the one currently active. Reseting only one device will not work, e.g. in CUDA tests.
Member SEL_ALLOCVAL
This flag overlaps with the function of v.nalloc field, and could probably be removed, making memory management simpler. Currently, the v.nalloc field is not kept up-to-date in all cases when this flag is changed and is used in places where this flag is not, so this would require a careful investigation of the selection code.
Page Selection compilation
Some combinations of method parameter flags are not yet properly treated by the compiler or the evaluation functions in evaluate.cpp. All the ones used by currently implemented methods should work, but new combinations might not.
Member set_over_alloc_dd (bool set)
This is mdrun-specific, so it might be better to put this and over_alloc_dd() much higher up.
Member set_zones_size (gmx_domdec_t *dd, matrix box, const gmx_ddbox_t *ddbox, int zone_start, int zone_end, int numMovedChargeGroupsInHomeZone)
When converting domdec to use proper classes, all these variables should be private and a method should return the correct count depending on an internal state.
File settle.cpp

This also tests that if the calling code requires velocities and virial updates, that those outputs do change, but does not test that those changes are correct.

Only no-PBC and cubic-PBC are tested here, but the correct function of the SIMD version of set_pbx_auic in all cases should be tested elsewhere.

The CPU and GPU versions are tested against each other. This should be changed to a proper test against pre-computed reference values. Also, these test will dry-run on a CUDA build if no CUDA-capable GPU is available.

File simulationsignal.cpp
Move this to mdrunutility module alongside gathering multi-simulation communication infrastructure there.
File simulationsignal.h
Move this to mdrunutility module alongside gathering multi-simulation communication infrastructure there.
File sm_insolidangle.cpp

The implementation could be optimized quite a bit.

Move the covered fraction stuff somewhere else and make it more generic (along the lines it is handled in selection.h and trajana.h in the old C API).

File snprintf.h
When all callers of snprintf compile as C++, perhaps use gmx::formatString() everywhere instead of snprintf.
File state_propagator_data_gpu.h

Add cycle counters.

Add synchronization points.

Class t_matrix
nx and ny should probably be replaced by operations on the extent of matrix, but currently there is only limited ability to iterate over contents of matrix.
Class t_state
Move pure observables history to ObservablesHistory.
File termination.cpp
This approach is not very elegant, but "stuff doesn't segfault or give a fatal error" is a useful result. We can improve it when we can mock out more do_md() functionality. Before that, we'd probably prefer not to run this test case in per-patchset verification, but this is the best we can do for now.
File testasserts.h

The implementation is somewhat ugly, and accesses some Google Test internals. Could be nice to clean it up a bit.

File update_constrain_gpu_impl.cpp
The computational procedures in members should be integrated to improve computational performance.
File utility.h
Remove when CUDA 11 is a requirement.
Class VsiteAtomMapping
Change to remove empty constructor when gmx::compat::optional is available.