Gromacs  2024.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
anonymous_namespace{minimize.cpp}::EnergyEvaluator Class Reference
+ Collaboration diagram for anonymous_namespace{minimize.cpp}::EnergyEvaluator:


Class to handle the work of setting and doing an energy evaluation.

This class is a mere aggregate of parameters to pass to evaluate an energy, so that future changes to names and types of them consume less time when refactoring other code.

Aggregate initialization is used, for which the chief risk is that if a member is added at the end and not all initializer lists are updated, then the member will be value initialized, which will typically mean initialization to zero.

Use a braced initializer list to construct one of these.

Public Member Functions

void run (em_state_t *ems, rvec mu_tot, tensor vir, tensor pres, int64_t count, gmx_bool bFirst, int64_t step)
 Evaluates an energy on the state in ems. More...

Public Attributes

FILE * fplog
 Handles logging (deprecated).
const gmx::MDLoggermdlog
 Handles logging.
const t_commrec * cr
 Handles communication.
const gmx_multisim_tms
 Coordinates multi-simulations.
const gmx_mtop_t & top_global
 Holds the simulation topology.
 Holds the domain topology.
const t_inputrec * inputrec
 User input options.
const MDModulesNotifiersmdModulesNotifiers
gmx::ImdSession * imdSession
 The Interactive Molecular Dynamics session.
pull_t * pull_work
 The pull work object.
 Data for rotational pulling.
t_nrnb * nrnb
 Manages flop accounting.
gmx_wallcycle * wcycle
 Manages wall cycle accounting.
gmx_global_stat_t gstat
 Legacy coordinator of global reduction.
 Coordinates reduction for observables.
 Handles virtual sites.
 Handles constraints.
 Per-atom data for this domain.
t_forcerec * fr
 Handles how to calculate the forces.
MdrunScheduleWorkload * runScheduleWork
 Schedule of force-calculation work each step for this task.
 Stores the computed energies.
int ddpCountPairSearch
 The DD partitioning count at which the pair list was generated.
std::vector< RVec > pairSearchCoordinates
 The local coordinates that were used for pair searching, stored for computing displacements.

Member Function Documentation

void 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 

Evaluates an energy on the state in ems.

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.

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