Subversion Repositories wimsdev

Rev

Rev 820 | Rev 12963 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6770 georgesk 1
'\" t
2
.\"     Title: CHEMEQ
3
.\"    Author: Georges Khaznadar <georgesk@debian.org>
4
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5
.\"      Date: 06/19/2013
6
.\"    Manual: User Manuals
7
.\"    Source: chemeq 2.10
8
.\"  Language: English
9
.\"
10
.TH "CHEMEQ" "1" "06/19/2013" "chemeq 2.10" "User Manuals"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
chemeq \- Chemical Equation Parser and Renderer
32
.SH "SYNOPSIS"
33
.HP \w'\fBchemeq\fR\ 'u
34
\fBchemeq\fR [\fB\-M\fR] [\fB\-m\fR] [\fB\-l\fR] [\fB\-c\fR] [\fB\-w\fR] [\fB\-C\fR] [\fB\-e\fR] [\fB\-s\fR] [\fB\-n\fR] [\fB\-W\fR]
35
.HP \w'\fBchemeq\fR\ 'u
36
\fBchemeq\fR [\fB\-h\fR] [\fB\-v\fR]
37
.SH "DESCRIPTION"
38
.PP
39
\fBchemeq\fR
40
is a chemical equation analyzer\&. It is a fast lexical and syntaxic analyser which helps to find out chemical informations embedded in source chemical equations\&. Data can be output in various sophisticated formats, depending on options\&. \*(Aqchemeq\*(Aq defaults to \*(Aqchemeq \-mlcwCn\*(Aq\&.
41
.SH "OPTIONS"
42
.PP
43
\fB\-M\fR
44
.RS 4
45
Outputs al list of space separated molecular weights\&.
46
.RE
47
.PP
48
\fB\-m\fR
49
.RS 4
50
Outputs a
51
\fBm\fRinimal output\&. It allows chemeq to be idempotent, i\&.e\&. the command \*(Aqchemeq | chemeq\*(Aq is equivalent to \*(Aqchemeq\*(Aq\&.
52
.RE
53
.PP
54
\fB\-l\fR
55
.RS 4
56
Outputs a
57
\fBL\fRaTeX string representing the chemical equation\&.
58
.RE
59
.PP
60
\fB\-c\fR
61
.RS 4
62
Outputs a message giving informations about the Conservation of elements and charges in the equation\&. \*(AqOK\*(Aq means that both elements and electric charges are balanced\&.
63
.RE
64
.PP
65
\fB\-w\fR
66
.RS 4
67
Outputs the LaTeX string representing the Gulder\-\fBW\fRaage equation related to the input chemical equation, or the Nernst equation, if the input equation is a redox semi\-equation\&.
68
.RE
69
.PP
70
\fB\-C\fR
71
.RS 4
72
Outputs a detailed
73
\fBC\fRount of the molecules and atoms contained in each member of the chemical equation\&. For example for the equation "H2_g + 1/2 O2_g \-\-> H2O" it outputs: "H2_g|H:1*2, 1/2 O2_g|O:1/2*2; H2O|H:1*2 O:1*1"
74
.RE
75
.PP
76
\fB\-e\fR
77
.RS 4
78
Outputs a detailed count of the
79
\fBE\fRlectrical charges\&.
80
.RE
81
.PP
82
\fB\-s\fR
83
.RS 4
84
Outputs a list of the chemical
85
\fBS\fRpecies\&.
86
.RE
87
.PP
88
\fB\-n\fR
89
.RS 4
90
Outputs a
91
\fBN\fRormalized string accounting for the input equation\&. Two chemical equations having the same normalized string are chemically equivalent, even if the molecules are scrambled around and the coefficient are not equal but proportionnal\&.
92
.RE
93
.PP
94
\fB\-W\fR
95
.RS 4
96
Changes the behavior of the renderer for some versions of
97
\fBW\fRims : works around a bug whith the macro \erightarrow\&.
98
.RE
99
.PP
100
\fB\-h\fR
101
.RS 4
102
Displays
103
\fBH\fRelp\&.
104
.RE
105
.PP
106
\fB\-v\fR
107
.RS 4
108
Displays the
109
\fBV\fRersion number
110
.RE
111
.SH "ENVIRONMENT"
112
.PP
113
\fBchemeq_input\fR, \fBw_chemeq_input\fR
114
.RS 4
115
if set, this variables\*(Aqs value overrides the standard input\&. If this variable is not set, the variable w_chemeq_input is taken in account (useful for the WIMS server)\&.
116
See above (useful for the WIMS server)\&.
117
.RE
118
.PP
119
\fBchemeq_option\fR
120
.RS 4
121
if set, this variable\*(Aqs value overrides the options\&.If this variable is not set, the variable w_chemeq_option is taken in account (useful for the WIMS server)\&.
122
.RE
123
.PP
124
\fBw_chemeq_option\fR
125
.RS 4
126
See above (useful for the WIMS server)\&.
127
.RE
128
.SH "EXAMPLES"
129
.PP
130
\fBecho "1/2 Cu^2+ + OH\- \-> 1/2Cu(OH)2s" | chemeq\fR
131
.RS 4
132
will display informations about the reaction of hydroxyde and Cu II ions\&.
133
.RE
134
.PP
135
\fBecho "MnO4^\- + 8H3O^+ + 5e\- \-\-> Mn^2+ + 12 H2O" | chemeq\fR
136
.RS 4
137
will display informations about the reaction of reduction of permanganate ions in an acid environment\&.
138
.RE
139
.PP
140
\fBecho "MnO4^\- + 8H3O^+ + 5e\- \-\-> Mn^2+ + 12 H2O" | chemeq \-w\fR
141
.RS 4
142
will display the LaTeX format for the Nernst law related to the reduction of permanganate ions in an acid environment\&.
143
.RE
144
.PP
145
\fBecho "MnO4^\- + 8H3O^+ + 5e\- \-\-> Mn^2+ + 8 H2O" | chemeq \-c\fR
146
.RS 4
147
will highlight the lack of conservation of elements H and O (water molecules are not well balanced)\&.
148
.RE
149
.SH "NOTES"
150
.PP
151
\fBsyntax of ions\fR
152
.RS 4
153
allthough in some cases, shorter expressions are sucessfully parsed, it is safer to consider that an "up arrow" (^) must be put before the charge symbols of an ion\&. Examples : H3O^+, Fe(CN)6^4\-, OH^\-
154
.RE
155
.PP
156
\fBComposing chemical equations\fR
157
.RS 4
158
Two operators are defined, # as an additive oprator and ~ (tilde) as a substractive operator: they allow to compose several chemical equations
159
.sp
160
\fB echo "MnO4^\- + 8H3O^+ + 5e\- \-\-> Mn^2+ + 8 H2O ~ 5Fe^3+ + 5e\- \-> 5Fe^2+" | chemeq\fR
161
.sp
162
will display the pure redox equation from the first equation, minus the second one\&. Electrons are simplified\&. So it will be equivalent to:
163
.sp
164
\fB echo "MnO4^\- + 8H3O^+ + 5Fe^2+\-\-> Mn^2+ + 8 H2O + 5Fe^3+" | chemeq \fR
165
which is their combination\&.
166
.RE
167
.PP
168
\fBMutiplying a chemical equation by one coefficient\fR
169
.RS 4
170
The operator * permits to multiply a whole equation by one coefficient which may be a fraction\&. Here is an example:
171
.sp
172
\fB echo "5 * Fe^3+ + e\- \-> Fe^2+" | chemeq \fR
173
.sp
104 bpr 174
will be equivalent to
6770 georgesk 175
.sp
176
\fB echo "5Fe^3+ + 5e\- \-> 5Fe^2+" | chemeq\fR
177
.RE
178
.PP
179
\fBCombining chemical equations, with coefficients\fR
180
.RS 4
181
The two previous techniques can be used at the same time, which enables you to make more comlicated combinations, like this one:
182
.sp
183
\fB echo "Fe^3+ + e^\- \-> Fe^2+ (0\&.77 V) # Fe^2+ + 6CN^\- \-> Fe(CN)6^4\- (Kfa=1e24) ~ Fe^3+ + 6CN^\- \-> Fe(CN)6^3\- (Kfb=1e31)" | chemeq \fR
184
.sp
185
which will work as expected, and yeld a good value for the stan\(hy dard potential of the redox couple of hexacyanoferrate II and III ions\&.
186
.RE
187
.SH "KNOWN BUGS"
188
.PP
189
When not specified, chemical entities coming from the standard input are believed to be in aqueous solutions\&. Water is considered by default as the main solvent\&. Only one liquid (aqueous) phase is currently taken in account\&. All solid chemical entities are considered as parts of separated phases\&. Suffixes _s, _g and _aq can be used to enforce the type of some chemical entities\&. There may be problemes when you write a standard potential with no decimal dot\&. For example, the entry
190
\fBMn^2+ + 2e^\- \-> Mn_s (\-1 V)\fR
191
would trigger an error\&. Then write
192
\fBMn^2+ + 2e^\- \-> Mn_s (\-1\&.0 V)\fR
193
or the more accurate value
194
\fBMn^2+ + 2e^\- \-> Mn_s (\-1\&.18 V)\fR
195
and there will be no error\&.
196
.SH "AUTHOR"
197
.PP
198
\fBGeorges Khaznadar\fR <\&georgesk@debian\&.org\&>
199
.RS 4
200
Wrote this manpage\&.
201
.RE
202
.SH "COPYRIGHT"
10 reyssat 203
.br
6770 georgesk 204
Copyright \(co 2000-2013 Georges Khaznadar
205
.br
206
.PP
207
Redistribution and use of this manpage in source and binary forms, with or without modification, are permitted under the terms of the GNU General Public Licenses, version 2
208
.PP
209
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED\&. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE\&.
210
.sp