The K Desktop Environment

NextPrevious Table of Contents

3. Using KMol

3.1 Calculating molecular weights.

Enter a chemical formula in the formula field. Click on [Calculate], or just press "Enter". To clear the results, press [Clear]. Or just erase the old formula.

The formula syntax is very similar to what a regular chemical formula would look like, if subscripts are written as normal characters. To avoid the possible ambiguities, however, a few restrictions must be imposed:

  • An element or a group is a sequence of one upper or lower case alphabetic character ('A' to 'Z', or 'a' to 'z'), followed by any number of lower case characters ('a' to 'z'). Examples: H, He, thf, Thf, Ar, Myligand, dppe. (But not: tBu, THF, DPPE).
  • The special characters * and ' are also allowed but not as a first character. Examples: Cp*, Cp', Cp'', Bu'.
  • Even though lower case characters are allowed to appear as first characters in group definitions, such groups will be recognized properly only if they appear after a number, parenthesis, +, or at the beginning of the formula. Things like CpthfdppeNbCl2 don't make sense.
  • A coeficient appearing in front of the formula, after a (, or after a + in a multicomponent compound, applies to the whole subgroup after it, up to the end of the formula or the component, or the closing ). Examples: 2H2O2 is interpreted as 2(H2O2), 2(NH4)2SO4+FeSO4+12H2O as 2 {(NH4)2 SO4} . FeSO4 . 12 (H2O).
  • Write fractional coeficients as fixed point decimal numbers (i.e, 3.14). Fractions (2/3) or floats (3.5x10-6, 1.1e2) are not allowed.
  • 3.2 Defining your own groups or elements.

    By clicking on "Edit"->"Define", you can start an interactive symbol definition editor. Enter the name for the group or element to be defined in the symbol field. Follow the proper syntax. Enter the atomic weight in the definition field, or if you are defining a group, enter its formula. (Group symbols are of course allowed in the formula, as long as they have already been defined.) Example: Cp* can be defined as C10H15, C5(CH3)5, or C5Me5. You can also define it as an element with weight 135.23, but then you don't have the information about its elemental composition. Click on [Define] to define the new symbol.

    To confirm all your new definitions and close the editor window, click on [Done]. Clicking [Cancel] will discard the changes you made in the current session.

    If you redefine a group or element, the previous definition will be (silently!) overwritten. If you enter a symbol, but leave the definition field empty, KMol will "forget" the meaning of this symbol.

    KMol has separate global and per-user data files (that allows, for example, the global default for Ar to be argon, while you can still redefine for yourself Ar to denote your favorite aromatic fragment.) User defaults override global ones. Only the user definitions can be changed with the built-in editor. To modify global defaults, simply copy your $(HOME)/.kde/share/apps/kmol/kmolweights file to the /opt/kde/share/apps/kmol/ directory, overwriting any global data file there (if you have root permissions, of course).

    NextPrevious Table of Contents