11. TAMkin programmer’s guide

TODO: introductory text

11.1. Git Basics – Get the latest development version

TODO

11.2. Have a look at the structure of the package

It may be useful to understand the basic structure of the TAMkin package. Assume TAMkin is installed in a directory ~/code/, then one can have a look at the TAMkin files in the following way:

$ cd ~/code/tamkin
$ ls
cleancode.sh   COPYING   HEADER.py   lib       test
cleanfiles.sh  examples  install.sh  setup.py  uninstall.sh
  • The install.sh script uses the setup.py script to install TAMkin (see the https://molmod.ugent.be/code/wiki/TAMkin/InstallationGuide). Similarly, the uninstall.sh script can be used to uninstall TAMkin.

  • The cleancode.sh, cleanfiles.sh and HEADER.py files are only relevant for code developers, but not for the general user.

  • The file COPYING contains the license under which TAMKin is distributed.

  • The directory test/ contains the testing routines. This is mainly intended for developers, but a regular user can also use it to test the validity of its installation.

    $ ls test/
    input  nma.py       partf.py    rotor.py  timer.py
    io.py  nmatools.py  pftools.py  test.py   tunneling.py
    
  • The directory examples/ contains worked out examples (see further).

  • The directory lib/ contains the TAMkin source code itself (the files with lines of code, for developers).

    $ ls lib/
    data.py  __init__.py  nma.py       partf.py    rotor.py  tunneling.py
    geom.py  io           nmatools.py  pftools.py  timer.py
    

11.3. Coding guidelines

TODO

11.4. Doc-string guidelines

TODO

11.5. Test and example guidelines

Self-explaining filenames and job titles
Think of filenames for scripts and data files that are self-explaining. Also include English titles that make sense. These titles will appear in the output generated by TAMkin to label the different partition functions.
Test data size

The smaller the total size of the source tree, the better. Before you git commit an example into the git repository, try to keep the data files from computational chemistry packages as small as possible. Try to do at least the following

  1. Keep the molecular systems in the examples small, i.e. at most 20 atoms.
  2. Strip all the trailing white spaces from every line in the output files.
  3. Strip all sections from the output files that are not used by TAMkin.

11.5.1. Gaussian fchk files

The script examples/fchkstripper.py takes care of steps 2 and 3. It is used as follows:

./fchkstripper.py file1.fchk file2.fchk

The files will be stripped in-place. No backup copy is made. Then fill in the title of the .fchk files, i.e. the first line.

11.6. Documentation guidelines

TODO