QHG Tutorial

This tutorial explains how to implement populations, and how to compile and run QHG for them.

Preparations

We assume you have downloaded the code for QHG4.

Make sure the environmental variable $QHG4_DIR contains the full path to the top directory of QHG.

Next create a small directory tree for the tutorials in which all subdirectories contain the necessary data for one tutorial chapter. To do this, use the script build_tut_dirs.py.

${QHG4_DIR}/useful_stuff/build_tut_dirs.py tutorial

This will build the tutorial tree in the directory from which you call the script. Alternatively use a full path:

${QHG4_DIR}/useful_stuff/build_tut_dirs.py /data/QHG4/tutorial

In the tutorial we will refer to the directory you specified here as “top tutorial directory”

Tutorials

In each chapter the code of increasingly complex population classes is described in detail.

All populations used in QHG are derived from SPopulation. The population classes usually have a constructor and override one or more methods.