Gromacs  2018.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions | Variables
state.h File Reference
#include <array>
#include <memory>
#include <vector>
#include "gromacs/gpu_utils/hostallocator.h"
#include "gromacs/math/paddedvector.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
+ Include dependency graph for state.h:
+ This graph shows which files directly or indirectly include this file:

Description

This file contains the definition of the microstate of the simulated system.

History of observables that needs to be checkpointed should be stored in ObservablesHistory. The state of the mdrun machinery that needs to be checkpointed is also stored elsewhere.

Author
Berk Hess

Classes

class  history_t
 History information for NMR distance and orientation restraints. More...
 
class  ekinstate_t
 Struct used for checkpointing only. More...
 
struct  df_history_t
 Free-energy sampling history struct. More...
 
class  t_state
 The microstate of the system. More...
 

Typedefs

typedef struct df_history_t df_history_t
 Free-energy sampling history struct. More...
 

Enumerations

enum  {
  estLAMBDA, estBOX, estBOX_REL, estBOXV,
  estPRES_PREV, estNH_XI, estTHERM_INT, estX,
  estV, estSDX_NOTSUPPORTED, estCGP, estLD_RNG_NOTSUPPORTED,
  estLD_RNGI_NOTSUPPORTED, estDISRE_INITF, estDISRE_RM3TAV, estORIRE_INITF,
  estORIRE_DTAV, estSVIR_PREV, estNH_VXI, estVETA,
  estVOL0, estNHPRES_XI, estNHPRES_VXI, estFVIR_PREV,
  estFEPSTATE, estMC_RNG_NOTSUPPORTED, estMC_RNGI_NOTSUPPORTED, estBAROS_INT,
  estNR
}
 

Functions

void init_gtc_state (t_state *state, int ngtc, int nnhpres, int nhchainlength)
 Resizes the T- and P-coupling state variables.
 
void state_change_natoms (t_state *state, int natoms)
 Change the number of atoms represented by this state, allocating memory as needed.
 
void init_dfhist_state (t_state *state, int dfhistNumLambda)
 Allocates memory for free-energy history.
 
void comp_state (const t_state *st1, const t_state *st2, gmx_bool bRMSD, real ftol, real abstol)
 Compares two states, write the differences to stdout.
 
rvec * makeRvecArray (gmx::ArrayRef< const gmx::RVec > v, unsigned int n)
 Allocates an rvec pointer and copy the contents of v to it.
 
void set_box_rel (const t_inputrec *ir, t_state *state)
 Determine the relative box components. More...
 
void preserve_box_shape (const t_inputrec *ir, matrix box_rel, matrix box)
 Make sure the relative box shape remains the same. More...
 

Variables

const char * est_names [estNR]
 The names of the state entries, defined in src/gmxlib/checkpoint.c.
 

Typedef Documentation

typedef struct df_history_t df_history_t

Free-energy sampling history struct.

Todo:
Split out into microstate and observables history.

Function Documentation

void preserve_box_shape ( const t_inputrec *  ir,
matrix  box_rel,
matrix  box 
)

Make sure the relative box shape remains the same.

This function ensures that the relative box dimensions are preserved, which otherwise might diffuse away due to rounding errors in pressure coupling or the deform option.

Parameters
[in]irInput record
[in]box_relRelative box dimensions
[in,out]boxThe corrected actual box dimensions
void set_box_rel ( const t_inputrec *  ir,
t_state state 
)

Determine the relative box components.

Set box_rel e.g. used in mdrun state, used to preserve the box shape

Parameters
[in]irInput record
[in,out]stateState