fixed rest of include typos in headers
[gromacs/adressmacs.git] / include / oenv.h
blobc8c6c071f15c0fb7d9f581e4949261a5cce8b181
1 /*
2 *
3 * This source code is part of
4 *
5 * G R O M A C S
6 *
7 * GROningen MAchine for Chemical Simulations
8 *
9 * VERSION 3.2.0
10 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
11 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
12 * Copyright (c) 2001-2004, The GROMACS development team,
13 * check out http://www.gromacs.org for more information.
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
20 * If you want to redistribute modifications, please consider that
21 * scientific software is very special. Version control is crucial -
22 * bugs must be traceable. We will be happy to consider code for
23 * inclusion in the official distribution, but derived work must not
24 * be called official GROMACS. Details are found in the README & COPYING
25 * files - if they are missing, get the official version at www.gromacs.org.
27 * To help us fund GROMACS development, we humbly ask that you cite
28 * the papers on the package - you can find them in the top README file.
30 * For more info, check our website at http://www.gromacs.org
32 * And Hey:
33 * Gromacs Runs On Most of All Computer Systems
36 #ifndef _oenv_h
37 #define _oenv_h
39 #ifdef HAVE_CONFIG_H
40 #include <config.h>
41 #endif
43 #include "typedefs.h"
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 #if 0 /* avoid screwing up indentation */
50 #endif
53 /* output_env member functions */
55 /* The output_env structure holds information about program name, cmd line,
56 default times, etc.
58 There are still legacy functions for the program name, and the command
59 line, but the output_env versions are now preferred.*/
61 typedef enum
63 timeNULL, time_fs, time_ps, time_ns, time_us, time_ms, time_s
64 } time_unit_t;
65 /* the time units. For the time being, ps means no conversion. */
67 typedef enum { exvgNULL, exvgXMGRACE, exvgXMGR, exvgNONE } xvg_format_t;
68 /* the xvg output formattings */
71 struct output_env
73 time_unit_t time_unit; /* the time unit, enum defined in statuti.h */
74 bool view; /* view of file requested */
75 xvg_format_t xvg_format; /* xvg output format, enum defined in statutil.h */
76 int verbosity; /* The level of verbosity for this program */
77 int debug_level; /* the debug level */
79 char *program_name; /* the program name */
80 char *cmd_line; /* the re-assembled command line */
84 void output_env_init(output_env_t oenv, int argc, char *argv[],
85 time_unit_t tmu, bool view, xvg_format_t xvg_format,
86 int verbosity, int debug_level);
87 /* initialize an output_env structure, setting the command line,
88 the default time value a boolean view that is set to TRUE when the
89 user requests direct viewing of graphs,
90 the graph formatting type, the verbosity, and debug level */
92 void output_env_init_default(output_env_t oenv);
93 /* initialize an output_env structure, with reasonable default settings.
94 (the time unit is set to time_ps, which means no conversion). */
96 extern void output_env_done(output_env_t oenv);
97 /* free memory allocated for an output_env structure. */
100 extern int output_env_get_verbosity(const output_env_t oenv);
101 /* return the verbosity */
103 extern int output_env_get_debug_level(const output_env_t oenv);
104 /* return the debug level */
106 extern const char *output_env_get_time_unit(const output_env_t oenv);
107 /* return time unit (e.g. ps or ns) */
109 extern const char *output_env_get_time_label(const output_env_t oenv);
110 /* return time unit label (e.g. "Time (ps)") */
112 extern const char *output_env_get_xvgr_tlabel(const output_env_t oenv);
113 /* retrun x-axis time label for xmgr */
115 extern real output_env_get_time_factor(const output_env_t oenv);
116 /* return time conversion factor from ps (i.e. 1e-3 for ps->ns) */
118 extern real output_env_get_time_invfactor(const output_env_t oenv);
119 /* return inverse time conversion factor from ps (i.e. 1e3 for ps->ns) */
121 extern real output_env_conv_time(const output_env_t oenv, real time);
122 /* return converted time */
124 extern void output_env_conv_times(const output_env_t oenv, int n, real *time);
125 /* convert array of times */
127 extern bool output_env_get_view(const output_env_t oenv);
128 /* Return TRUE when user requested viewing of the file */
131 extern xvg_format_t output_env_get_xvg_format(const output_env_t oenv);
132 /* Returns enum (see above) for xvg output formatting */
134 extern const char *output_env_get_program_name(const output_env_t oenv);
135 /* return the program name */
137 extern const char *output_env_get_cmd_line(const output_env_t oenv);
138 /* return the command line */
140 extern const char *output_env_get_short_program_name(const output_env_t oenv);
141 /* get the short version (without path component) of the program name */
145 #ifdef __cplusplus
147 #endif
149 #endif