Formol Code
Brought to you by:
ngc891
INTRODUCTION:
=============
The intention of this program is to provide an extremely simple molar mass
calculator for chemical formula. It accepts common chemical notations, including
brackets like `Si[OC2H5]4'. See `man(1) formol' for more information about usage
and formula pattern syntax.
HOW TO USE IT:
==============
usage: formol [option] <pattern>
-h --help print some help and exit
-v --version print version information and exit
Formol parse argument <pattern> to compute a molar mass (g/mol). All the elements
of the periodic table are recognized, till element 112 (Cn). It is possible to
use brackets as parenthesis and some condensed form of chemical group.
<pattern>
Formol use a simple left-to-right parsing to evaluate the molar mass of the
given formula. The formula must contain ONLY letters (uppercase and/or lowercase),
integer coefficients and eventually brackets. All unknown characters are ignored.
The coefficient must be on the right of the element or group he belongs. Do not use
global or decimal coefficient (not yet implemented). Do not use white space.
Some example:
work : CH3Cl, C2H5OH, EtOH, Si[OC2H5]4, CaF2
don't work : 6[H2O], FeO1.5, Al2 O3
In addition of the elements of the periodic table, some chemical groups notations
are recognized for convenience:
Me : methyl group (CH3)
Et : ethyl group (C2H5)
Ph : phenyl group (C6H5)
KNOWN BUGS/ISSUES:
==================
- Unexpected result in case of more than one group of brackets
- No syntax warning
AVAILABILITY:
=============
http://formol.sourceforge.net
http://sourceforge.net/projects/formol/files/formol