Tonto | ||
---|---|---|
<< Previous | Next >> |
TONTO is different from most programs used in computational chemistry because it does not have a "main program" (although for convenience a few common "main programs" are already set up for you to use). Instead, TONTO consists of about fifty independent modules. In most cases the more sophisticated modules will make use of the simpler ones. Once compiled, however, each single module can be used separately, in its own right. It is the documentation for each of these modules which appears on the TONTO homepage.
The module which probably will be used most often is MOL, since it contains routines which deal with the "molecule data type". The executable, or "main program" associated with this module is called run_mol.x. Indeed, the executable associated with any module with name XXXX is, by convention, always called run_xxxx.x.
Each module in TONTO is organised so that it is concerned only with tasks which deal with a specific data type. For example, the module REALMAT deals with the data type "matrices of real numbers", and consists of routines, such as swap_columns or solve_eigenproblem, which only deal with matrices. That is, their first argument is always a matrix of real numbers.
More complicated modules are designed around Fortran95 derived data types. For example, the "molecule data type" which is used in module MOL is built from a collection of items, called components, of a simpler data type. There is one component called name of "string type" which holds the name of the molecule. There is also another component called atom, which is a vector. Each element of this vector is of "atom type", and holds information about each of the atoms which make up the molecule. Each of the routines in module MOL (for example, center_of_mass, which returns the center of mass of the molecule) always takes as its first argument, a variable of the molecule data type.
The style of module programming used in TONTO is known as abstract data type programming, or more loosely, object based programming.
This style of module was chosen because we believe it has a simplicity of structure and ease of modification which was one of the main design goals of TONTO.