Gromacs  2019-beta2
 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.

We only want to construct one of these with an initializer list, so we explicitly delete the default constructor.

Public Member Functions

void run (em_state_t *ems, rvec mu_tot, tensor vir, tensor pres, int64_t count, gmx_bool bFirst)
 We only intend to construct such objects with an initializer list. More...

Public Attributes

FILE * fplog
 Handles logging (deprecated).
const gmx::MDLoggermdlog
 Handles logging.
const t_commrec * cr
 Handles communication.
const gmx_multisim_t * ms
 Coordinates multi-simulations.
gmx_mtop_t * top_global
 Holds the simulation topology.
gmx_localtop_t * top
 Holds the domain topology.
t_inputrec * inputrec
 User input options.
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.
 Handles constraints.
t_fcdata * fcd
 Handles strange things.
t_graph * graph
 Molecular graph for SHAKE.
 Per-atom data for this domain.
t_forcerec * fr
 Handles how to calculate the forces.
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 

We only intend to construct such objects with an initializer list.

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: