Gromacs  2020.1
 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:

Description

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)
 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.
 
gmx_mtop_t * top_global
 Holds the simulation topology.
 
gmx_localtop_ttop
 Holds the domain topology.
 
t_inputrec * inputrec
 User input options.
 
gmx::ImdSession * imdSession
 The Interactive Molecular Dynamics session.
 
pull_t * pull_work
 The pull work object.
 
t_nrnb * nrnb
 Manages flop accounting.
 
gmx_wallcycle_t wcycle
 Manages wall cycle accounting.
 
gmx_global_stat_t gstat
 Coordinates global reduction.
 
gmx_vsite_t * vsite
 Handles virtual sites.
 
gmx::Constraintsconstr
 Handles constraints.
 
t_fcdata * fcd
 Handles strange things.
 
t_graph * graph
 Molecular graph for SHAKE.
 
gmx::MDAtomsmdAtoms
 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.
 
gmx_enerdata_t * enerd
 Stores the computed energies.
 

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 
)

Evaluates an energy on the state in ems.

Todo:
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: