Gromacs  2026.0-dev-20241213-9ac17bb
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
energyoutput.cpp File Reference
#include "gmxpre.h"
#include "energyoutput.h"
#include <cfloat>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <array>
#include <filesystem>
#include <string>
#include "gromacs/applied_forces/awh/awh.h"
#include "gromacs/applied_forces/awh/read_params.h"
#include "gromacs/fileio/enxio.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/xdr_datatype.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/listed_forces/disre.h"
#include "gromacs/listed_forces/orires.h"
#include "gromacs/math/functions.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/constr.h"
#include "gromacs/mdlib/ebin.h"
#include "gromacs/mdlib/mdebin_bar.h"
#include "gromacs/mdrunutility/handlerestart.h"
#include "gromacs/mdrunutility/mdmodulesnotifiers.h"
#include "gromacs/mdtypes/energyhistory.h"
#include "gromacs/mdtypes/fcdata.h"
#include "gromacs/mdtypes/group.h"
#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pulling/pull.h"
#include "gromacs/topology/forcefieldparameters.h"
#include "gromacs/topology/mtop_util.h"
#include "gromacs/topology/topology.h"
#include "gromacs/topology/topology_enums.h"
#include "gromacs/trajectory/energyframe.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/enumerationhelpers.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/utility/stringutil.h"
#include "energydrifttracker.h"
+ Include dependency graph for energyoutput.cpp:

Description

Defines code that writes energy-like quantities.

Author
Mark Abraham mark..nosp@m.j.ab.nosp@m.raham.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Paul Bauer paul..nosp@m.baue.nosp@m.r.q@g.nosp@m.mail.nosp@m..com
Artem Zhmurov zhmur.nosp@m.ov@g.nosp@m.mail..nosp@m.com
static const char *const conrmsd_nm [] = { "Constr. rmsd", "Constr.2 rmsd" }
 Labels for energy file quantities.
 
static constexpr std::array
< const char *, 3 > 
boxs_nm = { "Box-X", "Box-Y", "Box-Z" }
 
static constexpr std::array
< const char *, 6 > 
tricl_boxs_nm
 
static const char *const vol_nm [] = { "Volume" }
 
static const char *const dens_nm [] = { "Density" }
 
const char *const pvEnergyFieldName = "pV"
 
const char *const enthalpyEnergyFieldName = "Enthalpy"
 
const std::array< const char *, 9 > virialEnergyFieldNames
 
static constexpr std::array
< const char *, 6 > 
boxvel_nm
 
const char * enumValueToString (NonBondedEnergyTerms enumValue)
 Printed names for intergroup energies.
 

Functions

static bool haveFepLambdaMoves (const t_inputrec &inputrec)
 
static void print_lambda_vector (t_lambda *fep, int i, bool get_native_lambda, bool get_names, char *str)
 Print a lambda vector to a string. More...
 
FILE * open_dhdl (const char *filename, const t_inputrec *ir, const gmx_output_env_t *oenv)
 Open the dhdl file for output.
 

Function Documentation

static void print_lambda_vector ( t_lambda *  fep,
int  i,
bool  get_native_lambda,
bool  get_names,
char *  str 
)
static

Print a lambda vector to a string.

Parameters
[in]fepThe inputrec's FEP input data
[in]iThe index of the lambda vector
[in]get_native_lambdaWhether to print the native lambda
[in]get_namesWhether to print the names rather than the values
[in,out]strThe pre-allocated string buffer to print to.

Variable Documentation

constexpr std::array<const char*, 6> boxvel_nm
static
Initial value:
= { "Box-Vel-XX", "Box-Vel-YY", "Box-Vel-ZZ",
"Box-Vel-YX", "Box-Vel-ZX", "Box-Vel-ZY" }
constexpr std::array<const char*, 6> tricl_boxs_nm
static
Initial value:
= { "Box-XX", "Box-YY", "Box-ZZ",
"Box-YX", "Box-ZX", "Box-ZY" }
const std::array<const char*, 9> virialEnergyFieldNames
Initial value:
= { "Vir-XX", "Vir-XY", "Vir-XZ",
"Vir-YX", "Vir-YY", "Vir-YZ",
"Vir-ZX", "Vir-ZY", "Vir-ZZ" }