LIBRARY

The Bioinformatics Template Library (BTL) version 3.0alpha.

DESCRIPTION

The focus of this library is on the data structures and algorithms used within
the fields of bioinformatics and molecular modelling. The approach used closely
follows that of the Standard Template Library (STL) which is part of ISO/ANSI
standard C++. This library uses templates to implement generic programming.
Templates allow the development efficient generic programming modules using
compile-time mechanisms.

Although the BTL has been designed with biomolecular applications in mind it
contains classes of more general utility. For instance, the matrix and 
matrix_algorithms class could be used for matrix algebra in many contexts. 

INSTALLATION

This file contains all the source code for the BTL version 3.0(alpha). 
As templates are used extensively, the code consists of header files. 
These have to be compiled each time they are included. The code in library 
can be compiled by any ANSI/ISO standard compliant compiler. In development, 
we have used egcs 1.1.1b which, although not fully compliant contains the 
standard features used in the BTL.

CHANGES TO VERSION 3.0 SINCE 2.0

Version 3.0 is a radical overhual of the content and syntax of the library.
There has been substantial effort to make more components generic and to expand the 
number of available algorithms (up from only two in v2.0a to a respectable forty-one 
in the present version).

Extensive changes have been made to bring the syntax and mode of usage of the BTL
into line with that of the standard library in order to reduce the learning curve for 
new users. This is obviously disruptive to current users but the standard syntax will 
provide a firm foundation for all future development

Several headers have been defined which are intended for inclusion by users of the library.
They set up appropriate environments for the BTL containers, algorithms, functors, 
processors etc.

btl_numeric_vector.h 	   - the numeric_vector container
btl_matrix.h 		   - the matrix container
btl_graph.h 		   - the graph container includes DFSIterator, Dereferencer etc
btl_graph_with_edges.h     - the graph_with_edges container
btl_vector_algorithms.h    - vector algebra
btl_matrix_algorithms      - matrix algebra
btl_statistics.h           - statistics
btl_numerics.h             - algorithms to compare the contents of containers and the
                           - functors random and less_absolute
btl_least_squares.h        - least-squares fitting of coordinates data via Kearsley's method 
btl_sequence_algorithms.h  - Needleman-Wunsch
btl_biomolecular_data.h    - File processors, and the functors PDB_sort, amino_acid_property

A namespace btl has been introduced, consequently the BTL prefix is no longer needed when 
using functions.

THE NEW ALGORITHMS AND SYNTAX ARE FULLY DOCUMENTED IN THE HTML DOCUMENTATION

-------------------------------------------------------------------------------------------

NOTES FOR USERS OF EARLIER VERSIONS

Changes to the numeric_vector Class (was Vector)

The container is now a template class
The class is now defined in a single .h file to encourage inlining of code
Now defines all standard public STL types (iterator, reference, size_type etc.) 
Efficiency improvements to many operations
Removed Vector<T> operator*(const value_type& y, const Vector<T> &v) { return (v * y); }
Removed Vector<T> operator/(const value_type& y, const Vector<T> &v) { return (v / y); }

Changes to the matrix Class (was Matrix)

The container is now a template class
The class is now defined in a single .h file to encourage inlining of code
Underlying structure changed from an array to an STL vector
Code implementing most overloaded operators now written directly in terms of iterators
Now defines all standard public STL types (iterator, reference, size_type etc.)
Constructors now conform to STL style, when an equivalent exists:

	matrix(3,3) constructs a 3x3 matrix of type REAL initialised to 0.0
	BTL_REAL init;
        matrix(3,3,init) constructs a 3x3 matrix of type REAL initialised to init
        int init;
	matrix(3,3,init) constructs a 3x3 matrix of type int initialised to 0
	matrix(first, last, nrows) constructs a matrix from another container 
                                       e.g. vector, numeric_vector, matrix, list, even an array

an exception is matrix(), which creates a 3x3 matrix of type BTL_REAL initialised to 0.0
        not an empty matrix because matrix cannot be resized after creation 

the friend  Matrix<T> operator*(const Matrix<T>::value_type& r, const Matrix<T>& m)
        has been removed

the ReadRow function has be removed as same functionality is provided by a numeric_vector
constructor and the STL copy with only slightly different syntax

The WriteRow function has been removed as same functionality is provided by STL copy

a read_column function has been added

The Eigens member function has been replaced by eigen_solution which returns eigen vectors
stored in rows of a matrix not columns as previously

Changes to CholskyInverse Class (merged into btl_matrix_algorithms.h)

In order to allow application to template containers confroming to STL standard only
the inversion is no longer 'in place', but creates a new matrix containing the inverse
as a Matrix of type REAL. The CholeskyInverse is now called inverse_cholesky.

Changes to Graph and GraphWithEdges Classes

Presently these classes have only been renamed (see above). 
Full transition to the standard syntax will be implemented in the 3.0beta


ADDITIONS IN VERSION 2.0 SINCE VERSION 1.0

1/ Graph and GraphWithEdges container adaptor classes. These implement generic
graph data structures. The former has simple pointers between vertices while in 
the later values or objects can be associated with edges. Any type of data or
objects can be associated with vertices and edges and stored in any STL 
container.

2/ 1, 2 and 3 dimensional fast Fourier transforms as generic algorithms

3/ The Cholesky method of matrix inversion is now a generic algorithm that can
be applied to any matrix class that has certain member functions (e.g. those in
the Template Numerical Toolkit (TNT) at http://math.nist.gov/tnt/

4/ A PDBSort function object for sorting protein atoms into Brookhaven pdb
format order

5/ An AminoAcidProperty function object which returns a property value given an
amino acid code character.

6/ Some very basic file processors for reading XYZ format coordinate and
PIR format protein sequence files.

7/ The BTL_ prefix has been added to all global type names to avoid name
clashes. This prefix will be replaced by a BTL:: namespace scope when the gcc
compiler fully implements namespaces.

COPYRIGHT

The copyright 1997, 1998, 1999 for this library is owned by Birkbeck College, 
Malet Street, London WC1E 7HX, U.K.

This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Library General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) any
later version.  This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
License for more details. You should have received a copy of the GNU Library
General Public License along with this library; if not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.






