anacal find chemical composition from elemental analysis results
doc generated from the script with gendoc
bash script, version=1.05

Synopsis

anacal [options] file[.ea] [max_dev]

Options

-I|--install
install
-c|--clean
clean up after swallowing edited internals and exit
-h|--help
show this help and exit
-H|--Help
show full help and exit
-V|--version
show version and exit

Description

This script, with the --install option, compiles and installs a binary anacal in $PREFIX/bin, with documentation in $PREFIX/{man,pdf,html}. To this end, it creates anacal.c, Makefile, README.md and a directory tests with input files for testing. These can be removed by calling the script with the --clean option. Any changes in the files will be stored back in the script. So if you have applied any changes, run me with the -c option, and then with the -I option to install the changes.

About the installed binary anacal: Given, for a chemical composition:

anacal calculates compositions for all combinations of the candidate molecular formulas and reports the combinations for which the average deviation between calculated and measured element percentages is better than the value given by the second argument, 1% by befault.

Input is taken from file.ea, output is written to stdout. The extension .ea is automatically appended to the input file.

Run without parameters for help.

Input

The input file should have the following structure (numbers are line numbers):
1
a title line
2
elementsymbol followed by percentage for each element determined
3+
bruto formula's of the possible components, one per line;
comments may be added with the #-character; remaining characters up to end-of-line are skipped.

Sample input file (case sensitive):

   6718 DEBO 145
   C54.53 H6.31 N8.10 S14.48
   C15 H20 N2 O3 S
   C11 H16 N2 O S
   C4 H12 N2 S2
   C2 H4 O S
   S#sulphur
   H Cl#hydrochloric acid
   H2 O#water

Author

Wybo Dekker

Copyright

Released under the GNU General Public License