Gromacs  2016.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
boxutilities.cpp File Reference
#include "gmxpre.h"
#include "boxutilities.h"
#include <cmath>
#include <algorithm>
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
+ Include dependency graph for boxutilities.cpp:

Description

Implements routines in boxutilities.h.

Utility functions for handling boxes.

Functions

static void do_box_rel (t_inputrec *ir, matrix box_rel, matrix b, gmx_bool bInit)
 Change box components to preserve the relative box shape. More...
 
void preserve_box_shape (t_inputrec *ir, matrix box_rel, matrix b)
 Make sure the relative box shape remains the same. More...
 
void set_box_rel (t_inputrec *ir, t_state *state)
 Determine the relative box components. More...
 

Function Documentation

static void do_box_rel ( t_inputrec *  ir,
matrix  box_rel,
matrix  b,
gmx_bool  bInit 
)
static

Change box components to preserve the relative box shape.

Change box components to box[XX][XX]*box_rel to preserve the relative box shape

void preserve_box_shape ( t_inputrec *  ir,
matrix  box_rel,
matrix  b 
)

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
[out]bThe corrected box
void set_box_rel ( struct t_inputrec *  ir,
t_state *  state 
)

Determine the relative box components.

Set state->box_rel used in mdrun to preserve the box shape

Parameters
[in]irInput record
[in,out]stateStructure containing the box