Description of changes to the codebase

  1. General installation notes
  2. Compilation tips
  3. Source code changes 

General installation notes

AViz Compilation depends on a few standard packages already being installed on your system.
These include a standard installation of QT3 development packages (headers, libraries
and utilities like moc and tmake) as well X11 development packages. If these packages are
not installed on your system, ask your friendly neighborhood sysadmin to install them on your
Although any normal user can run Aviz, installing the above packages before compilation
needs to be done by a user with administrator privileges.

Since every Linux distro has different packages installed, it's impossible to give an installation
procedure that covers all possible variations. Some tips on handling compilation troubles are
given below.

Compilation tips

If you have a Redhat system, rpm files have been provided on the download page, use them
if you can."Configure; make; make install" is enough to compile AViz on some systems, however some simple tweaks may
be required to get AViz to compile on your system. Here is a list of things to do if you have compilation

Here are the steps you need to take:
  1. Compilation requires your system to have QT and tmake installed, if you do not have them
    installed (QT usually is but tmake usually isn't installed) you can get an rpm for installation
    from the main AViz download page.
    Installation is done as root, with the command "rpm -i <packagename.rpm>" on RH systems,
    or "alien -i <packagename.rpm>" on Debian derived systems.
  2. moc is a preprocessor that is part of QT. Configure looks for this in /bin, if it's installed
    elsewhere, make a symbolic link to it from bin, for example with the command:
    "sudo ln -sf /usr/bin/moc-qt3 /bin/moc".
  3. If Configure fails to find the QT library you can manually specify the location of your QT
    installation with an environment variable:
    in BASH: "export QTDIR=<dir path>".
    in CSH: "setenv QTDIR <dir path>"
  4. ./Configure" Should run successfully at this point, and a Makefile generated in the "src" directory.
  5. The official AViz-5.6 has a couple of line continuation erros on compilation, these are simple to fix by
    editing the source files. The archive for this version has that already fixed.
  6. Configure expects the QT header files to be in /include. you can edit the Makefile to point it in the right direction.
    open an editor and load the file src/Makefile. then you must correct a line as shown:
    "INCPATH =       -I$(QTDIR)/include"
    with this line:
    "INCPATH =       -I$(QTDIR)/include -I<header file dir path>"
  7. Finally, The Configure-generated Makefile attempts to link against libqt,
    which on some systems is actually named libqt-mt. This can be fixed by editing
     src/Makefile. In the line beginning with "LIBS =" change "-lqt" with "-lqt-mt".
  8. "make" should now give you a fairly clean compile.

2. Source code changes

most of the code is segmented into files caled *board.cpp. Generaly, aach of these files
corresponds to a panel in the GUI. For example, the code for the widgets on the "Bonds"
panel is in (surprise!) bondBoard.cpp.

Specific changes made are:
  1. (bondBoard.cpp) - BondBoard::BondBoard(..) a checkbox widget and labels were added.
  2. (bondBoard.cpp) - BondBoard::setToggles code was added to update the checkbox state
       when switching between atom types in the "Bonds" panel.
  3. (bondBoard.cpp) - BondBoard::readToggle(..) code was added to save the checkbox state
       into the (modified) "particleBonds" structure, which is where the specified
       criteria for the current bond (for Example C <-> H) is saved.
  4. (bondBoard.h) - the BondBoard class definition was modified by the addition of
    two members, seqBond and seqBondCb. These correspond to the added checkbox and label.
  5. (data.h) - an array named bSeqBond was added to the particleBond structure definition.
       This is the structure that holds the values for all the options
       and criteria about a bond type (for Example C <-> H).
  6. (defaultParticles.cpp) - setColorAndDefaults(..) is where the default states
       for widgets are specified. Here we set the "Sequential Bonding" to False by default.
  7. (glCanvasArea.cpp) - This file is where the actual bond construction is done.
       GLCanvasArea::makeBondsObject(..) was slighly modified, a variable named isSeqBond
       is now created and updated in the inner iteration loop. This variable is passed as
       input to to modified GLCanvasArea::isBond(..), which now includes a check based on the
       the value of isSeqBond and the indices of the current atom-pair to decide
       if a bond should be allowed to form.
  8. (glCanvasArea.h) - The definition of GLCanvasArea::isBond(..) was updated to reflect
       the new isSeqBond variable passed to it.

Back to main