Configuration and Customization

Startup Macros

One powerful way to customize and extend MOLMOL is by using macros that are automatically started each time you start the program. The following macros are executed on startup if the files exist:
  1. setup/startup.mac in the installation directory
  2. all files with the extension .mac in the directory setup/startup in the installation directory
  3. molmol/startup.mac in your home/profile directory
  4. all files with the extension .mac in the directory molmol/startup in your home/profile directory
You can use any MOLMOL command in these startup macros, but especially useful in this context are command definitions, as described in the User Macros section. These allow you to extend the functionality of the program with your own commands. These commands will automatically be accessible from the Opt menu.

Another set of commands that is very useful for startup macros are the commands for setting default graphics attributes, like ColorInit and StyleInit. So if you would like new graphics elements to be displayed in red instead of the default blue, you can put the following command into one of your startup macros:

ColorInit 1 0 0

New Molecule Macros

By default, MOLMOL displays all newly loaded molecules in line mode. You can change that by writing a macro that gets automatically executed each time a new molecule is loaded. The program will check for such a macro in the following locations:
  1. setup/newmol.mac in the installation directory
  2. molmol/newmol.mac in your home/profile directory
While the macro is executed, the newly loaded molecules have the property new set. This makes it possible to change the display style of only the new molecule, without affecting molecules that are already loaded. E. g. if you want all new molecules to be displayed in CPK mode, put the following macro into one of the locations above:
SelectAtom 'mol.new'
SelectBond 'mol.new'
XMacStand cpk.mac

Setup Files

MOLMOL obtains a lot of configuration information from simple text files which can easily be modified or replaced. The default files can be found in the subdirectory setup of your installation. If you want to make a change for all users of the installation, you have the option to edit these files directly. The preferable and safer way to change configuration files, especially for individual users, is to make a copy of the original file e. g. to your home directory, and then use the PathNames command of MOLMOL to instruct the program to use your modified file.

The location of the following files can be changed directly with the PathNames command:

AtomRadius
Atom radii for finding bonds, a bond is detected if the distance between two atoms is less than the sum of the two radii. Used by the commands CalcBond and ReadXyz.
AtomCharge
Formal charges for atoms, each line has the format:
ResidueName AtomName Charge
The residue name can contain wildcards. These charges are used whenever the simplecharge value of an atom is accessed, e. g. for the CalcPot command.
FlipAtoms
Defines groups of atoms that can be flipped by the FlipAtom command.
RingShift
Defines paramter sets for the CalcShift command.
PdbAtoms
Name translation table to map atom names from PDB files to names in the residue library. The residue name can contain wildcards.
PropDef
Definition of predefined properties.
ColorList
Definition of color names for the color dialog.
With the MenuDir entry of the PathNames command, you can specify an alternate directory where the program looks for the following files defining the user interface:
MenuBar
List of pulldown menus in the menu bar. Each pulldown menu is defined in its own file with the extension .menu.
*.menu
Contents of pulldown menu that is part of MenuBar.
Buttons
Definition of buttons on right side of main window.
Popup
Definition of popup (righ mouse button) menu.
Valuator
Definition of sliders in valuator box.
Note that all these parts of the user interface can also be disabled completely with the UserInterface command.

Residue Libraries

The residue library works much like the other setup files explained in the previous section, its location is also set with the PathNames command, but it is so important for the operation of MOLMOL that its description was separated from the rest of the files. The residue library contains definitions of residues (monomers) that are used whenever a macromolecule is read from a file. These residue definitions contain: MOLMOL can still read files even if they contain residues that are not part of the residue library. It will display a warning, and since it does not have any connectivity information, will not display bonds for these residues. In most cases these bonds can easily be added with the CalcBond command.

When a small molecule is read with the ReadSybyl or ReadXyz command , MOLMOL will either take the connectivity information from the input file, or add the bonds automatically. Entries in the residue library are not necessary in this case, only the ATOMTYPES section of the residue library is used.

The format of the residue library corresponds to the one used by the program DYANA, it is documented in the manual which is accessible from the web page. Three libraries are distributed with MOLMOL, all of them contain standard amino acids and nucleic acids.

amber94.lib
Standard geometry minimized with the AMBER94 force field, naming conventions from DYANA.
dyana.lib
Original DYANA library.
pdb.lib
Like amber94.lib, but using PDB naming conventions.
MOLMOL uses amber94.lib by default. If you frequently read PDB files and do not use DYANA, it may be preferable to use pdb.lib. If you decide to do that, you should disable the use of the default PdbNames file. The following command will do that:
PathNames '' '' '' '' '0' '' '/usr/local/molmol/setup/pdb.lib' '' ''
If you need to add entries to the residue library, the WriteLib command of MOLMOL can help you doing this. After you modify the library, it is a good idea to check it with the ReadLib command.
Last modified: Mon Jan 20 19:44:59 CST 2003

Reto Koradi, kor@mol.biol.ethz.ch