Editing Abbreviations

Location: File Menu

See also using abbreviations.

Conventions for Abbreviations

1) Abbreviation names may contain up to six characters. Only letters are allowed in abbreviation names, though the final character may now be a plus sign (+) or underscore (_) if desired; for example, Na+ and Cl_ are now allowable (this allows cations and anions to be defined as abbreviations).

2) Only the first letter of an abbreviation is allowed to be capitalized.

3) The definition for an abbreviation may contain any combination of elements, parentheses, and isotopes.

4) Abbreviations can now contain other abbreviations. If a circular loop is found wherein Abbreviation A references Abbreviation B, which references Abbreviation A, then an error message will be displayed.

5) Up to 100 normal abbreviations and 50 extended abbreviations are allowed.

Editing Abbreviations Using the Built-in Editor

The easiest way to edit the abbreviations is to select Edit Abbreviations under the File Menu. The above conventions apply to any new or modified abbreviations. While editing the abbreviations, use the arrow keys to move around, then press Enter or click on the value to change it. After changing the value, press OK to accept it or Cancel to cancel changes. Clicking on Remove or Erasing the value in the Change Value window and pressing OK will erase the abbreviation or value. Any lines containing one or more blank columns will be erased from the MWT_ABBR.DAT file. Pressing Cancel in the Editing Abbreviations window will cancel the most recent changes by simply reloading the MWT_ABBR.DAT file. Select Reset to Defaults in the Editing Abbreviations screen to reset the abbreviations to their default names and formulas.

If the MWT_ABBR.DAT file becomes corrupted, the MWT program will inform the user and ignore incorrect lines. If the file becomes deleted, the MWT program will create a new file with the default abbreviations. Thus, you can erase the .DAT files or select Restore to Defaults to restore the default abbreviations.

Editing Abbreviations Using a Text Editor

You can also edit the abbreviations directly in the MWT_ABBR file via a text editor. The following conventions must be followed:

1) Comments may be added by preceding the comment with an apostrophe.

2) Two group headings must exist: [AMINO ACIDS] and [ABBREVIATIONS]

3) Abbreviations consist of the abbreviation and molecular formula under the appropriate column in either section.

4) Only the first letter of an abbreviation is allowed to be capitalized.

5) The abbreviations in the Amino Acid section are treated as extended level abbreviations -- they are only recognized when extended abbreviations are on.

Abbreviation Matching Order and Selectivity

One quirky aspect of abbreviation recognition is that the first abbreviation of a user entered formula that is matched to the available abbreviations (during program operation) is the abbreviation that will be used -- furthermore, extended abbreviations are matched first if they are turned on.

For example, say the user types in the formula phen2-meph. If only normal abbreviations are turned on, the program will match phen to Phen and not to Ph and En since Phen appears first in the MWT_ABBR.DAT file. To force the Ph and En abbreviations, type PhEn2-MePh. However, if extended abbreviations have been activated (by pressing F3), the formula phen2-meph will be translated to PheN2-MePh and nothing else, since the program will match Phe to the amino acid phenylalanine, leaving the n to be interpreted as nitrogen. Numerous methods exist to avoid this specific problem:

1) Properly capitalize formulas while typing them in

2) Don't use extended abbreviations

3) Erase the Phe amino acid

4) Place the Phen abbreviation in the amino acid section ABOVE the Phe abbreviation, so that the program tries to match Phen before Phe.

This example should serve as a model for how to handle possible future abbreviation conflicts. This example should also illustrate that if the Phen abbreviation is placed anywhere below the Ph or En abbreviations in the MWT_ABBR.DAT file, it will be IMPOSSIBLE for the program to recognize it, since it will match Ph or En or both before even encountering Phen.

Back to the Molecular Weight Calculator download page