[go: up one dir, main page]

Menu

[r203]: / openthermo / thermo.h  Maximize  Restore  History

Download this file

143 lines (113 with data), 5.9 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/*************************************************************************************
* *
* ***** OpenThermo ***** *
* Calculation of thermodynamic functions from molecular data *
* Copyright 2008 Konstantin Tokarev <annulen@users.sourceforge.net> *
* and others *
* *
*************************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program (see COPYING); if not, see *
* http://www.gnu.org/licenses *
* *
*************************************************************************************
* Module name : thermo.h *
* Author : Tokarev. K *
* Last modification : 2008/07/12 *
* Description : This header file determines some parameters, many modules of *
* OpenThermo depend on. Uncomment some of the define lines to *
* build different versions of program *
* *
*************************************************************************************/
#ifndef THERMO_H
#define THERMO_H
#define VERSION "1.1.0 RC"
#define FULL_NAME "OpenThermo v.1.1.0 Release Candidate"
#define WEBSITE "http://openthermo.sourcefroge.net"
#define ATOM_NAME_LENGTH 8 //!< Max length of string, containing name of atom
//#define ROTATION_GRID_SIZE 1000
/// Maximal number of iterations in Newton optimization of barrier extremal points
#define NEWTON_MAXIT 50
/// Maximal step in Newton optimization of barrier extremal points
#define NEWTON_MAXSTEP 0.1
/******************* Build options *******************/
// Uncomment these strings to ...
//#define WIN32 //
/// \def COMDLG use Common Dialog to open file under Win32
#define COMDLG
/// \def LIBM use GNU math library
//#define LIBM
/// \def NUMERIC use numeric derivatives for ln Z (analytical are available only for RRHO!)
#define NUMERIC
/// \def SIMPLE use simple analytical formulae for Cp, S and H
//#define SIMPLE
/// \def NO_SPIN ignore nuclear spins
//#define NO_SPIN
/// \def ECHO_ON print results of calculation on stdout
//#define ECHO_ON
/// \def TEST perform invariant tests during calculation
//#define TEST
/******************* Debug options *******************/
//#define DEBUG
#ifdef DEBUG
#define DPRINT(x) std::cerr << #x << " = " << x << endl;
#endif
/***********************************************************************/
// Fundamental constants
const double k=1.3806504e-23, // Boltzmann's constant
h=6.62606896e-34, // Plank's constant
R=8.314472, // gas constant
c=2.99792458e10, // speed of light (cm/s!)
Na=6.02214179e23, // Avogadro constat
cal=4.184, // Calorie
Cels = 273.15,
atm = 101325,
HartreeJ = 4.35974394e-18, // Hartree unit in J
Hartree = 27.2113834*96485.3399, // Hartree unit in eV * F {2625.49961748e3}
cm = h*c, // 1/cm
eV = 96485.3399,
pi = 3.14159265358979323846;
// Some build options are incompatible, so we should remove controversies
#ifdef SPECIAL
#undef SILENT
#undef SIMPLE
#endif /* SPECIAL */
#ifdef SILENT
#undef ECHO_ON
#undef DEBUG
#endif /* SILENT */
#ifdef NUMERIC
#undef SIMPLE
#endif /* NUMERIC */
// ---- Compiler-specific and OS-specific tricks ----
// Detect Windows compilers
#ifndef WIN32
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined _MSC_VER || defined __BCPLUSPLUS__ || defined __TURBOC__
#define WIN32
// However, OpenThermo compilation wasn't tested with all of them
#endif
#endif
#ifndef WIN32
#undef COMDLG
#endif /* WIN32 */
#if defined __WATCOMC__
#define STRSTREAM
/* #define showpoint setiosflags(ios::showpoint)
#define
#define right setiosflags(ios::right)*/
#endif
#if defined __ICC
#define ios_format_flags ios::fmtflags
#endif
#endif /* THERMO_H */